8000 Add possibility to include organization name to organization claim by tahvane1 · Pull Request #54978 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Add possibility to include organization name to organization claim - #54978

Open
tahvane1 wants to merge 4 commits into
keycloak:mainfrom
tahvane1:main
Open

tahvane1 wants to merge 4 commits into
keycloak:mainfrom
tahvane1:main

Conversation

@tahvane1
Copy link
Copy Markdown

This pr provides possibility to include organization name in organization claim.

Signed-off-by: Erkka Tahvanainen <erkka.tahvanainen@confidently.fi>
@tahvane1
tahvane1 requested review from a team as code owners November 10, 2026 11:26
Copilot AI balanced review requested due to automatic review settings November 10, 2026 11:26
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The organization-name option is missing from the Admin Console configuration, and enabling it alone with the default String claim type discards names and emits only organization aliases.

2 open issues
What changed in this PR

This PR extends the OIDC organization membership mapper to optionally include organization names in token claims.

Changes:

  • Adds an addOrganizationName option and conditional name mapping.
  • Adds English Admin Console label and help text for the option.
File Description
services/​src/​main/​java/​org/​keycloak/​organization/​protocol/​mappers/​oidc/​OrganizationMembershipMapper.java Adds configuration and claim mapping for organization names.
js/​apps/​admin-ui/​maven-resources/​theme/​keycloak.v2/​admin/​messages/​messages_en.properties Adds the option’s English label and help text.

Review effort: Balanced

Signed-off-by: Erkka Tahvanainen <erkka.tahvanainen@confidently.fi>
Copilot AI balanced review requested due to automatic review settings November 10, 2026 12:51
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Enabling only “Add organization name” with the default String claim type silently discards organization names because the mapper does not promote the claim type to JSON.

1 open issue
1 resolved since last review

Review effort: Balanced

Signed-off-by: Erkka Tahvanainen <erkka.tahvanainen@confidently.fi>
Copilot AI balanced review requested due to automatic review settings November 10, 2026 13:50
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new organization-name claim option lacks test coverage for names differing from aliases, automatic JSON selection, and disabled or single-valued behavior.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment on lines +205 to +206
if (isAddOrganizationName(model)) {
claims.put("name", o.getName());
Signed-off-by: Erkka Tahvanainen <erkka.tahvanainen@confidently.fi>
Copilot AI balanced review requested due to automatic review settings November 10, 2026 14:08
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are identified for the opt-in organization display-name claim change.

1 open issue

Review effort: Balanced

@tahvane1 tahvane1 changed the title Add possibility to include organizatio name to organization claim Add possibility to include organization name to organization claim Nov 10, 2026
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.

2 participants

0