Try to pass a fixed scope to the workspace mount.
This commit is contained in:
parent
e90cceb7e8
commit
e7b9b10652
|
@ -1,11 +1,6 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
echo "Manage the user's workspace"
|
||||
workspace_dir='/workspace'
|
||||
workspace_logdir='/var/log/workspace-lib'
|
||||
workspace_libdir='/opt/workspace-lib'
|
||||
workspace_fuse_jar="$workspace_libdir/fuse-workspace.jar"
|
||||
|
||||
# Functions that decode a JWT token
|
||||
_decode_base64_url() {
|
||||
local len=$((${#1} % 4))
|
||||
local result="$1"
|
||||
|
@ -19,6 +14,12 @@ _decode_base64_url() {
|
|||
# $2 => either 1 for header or 2 for body (default is 2)
|
||||
decode_jwt() { _decode_base64_url $(echo -n $1 | cut -d "." -f ${2:-2}) | jq .; }
|
||||
|
||||
_workspace_scope="/d4science.research-infrastructures.eu"
|
||||
echo "Manage the user's workspace"
|
||||
workspace_dir='/workspace'
|
||||
workspace_logdir='/var/log/workspace-lib'
|
||||
workspace_libdir='/opt/workspace-lib'
|
||||
workspace_fuse_jar="$workspace_libdir/fuse-workspace.jar"
|
||||
|
||||
[[ ! -d "$workspace_dir" ]] || [[ -z `ls -A "$workspace_dir"` ]] || mv $workspace_dir ${workspace_dir}.old
|
||||
|
||||
|
@ -38,9 +39,8 @@ if [ -d /home/${USER}/workspace ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
|
||||
echo "Mount the workspace"
|
||||
su - "$USER" -c "/usr/bin/java -cp .:${workspace_dir}:${workspace_logdir}/ -Dlogback.configurationFile=${workspace_logdir}/logback.xml -jar $workspace_fuse_jar $SHINYPROXY_OIDC_ACCESS_TOKEN $workspace_dir" >/dev/null 2>&1 &
|
||||
su - "$USER" -c "/usr/bin/java -cp .:${workspace_dir}:${workspace_logdir}/ -Dlogback.configurationFile=${workspace_logdir}/logback.xml -jar $workspace_fuse_jar $SHINYPROXY_OIDC_ACCESS_TOKEN ${_workspace_scope} $workspace_dir" >/dev/null 2>&1 &
|
||||
|
||||
_retval=
|
||||
_fuse_process=$(ps auwwx | grep fuse | grep java)
|
||||
|
|
Loading…
Reference in New Issue