Skip to content

[OID4VCI] Migrate OID4VCIssuerWellKnownProviderTest#47313

Merged
mposolda merged 1 commit intokeycloak:mainfrom
tdiesler:ghi47296
Mar 27, 2026
Merged

[OID4VCI] Migrate OID4VCIssuerWellKnownProviderTest#47313
mposolda merged 1 commit intokeycloak:mainfrom
tdiesler:ghi47296

Conversation

@tdiesler
Copy link
Copy Markdown
Contributor

@tdiesler tdiesler commented Mar 20, 2026

closes #47296

Copy link
Copy Markdown
Contributor

@Ogenbertrand Ogenbertrand left a comment

Choose a reason for hiding this comment

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

Hello @tdiesler !
Thanks for the PR, i left a few comments could you check them ?

String acceptHeader = session.getContext().getRequestHeaders().getHeaderString(HttpHeaders.ACCEPT);
boolean preferJwt = acceptHeader != null && acceptHeader.contains(MediaType.APPLICATION_JWT);
boolean signedMetadataEnabled = Boolean.parseBoolean(realm.getAttribute(SIGNED_METADATA_ENABLED_ATTR));
boolean signedMetadataEnabled = realm.getAttribute(SIGNED_METADATA_ENABLED_ATTR, true);
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.

Defaulting this to true changes signed issuer metadata from opt-in to opt-out.

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.

Yes, and to be honest I don't quite understand why "opt-out" is even necessary. The caller decides (with the Accept header) which format they want.

Is there a reason why we would deny signed metadata when asked for?

Copy link
Copy Markdown
Contributor

@Ogenbertrand Ogenbertrand Mar 25, 2026

Choose a reason for hiding this comment

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

Thanks for the feedback @tdiesler !

This is my understanding of this part from the spec, I may be wrong please correct me.

Accept: application/jwt only tells the issuer that the wallet can consume signed metadata, it does not require the issuer to return it. In 11.2.2 the spec makes unsigned JSON mandatory and signed metadata optional: the issuer MUST support application/json, but only MAY support signed metadata, and matching the requested media type is only RECOMMENDED when supported. Then 11.2.3 treats signed metadata as a trust-bearing artifact that the wallet must validate and trust, so this is an issuer capability/policy choice, not just a formatting choice. Because of that, defaulting SIGNED_METADATA_ENABLED_ATTR to true is still a behavioral change from opt-in to opt-out, the spec allows signed metadata, but it does not require us to enable it by default.

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.

Sure, but we do support it. Hence, we can match the requested media type as RECOMMENDED. I'm looking for a valid reason on why it is beneficial to turn it off, is there?

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.

No further points thanks for clarifying me.

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.

What do we do here ? Leave it as is or remove SIGNED_METADATA_ENABLED_ATTR altogether?

Copy link
Copy Markdown
Contributor

@Ogenbertrand Ogenbertrand Mar 25, 2026

Choose a reason for hiding this comment

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

I'll say we should remove it SIGNED_METADATA_ENABLED_ATTR.

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.

+1 for remove SIGNED_METADATA_ENABLED_ATTR . In case that caller uses Accept: application/jwt request header, the response might be signed. With any other Accept header (or without Accept), it might be better to respond with unsigned response. That is also what is done by OIDC well-known endpoint AFAIK.

If the attribute is removed in this PR, it would be needed to update also admin console UI and remove the attribute from the UI and make sure that attributes like "Signed Metadata Lifespan" and "Signed Metadata Signing Algorithm" are always visible in the admin console UI

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.

+1 for remove SIGNED_METADATA_ENABLED_ATTR . In case that caller uses Accept: application/jwt request header, the response might be signed. With any other Accept header (or without Accept), it might be better to respond with unsigned response. That is also what is done by OIDC well-known endpoint AFAIK.

If the attribute is removed in this PR, it would be needed to update also admin console UI and remove the attribute from the UI and make sure that attributes like "Signed Metadata Lifespan" and "Signed Metadata Signing Algorithm" are always visible in the admin console UI

I'll handle this in the UI @mposolda !

@tdiesler tdiesler force-pushed the ghi47296 branch 2 times, most recently from 25d8e78 to 29b58fc Compare March 25, 2026 08:13
@mposolda mposolda self-assigned this Mar 25, 2026
@tdiesler tdiesler force-pushed the ghi47296 branch 2 times, most recently from db5622d to 56cff44 Compare March 25, 2026 11:53
@tdiesler
Copy link
Copy Markdown
Contributor Author

@Ogenbertrand is this good to go or shall we remove SIGNED_METADATA_ENABLED_ATTR?

Copy link
Copy Markdown
Contributor

@mposolda mposolda left a comment

Choose a reason for hiding this comment

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

Added comment inline to the existing conversation.

String acceptHeader = session.getContext().getRequestHeaders().getHeaderString(HttpHeaders.ACCEPT);
boolean preferJwt = acceptHeader != null && acceptHeader.contains(MediaType.APPLICATION_JWT);
boolean signedMetadataEnabled = Boolean.parseBoolean(realm.getAttribute(SIGNED_METADATA_ENABLED_ATTR));
boolean signedMetadataEnabled = realm.getAttribute(SIGNED_METADATA_ENABLED_ATTR, true);
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.

+1 for remove SIGNED_METADATA_ENABLED_ATTR . In case that caller uses Accept: application/jwt request header, the response might be signed. With any other Accept header (or without Accept), it might be better to respond with unsigned response. That is also what is done by OIDC well-known endpoint AFAIK.

If the attribute is removed in this PR, it would be needed to update also admin console UI and remove the attribute from the UI and make sure that attributes like "Signed Metadata Lifespan" and "Signed Metadata Signing Algorithm" are always visible in the admin console UI

@tdiesler tdiesler force-pushed the ghi47296 branch 3 times, most recently from 95cdc3f to 784b037 Compare March 26, 2026 09:50
@Ogenbertrand
Copy link
Copy Markdown
Contributor

I opened this ticket for the UI @mposolda, @tdiesler: #47476.
If you approve, i'll start working on it.

@tdiesler
Copy link
Copy Markdown
Contributor Author

I opened this ticket for the UI @mposolda, @tdiesler: #47476. If you approve, i'll start working on it.

Can we get this merged without the UI work?

@mposolda
Copy link
Copy Markdown
Contributor

I opened this ticket for the UI @mposolda, @tdiesler: #47476. If you approve, i'll start working on it.

Can we get this merged without the UI work?

Will be better to rather not merge this without UI work as then we effectively introduce bug by merging this PR (due the fact that admin console UI would have a switch with no functionality and meaning).

@Ogenbertrand If it is OK for you, you can possibly cherry-pick commits by @tdiesler from this branch and add your commit(s) on top of it with updates to UI. Then you send the dedicated PR with both changes from this PR and UI changes. Then we can close this PR. Does this work?

@mposolda
Copy link
Copy Markdown
Contributor

I opened this ticket for the UI @mposolda, @tdiesler: #47476. If you approve, i'll start working on it.

Can we get this merged without the UI work?

Will be better to rather not merge this without UI work as then we effectively introduce bug by merging this PR (due the fact that admin console UI would have a switch with no functionality and meaning).

@Ogenbertrand If it is OK for you, you can possibly cherry-pick commits by @tdiesler from this branch and add your commit(s) on top of it with updates to UI. Then you send the dedicated PR with both changes from this PR and UI changes. Then we can close this PR. Does this work?

Just seeing that you already sent the UI PR #47515 :-) Addressing UI changes beforehand works as well instead of both changes (Server and UI) in the same PR. I hope I can merge this PR once UI PR #47515 is OK and merged.

@Ogenbertrand
Copy link
Copy Markdown
Contributor

I opened this ticket for the UI @mposolda, @tdiesler: #47476. If you approve, i'll start working on it.

Can we get this merged without the UI work?

