nextcloud / nextcloud/user_oidc

use flags in regex for "Group whitelist regex"

Open
#1,106 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion question
Dominant language
PHP
Stars
181
Forks
60
Avg merge
7h 34m
Merged PRs (30d)
26

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Feature request

Which Nextcloud Version are you currently using: (see administration page)
31.0.3

Is your feature request related to a problem? Please describe.
Yes, I have multiple groups for my users in a Authentik backend, I want those groups to be automatically provisioned and added to the respective user. Currently this only works with exactly ONE group.
For example I have a user who has three groups in Authentik, let's say they are called "admin", "extern", "temporary", if I use this regular expression (admin|extern|temporary) the user_oidc plugin only matches the first thing it can find, since apparently the regular expression in this plugin doesn't use the /g flag.

Describe the solution you'd like
I'd like to see an option to set flags like /g to make sure multiple matches are possible.

Describe alternatives you've considered
I tired multiple variants of regex and none of them accepts more than the first match. I didn't find any other alternative.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the user_oidc plugin handles the “Group whitelist regex” setting and applies it to Authentik groups. Confirm how regex flags are currently represented, then verify that a user with multiple matching groups has all of them provisioned rather than only the first match.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authentication
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.