Skip to content

Separate AuthZEN resource and context attributes - #55258

Open
Oluwatobi-Mustapha wants to merge 1 commit into
keycloak:mainfrom
Oluwatobi-Mustapha:authzen-attribute-sources
Open

Oluwatobi-Mustapha wants to merge 1 commit into
keycloak:mainfrom
Oluwatobi-Mustapha:authzen-attribute-sources

Conversation

@Oluwatobi-Mustapha

@Oluwatobi-Mustapha Oluwatobi-Mustapha commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Closes #54848

Policies can now read resource properties and request context separately, even when both use the same name. Existing attributes keep their current behavior: when names overlap, the context value takes precedence.

@Oluwatobi-Mustapha
Oluwatobi-Mustapha requested a review from a team as a code owner November 17, 2026 09:49
Copilot AI balanced review requested due to automatic review settings November 17, 2026 09:49

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 remain for the change separating AuthZEN resource properties from request context.

No open issues 🎉

What changed in this PR

This PR addresses #54848 by letting authorization policies distinguish AuthZEN resource properties from request context, while preserving existing unqualified attributes and context-first precedence.

Changes:

  • Adds separate authzen.resource.properties and authzen.context claim paths.
  • Adds tests for source-specific policy evaluation and legacy precedence.
  • Documents the reserved authzen claim root and compatibility behavior.
File Description
docs/​guides/​securing-apps/​authzen-authorization.adoc Explains source-qualified paths and unqualified attribute precedence.
authzen/​tests/​base/​src/​test/​java/​org/​keycloak/​tests/​authzen/​AuthZenEvaluationTest.java Tests source separation and compatibility; corrects a resource-properties comment.
authzen/​services/​src/​main/​java/​org/​keycloak/​authorization/​authzen/​AuthZenResource.java Centralizes claim creation and exposes both sources under the reserved root.

Review effort: Balanced

Closes keycloak#54848

Signed-off-by: Oluwatobi Mustapha <oluwatobimustapha539@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AuthZEN: resource.properties and context share one attribute namespace, and context silently overrides resource properties

2 participants