8000 AuthZEN allow configurable subject lookup semantics · Issue #48288 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

AuthZEN allow configurable subject lookup semantics #48288

Description

@ryanemerson

Description

#48287 makes it so the default user lookup is based upon username, but in some circumstances it may be desirable for user looks up to still be based up the Keycloak UUID or email.

We can cater for this by making use of namespaces in the subject.id field.

ID:

"subject": {
    "type": "user",
    "id": "id:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"
}

Username:

"subject": {
    "type": "user",
    "id": "username:alice"
}

Email:

"subject": {
    "type": "user",
    "id": "email:alice@example.org"
}

When no namespace is present, we can have the following fallback strategy:

  • If the subject.id is in UUID format, lookup by ID
  • Else lookup by username

We can't attempt to fallback to email lookups if @ is present as this can also be in usernames. If duplicate emails are allowed in the realm settings, then requests using the email namespace, e.g. subject.id: "email: ..." should return a 400 Bad Request response.

Activity

  1. added this to the Future milestone on Apr 20, 2026
  2. self-assigned this
    on Apr 22, 2026
  3. changed the title [-]Allow user lookups based upon Keycloak UUID[/-] [+]AuthZEN Allow user lookups based upon Keycloak UUID[/+] on Apr 22, 2026
  4. changed the title [-]AuthZEN Allow user lookups based upon Keycloak UUID[/-] [+]AuthZEN Allow configurable subject lookup semantics[/+] on Apr 30, 2026
  5. changed the title [-]AuthZEN Allow configurable subject lookup semantics[/-] [+]AuthZEN allow configurable subject lookup semantics[/+] on Apr 30, 2026
  6. added a commit that references this issue on Apr 30, 2026
    fb2fcd9
  7. added a commit that references this issue on Apr 30, 2026
    4d142ea
  8. 31 remaining items

  9. added a commit that references this issue on Jul 20, 2026
    e03af9b
  10. removed this from the Future milestone on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Fields

No fields configured for task.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

0