Will be better to rather not merge this without UI work as then we effectively introduce bug by merging this PR (due the fact that admin console UI would have a switch with no functionality and meaning).

@Ogenbertrand If it is OK for you, you can possibly cherry-pick commits by @tdiesler from this branch and add your commit(s) on top of it with updates to UI. Then you send the dedicated PR with both changes from this PR and UI changes. Then we can close this PR. Does this work?

I missed this comment @mposolda, i'll focus on addressing any comment i recieve here: #47515 today, sorry i missed your message.

@tdiesler tdiesler force-pushed the ghi47296 branch 4 times, most recently from e4de9d0 to 97ef3bc Compare March 27, 2026 12:43
Copy link
Copy Markdown

@keycloak-github-bot keycloak-github-bot Bot left a comment

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.MultipleTabsLoginTest#testLoginAfterLogoutFromDifferentTab

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...
java.lang.RuntimeException: Error during saving the screenshot!
	at org.arquillian.extension.recorder.screenshooter.browser.impl.BrowserScreenshooter.takeScreenshot(BrowserScreenshooter.java:127)
	at org.arquillian.extension.recorder.screenshooter.browser.impl.TakeScreenshotAndReportService.takeScreenshotAndReport(TakeScreenshotAndReportService.java:60)
	at org.arquillian.extension.recorder.screenshooter.browser.impl.ScreenshotTaker.onTakeScreenshot(ScreenshotTaker.java:79)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#loginActionWithoutExecution

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#multipleTabsParallelLoginTestWithAuthSessionExpiredAndRequiredAction

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#expiredAuthenticationAction_expiredCodeExpiredExecution

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#testWithAuthSessionExpiredInTheMiddle_badRedirectUri

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#testEmptyBaseUrl

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#testRestartFailureWithDifferentClientAfterAuthSessionExpiration

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#expiredAuthenticationAction_currentCodeExpiredExecution

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#testLogoutDifferentBrowserWithAuthenticationSessionStillPresent

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#multipleTabsLoginAndPassiveCheck

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#multipleTabsParallelLoginTestWithAuthSessionExpiredInTheMiddle

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#loginActionWithoutExecutionInRequiredActions

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#multipleTabsParallelLoginTestWithAuthSessionExpiredAndRefreshInTab1

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#testLoginPageRefresh

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#loginWithDifferentClients

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#multipleTabsParallelLoginTestWithAuthSessionExpiredAndRegisterClick

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#multipleTabsParallelLoginTest

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#expiredAuthenticationAction_expiredCodeCurrentExecution

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

org.keycloak.testsuite.forms.MultipleTabsLoginTest#testInjectRedirectUriInClientDataAfterAuthSessionExpiration

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.TimeoutException: 
timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=146.0.7680.164)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1008-azure', java.version: '25.0.2'
...

Report flaky test

Copy link
Copy Markdown

@keycloak-github-bot keycloak-github-bot Bot left a comment

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.broker.KcOidcBrokerTest#loginWithExistingUserWithBruteForceEnabled

Keycloak CI - Java Distribution IT (windows-latest - temurin - 21)

org.openqa.selenium.TimeoutException: 
Expected condition failed: waiting for value to contain (ignoring case) "sign in to". Current value: "AUTH_RESPONSE" (tried for 5 second(s) with 500 milliseconds interval)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Windows Server 2025', os.arch: 'amd64', os.version: '10.0', java.version: '21.0.10'
Driver info: org.jboss.arquillian.drone.webdriver.htmlunit.DroneHtmlUnitDriver_ByGraphene
...

Report flaky test

Copy link
Copy Markdown
Contributor

@mposolda mposolda left a comment

Choose a reason for hiding this comment

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

@tdiesler @Ogenbertrand Thanks again for the updates and review!

@mposolda mposolda merged commit 8cb5f95 into keycloak:main Mar 27, 2026
84 checks passed
@tdiesler tdiesler deleted the ghi47296 branch March 27, 2026 15:30
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.

[OID4VCI] Migrate OID4VCIssuerWellKnownProviderTest

3 participants