How to configure (Admin) Role Mapping with OpenCloud, Authelia and LLDAP #3205
therealschosch
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Solution: How to configure (Admin) Role Mapping with OpenCloud, Authelia and LLDAP
For anyone stumbling over the same issue, here is the solution on how to correctly map the Admin role via OIDC from LLDAP through Authelia to OpenCloud.
The core realization: OpenCloud does not have a local "bypass" admin login when OIDC is enabled. It strictly relies on the OIDC token claims provided by Authelia. To make a user an Admin, Authelia must send a specific group in the
groupsclaim, and OpenCloud must be configured to evaluate this claim.Architecture Overview
Here is a quick look at the setup:
Step-by-Step Configuration
1. LLDAP:
Create a group in LLDAP (e.g.,
admin) and assign your administrator user to this group. This group will be passed down the chain.2. Authelia (
configuration.yml):Ensure that Authelia fetches the groups from LLDAP and that your OpenCloud OIDC client is allowed to request the
groupsscope.In your OIDC clients section for OpenCloud, make sure the scopes look like this:
3. OpenCloud (
docker-compose.yml):You need to explicitly tell the OpenCloud proxy to use the OIDC token to assign roles. By default, OpenCloud/oCIS grants the Admin role to users who are members of the
admingroup.Add the following environment variables to your OpenCloud container:
How it works:
When your user logs in, Authelia authenticates against LLDAP and reads the group membership (
admin). Authelia creates an OIDC token containing the claim"groups": ["admin"]. When OpenCloud receives this token, the Proxy evaluates thegroupsclaim (PROXY_ROLE_ASSIGNMENT_DRIVER=oidc). Because the user is in theadmingroup, OpenCloud automatically elevates the user's role to Administrator, giving you access to the Admin Settings in the UI.All reactions