Skip to content

How to configure OpenCloud with Authentik as an External OIDC Provider #66

Description

@Daandeve

Hi team,

I'm trying to integrate OpenCloud with Authentik as an external OIDC provider, and I’ve run into a series of configuration issues that I’d like some guidance on.

What I’ve done so far:

  1. Set up Authentik with an OIDC Provider and Application for OpenCloud.
  2. Set the following in .env:
IDP_ISSUER_URL=https://auth.example.com/application/o/opencloud/
IDP_DOMAIN=auth.example.com
IDP_ACCOUNT_URL="https://auth.example.com/if/user/#/settings"
OC_OIDC_CLIENT_ID=xxx
PROXY_ROLE_ASSIGNMENT_OIDC_CLAIM=opencloudRoles
  1. Verified the Authentik JWKS endpoint is reachable.
  2. Enabled offline_access in Authentik scopes.
  3. LDAP provisioning works (after loading a custom schema).

Current issue:

  • After login, user receives “no roles in user claims” error:

    Could not get user roles | error=no roles in user claims
    

    I tried adding a Property Mapping in Authentik:

    roles = ["user"]
    if user.is_superuser and "admin" not in roles:
        roles = ["admin"]
    return {
        "opencloudRoles": roles
    }

    But I return to the Not logged in screen
    Image

Questions:

  1. What is the recommended OIDC claim format for OpenCloud role mapping?
  2. Does OpenCloud expect a specific claim like roles or role_ids?
  3. Is there a known working Property Mapping expression in Authentik that returns roles properly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions