-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow configuration of OIDC scopes to request to support role-claim #23
Comments
I'm happy enough to implement this change, though I guess outstanding questions for @9p4 are:
In terms of work required, this change should be rather easy:
|
By the way, assuming this issue is considered, the following would consitute a complete & valid authelia config: ---
authelia:
OidEndpoint: https://authelia.example.com/.well-known/openid-configuration/
OidClientId: jellyfin
OidSecret: <omitted>
Enabled: true
EnableAuthorization: true
EnableAllFolders: true
EnabledFolders: []
# No need to request openid + profile
OidScopes: [ "groups" ]
Roles: ["jellyfin_user"]
AdminRoles: ["jellyfin_admin"]
EnableFolderRoles: false
FolderRoleMapping: []
RoleClaim: groups |
I believe an array of strings would be best |
This comment was marked as off-topic.
This comment was marked as off-topic.
Popped up during test of this new release, if the value in the plugin config is empty (empty empty, not empty JSON array), the request fails processing due to "Value cannot be null" error. |
That's intentional. The configuration is meant to be as explicit as possible when done through the API. |
Sorry, was not clear, I'm talking mainly about the newly introduced web interface for OIDC, which does not validate user input and allows for empty boxes, probably worth it's own issue to track that; I just discovered that because this new field was added and was thus missing from my configuration. |
Tracking input validation on the admin page here |
Is your feature request related to a problem? Please describe.
I recently decided to try to configure role-based access. I used the following configuration:
Fields of interest are here:
However, I found the response was "Error. Check Permissions", with the following log entry:
Per the authelia oidc config spec: https://www.authelia.com/docs/configuration/identity-providers/oidc.html#groups , I learned that the "groups" attribute requires the client to request the "groups" scope.
To test this, I modified the request to include this scope:
https://github.com/9p4/jellyfin-plugin-sso/compare/main...matthewstrasiotto:authelia_groups?expand=1
And indeed, requesting "groups" correctly confers user roles as well as admin roles.
It appears that for some OIDC providers, (Authelia, at the very least), additional scopes may need to be requested.
Describe the solution you'd like
Rather than hard-code these scopes into the request as I did to test the matter, I propose adding an additional config option, "additional oidc scopes" (or something) that allows the user to specify additional scopes to include in the request.
Describe alternatives you've considered
Hard-code this in, allow more opinionated provider presets (Preset, keycloak, preset authelia, etc), for my own use-case I could probably have supplied a list of usernames i wanted to get admin, but this defeats the purpose of membership based role checking. (All of these ideas are bad)
The text was updated successfully, but these errors were encountered: