Skip to content
Discussion options

You must be logged in to vote

Hi Max, it looks like you've found a gap in our test coverage and documentation, and I've opened a PR to address it: #3122

Root cause: When using the default Keycloak ERS, subject mapping conditions are evaluated against the Keycloak user object, not the raw JWT claims. The ERS extracts preferred_username from your token, calls the Keycloak Admin API to fetch the full user record, and flattens that object for evaluation. A custom Keycloak user attribute department: ["Finance"] appears in the flattened object as:

.attributes.department[]  → "Finance"
.attributes.department[0] → "Finance"

There is no .department key. This means the selector .department never matches, even though your JWT c…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@mm192010
Comment options

@marythought
Comment options

@mm192010
Comment options

@marythought
Comment options

@mm192010
Comment options

Answer selected by mm192010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants