Pass OIDC bearer token to prelogin hook #1893
marcelvanwaaijen
started this conversation in
General
Replies: 1 comment 1 reply
-
If you use groups mapped to virtual folders, you can add an OIDC claim of "groups" and add "groups" to the list of scopes in your http binding, then those will be passed by the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I want to use sftpgo as an sftp solution for users to upload files to specific project folders. To make sure the users can only access the project folders they have access to, I need to use the authentication token returned from the OIDC authentication in the prelogin hook.
The prelogin hook will then connect to a web api with the authentication token and retrieve the list of project folders that are available to the user, which I then can use in the permission settings for the SFTPGo user permissions.
I was hoping that the token would be copied to the 'password' field of the json-serialized user that is passed in the SFTPGO_LOGIND_USER environment variable, but that is not the case...
Is there any other way to get the token in my prelogin hook?
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions