8000 Reject revoked ID tokens in UMA permission grants by tkyjovsk · Pull Request #55502 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Reject revoked ID tokens in UMA permission grants - #55502

Open
tkyjovsk wants to merge 4 commits into
keycloak:mainfrom
tkyjovsk:55383
Open

tkyjovsk wants to merge 4 commits into
keycloak:mainfrom
tkyjovsk:55383

Conversation

@tkyjovsk
Copy link
Copy Markdown
Contributor

Validate realm, client, and user not-before cutoffs before creating a fresh access-token identity. Add a regression test assertin that pre-cutoff ID claim tokens are rejected without issuing an RPT.

Closes #55383.

@stianst stianst added the kind/cve Issues identified as CVEs on third-party dependencies, or issues which Keycloak is not affected label Nov 27, 2026
@tkyjovsk
tkyjovsk marked this pull request as ready for review December 3, 2026 18:13
@tkyjovsk
tkyjovsk requested a review from a team as a code owner December 3, 2026 18:13
Copilot AI balanced review requested due to automatic review settings December 3, 2026 18:13
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

There are no active review issues for the change preventing revoked ID tokens from minting UMA permission tokens.

No open issues 🎉

What changed in this PR

Prevents revoked ID tokens from minting fresh UMA permission tokens, addressing #55383.

Changes:

  • Enforces realm, client, and user not-before cutoffs before creating an access-token identity.
  • Adds regression coverage for rejection, exact-cutoff acceptance, and fresh-token acceptance.
File Description
tests/​base/​src/​test/​java/​org/​keycloak/​tests/​authz/​services/​uma/​UmaStaleIdTokenRevocationTest.java Tests revocation boundaries and verifies rejected requests issue no RPT.
services/​src/​main/​java/​org/​keycloak/​authorization/​common/​KeycloakIdentity.java Validates ID-token not-before policies before constructing the identity.

Review effort: Balanced

@keycloak-github-bot keycloak-github-bot Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unreported flaky test detected, please review

@keycloak-github-bot
Copy link
Copy Markdown

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.adapter.servlet.SAMLServletAdapterTest#salesPostSigTransientTest

Keycloak CI - Adapter IT

org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
...

Report flaky test

org.keycloak.testsuite.adapter.servlet.SAMLServletAdapterTest#salesPostEncSignedAssertionsOnlyTest

Keycloak CI - Adapter IT

org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
...

Report flaky test

Copilot AI balanced review requested due to automatic review settings December 4, 2026 13:48
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

There are no active review issues for the change preventing revoked ID tokens from minting fresh RPTs.

No open issues 🎉

Review effort: Balanced

Validate realm, client, and user not-before cutoffs before creating a fresh access-token identity. Add a regression test assertin that pre-cutoff ID claim tokens are rejected without issuing an RPT.

Signed-off-by: Tomas Kyjovsky <tkyjovsk@ibm.com>
…evocationTest`

Signed-off-by: Tomas Kyjovsky <tkyjovsk@ibm.com>
…ance before revocation and with a fresh token afterward, plus acceptance when iat == notBefore.

Signed-off-by: Tomas Kyjovsky <tkyjovsk@ibm.com>
Signed-off-by: Tomas Kyjovsky <tkyjovsk@ibm.com>
Copilot AI balanced review requested due to automatic review settings December 4, 2026 16:03
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 reported for the change preventing revoked ID tokens from obtaining fresh UMA permission tokens.

No open issues 🎉

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flaky-test kind/cve Issues identified as CVEs on third-party dependencies, or issues which Keycloak is not affected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CVE-2026-133224] Pre-revocation ID tokens can mint fresh UMA RPTs after realm not-before

3 participants

0