Skip to content

(26.6) Check consento for JWT Authorization Grant - #52115

Merged
mposolda merged 1 commit into
keycloak:release/26.6from
graziang:backport-52079-26.6
Aug 28, 2026
Merged

mposolda merged 1 commit into
keycloak:release/26.6from
graziang:backport-52079-26.6

Conversation

@graziang

Copy link
Copy Markdown
Contributor

Closes #52028

(cherry picked from commit 99da283)

@graziang
graziang requested a review from a team as a code owner August 27, 2026 07:16
@graziang graziang changed the title Check consento for JWT Authorization Grant (26.6) Check consento for JWT Authorization Grant Aug 27, 2026
Closes keycloak#52028

Signed-off-by: Giuseppe Graziano <g.graziano94@gmail.com>
(cherry picked from commit 99da283)
@graziang
graziang force-pushed the backport-52079-26.6 branch from 96b5351 to a2900eb Compare August 27, 2026 08:21

String scopeParam = getRequestedScopes();

if (!TokenManager.verifyConsentStillAvailable(session, user, client, TokenManager.getRequestedClientScopes(session, scopeParam, client, user))) {

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.

this one differs from the original cherry pick, please can you elaborate on it? thanks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

verifyConsentStillAvailable has been refactored in 26.7 as part of parameterized scopes feature, I'm passing the scope parameter as a stream like before

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.

thanks for the explanation

@lhanusov

Copy link
Copy Markdown
Contributor

there are 2 failures in the compatibility checks

@pskopek pskopek 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.

The backported code looks fine! The test issues are not related to the change (looks like infrastructure issue). We can try to re-run a bit later.

@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.forms.AllowDenyAuthenticatorTest#testDenyAccessWithProperty

Keycloak CI - Forms IT (chrome)

java.lang.AssertionError: Expected LoginUsernameOnlyPage but was localhost (https://localhost:8543/auth/realms/test/protocol/openid-connect/auth?scope=openid&response_type=code&redirect_uri=https%3A%2F%2Flocalhost%3A8543%2Fauth%2Frealms%2Fmaster%2Fapp%2Fauth&client_id=test-app)
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.keycloak.testsuite.pages.AbstractPage.assertCurrent(AbstractPage.java:39)
	at org.keycloak.testsuite.pages.LoginPage.open(LoginPage.java:292)
...

Report flaky test

@mposolda mposolda self-assigned this Aug 27, 2026

@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.forms.AllowDenyAuthenticatorTest#testDenyAccessWithProperty

Keycloak CI - Forms IT (chrome)

java.lang.AssertionError: Expected LoginUsernameOnlyPage but was localhost (https://localhost:8543/auth/realms/test/protocol/openid-connect/auth?scope=openid&response_type=code&redirect_uri=https%3A%2F%2Flocalhost%3A8543%2Fauth%2Frealms%2Fmaster%2Fapp%2Fauth&client_id=test-app)
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.keycloak.testsuite.pages.AbstractPage.assertCurrent(AbstractPage.java:39)
	at org.keycloak.testsuite.pages.LoginPage.open(LoginPage.java:292)
...

Report flaky test

1 similar comment
@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.forms.AllowDenyAuthenticatorTest#testDenyAccessWithProperty

Keycloak CI - Forms IT (chrome)

java.lang.AssertionError: Expected LoginUsernameOnlyPage but was localhost (https://localhost:8543/auth/realms/test/protocol/openid-connect/auth?scope=openid&response_type=code&redirect_uri=https%3A%2F%2Flocalhost%3A8543%2Fauth%2Frealms%2Fmaster%2Fapp%2Fauth&client_id=test-app)
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.keycloak.testsuite.pages.AbstractPage.assertCurrent(AbstractPage.java:39)
	at org.keycloak.testsuite.pages.LoginPage.open(LoginPage.java:292)
...

Report flaky test

@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 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.forms.AllowDenyAuthenticatorTest#testDenyAccessWithProperty

Keycloak CI - Forms IT (chrome)

java.lang.AssertionError: Expected LoginUsernameOnlyPage but was localhost (https://localhost:8543/auth/realms/test/protocol/openid-connect/auth?scope=openid&response_type=code&redirect_uri=https%3A%2F%2Flocalhost%3A8543%2Fauth%2Frealms%2Fmaster%2Fapp%2Fauth&client_id=test-app)
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.keycloak.testsuite.pages.AbstractPage.assertCurrent(AbstractPage.java:39)
	at org.keycloak.testsuite.pages.LoginPage.open(LoginPage.java:292)
...

Report flaky test

@mposolda
mposolda merged commit 8424659 into keycloak:release/26.6 Aug 28, 2026
224 of 260 checks passed
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.

4 participants