this post was submitted on 22 Feb 2025
8 points (100.0% liked)

Selfhosted

42716 readers
482 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I'm trying to setup owncloud with single sign on using Authentik. I have it working for normal users. There is a feature that allows automatic role assignment to users so that admin users from authentik become admin users for owncloud.

This is described here: https://doc.owncloud.com/ocis/next/deployment/services/s-list/proxy.html#automatic-role-assignments.

In this document, they describe having attributes like

- role_name: admin
  claim_value: ocisAdmin

The problem I have is I don't know how to input this information into an Authentik user. As a result, owncloud is giving me this error:

ERR Error mapping role names to role ids error="no roles in user claims" line=github.com/owncloud/ocis/v2/services/proxy/pkg/userroles/oidcroles.go:84 request-id=5a6d0e69-ad1b-4479-b2d9-30d4b4afb8f2 service=proxy userid=05b283cd-606c-424f-ae67-5d0016f2152c

Any authentik experts out there?

I tried putting this under the attributes section of the user profile in authentik:

role_name: admin
claim_value: ocisAdmin

It doesn't work and it won't let me format YAML like the documentation where the claim_value is a child of the role_name.

top 3 comments
sorted by: hot top controversial new old
[–] truthfultemporarily@feddit.org 2 points 7 hours ago

Roles in authentik are for permissions in authentik. You want a group instead. Group memberships are send via OIDC.

[–] Dunstabzugshaubitze@feddit.org 2 points 8 hours ago

not an authentik user, but after skimming their docs i think you have to:

  1. create a role "ocisAdmin" via authentiks admin interface
  2. give this role to a group in the admin interface or create one.
  3. assign a user thats supposed to be an owncloud admin to the group

it might be that you also have to define somekind of mapper to include this in the informations owncloud receives from authentik, but as i said i only skimmed the docs and would personally just try it without the mapper.

[–] brewery@lemmy.world 1 points 8 hours ago

Reminds me of the group limit attribute in nextcloud. You could try looking at the 'Custom profile scope' section of https://docs.goauthentik.io/integrations/services/nextcloud/ to see if it helps to work out what to do