Skip to content

Conversation

@rcdailey
Copy link

Summary

Adds the groups scope to the OAuth2 OpenID Connect configuration to enable role-based access control (RBAC) with OIDC providers.

Changes

  • Added groups to oauth2_openid_scope in opencloudApp/src/main/res/values/setup.xml

Context

The groups scope is a de facto standard across major OIDC providers (Authelia, Keycloak, Authentik, Azure AD, Okta). Without it, OIDC providers cannot return group membership claims in the UserInfo response, preventing applications from implementing proper authorization based on user roles.

This change is backward compatible - per the OIDC specification, providers ignore unsupported scopes, so the OAuth flow will continue to work with providers that don't support the groups scope.

The groups scope is required for proper role-based access control (RBAC)
with OIDC providers like Authelia, Keycloak, and Authentik. Without it,
these providers cannot return group membership claims in the UserInfo
response, preventing applications from implementing proper authorization.

This change adds "groups" to the oauth2_openid_scope string resource,
enabling OIDC providers to return group information when supported.
The change is backward compatible as providers ignore unsupported scopes
per the OIDC specification.
@rcdailey
Copy link
Author

Looking at a similar PR for the desktop app: opencloud-eu/desktop#336

It seems that the chances of this being accepted will be very low. @samolego had a valid question there that went unanswered:

why would you expect to get groups while not requesting them? Isn't that broken?

It would be nice to have the answer to that. In the meantime, I'd be happy to explore the solution @butonic recommended in this comment. I assume this would apply to all clients, not just the desktop one.

Eager to get feedback from the maintainers.

@kaivol
Copy link

kaivol commented Nov 29, 2025

per the OIDC specification, providers ignore unsupported scopes

Are you sure about that?
According to 3.1.2.1. Authentication Request, "Scope values used that are not understood by an implementation SHOULD be ignored".

This also seems to be a problem in practice: opencloud-eu/desktop#336 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants