Skip to content

Keep attribute names containing ':' when they are received verbatim - #263

Merged
dkmstr merged 2 commits into
v5.0from
v5.0-fix/auth-regex-colon-attribute-names
Nov 24, 2026
Merged

dkmstr merged 2 commits into
v5.0from
v5.0-fix/auth-regex-colon-attribute-names

Conversation

@aschumann-virtualcable

Copy link
Copy Markdown
Contributor

The "prefix:attr" syntax of regex fields split every attribute name on the first ':'.
SAML and OAuth2 providers commonly use names such as urn:oid:1.3.6.1.4.1.5923.1.5.1.1 or
URIs, so the lookup used a prefix and a missing attribute, and groups and usernames came
back empty.

The prefix syntax is now applied only when the full name is not among the received
attributes. Existing "prefix:attr" configurations (for example alumno:alumno) keep
working.

Tests:

  • New test: attribute names containing ':' are used verbatim, for URN and claim-URI names.
    It fails without this change.
  • tests/core/util/test_auth_regex.py: 8 passed.
  • tests/auths: 37 passed, excluding the LDAP tests that need uds_ldap_client.

The 4.0 counterpart is not part of this PR.

janpenitent and others added 2 commits November 24, 2026 15:38
The "prefix:attr" syntax split every attribute name on the first ':'.
SAML and OAuth2 providers commonly use URIs or urn:oid names
(e.g. urn:oid:1.3.6.1.4.1.5923.1.5.1.1), which were split into a bogus
prefix and a missing attribute, so groups and usernames came out empty.

Only apply the prefix syntax when the full name is not a received
attribute.
@dkmstr
dkmstr merged commit 4bb7b85 into v5.0 Nov 24, 2026
2 checks passed
@aschumann-virtualcable
aschumann-virtualcable deleted the v5.0-fix/auth-regex-colon-attribute-names branch November 24, 2026 17:14
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.

3 participants