You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was deploying the (community) Helm chart and found the Passbolt container to be too eager in checking JWT file permissions with is_writable.
What happened
When the JWT healthcheck runs, an error is thrown, despite the files have correct permissions:
JWT Authentication
[PASS] The JWT Authentication plugin is enabled
[FAIL] The /etc/passbolt/jwt/ directory should not be writable.
[HELP] You can try:
[HELP] sudo chown -Rf root:www-data /etc/passbolt/jwt/
[HELP] sudo chmod 750 /etc/passbolt/jwt/
[HELP] sudo chmod 640 /etc/passbolt/jwt/jwt.key
[HELP] sudo chmod 640 /etc/passbolt/jwt/jwt.pem
[FAIL] A valid JWT key pair is missing
This is due to symbolic links not being dereferenced, and the mount option not being taken into account:
This is the -L/--dereference flag of ls working:
$ k -n passbolt exec -it deployment.apps/passbolt-passbolt-helm -- ls -la /etc/passbolt/jwt
total 4
drwxrwxrwt 3 root root 120 Aug 1 12:40 .
drwxrwx--- 6 root www-data 4096 Jul 28 14:56 ..
drwxr-xr-x 2 root root 80 Aug 1 12:40 ..2022_08_01_12_40_58.3176624772
lrwxrwxrwx 1 root root 32 Aug 1 12:40 ..data -> ..2022_08_01_12_40_58.3176624772
lrwxrwxrwx 1 root root 14 Aug 1 12:40 jwt.key -> ..data/jwt.key
lrwxrwxrwx 1 root root 14 Aug 1 12:40 jwt.pem -> ..data/jwt.pem
$ k -n passbolt exec -it deployment.apps/passbolt-passbolt-helm -- ls -laL /etc/passbolt/jwt
total 12
drwxrwxrwt 3 root root 120 Aug 1 12:40 .
drwxrwx--- 6 root www-data 4096 Jul 28 14:56 ..
drwxr-xr-x 2 root root 80 Aug 1 12:40 ..2022_08_01_12_40_58.3176624772
drwxr-xr-x 2 root root 80 Aug 1 12:40 ..data
-rw-r----- 1 root root 3243 Aug 1 12:40 jwt.key
-rw-r----- 1 root root 800 Aug 1 12:40 jwt.pem
I'm expecting Passbolt to recognise the files as symlinks, and dereference them upon checking, plus evaluating all possible layers of "read-only-ness".
What you did
I was deploying the (community) Helm chart and found the Passbolt container to be too eager in checking JWT file permissions with
is_writable
.What happened
When the JWT
healthcheck
runs, an error is thrown, despite the files have correct permissions:This is due to symbolic links not being dereferenced, and the mount option not being taken into account:
This is the
-L
/--dereference
flag ofls
working:Here is the actual mountpoint:
Reference:
What you expected to happen
I'm expecting Passbolt to recognise the files as symlinks, and dereference them upon checking, plus evaluating all possible layers of "read-only-ness".
E.g. in https://bugs.php.net/bug.php?id=68926&edit=1 one suggestion is to try to actually write to a file, in order to determine if that would work.
The text was updated successfully, but these errors were encountered: