Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

IngridPuppet
Copy link
Contributor

@IngridPuppet IngridPuppet commented Oct 20, 2025

I'm sending this PR on behalf of @forkimenjeckayang, on vacation.
Closes #43398

Summary

This PR implements the OID4VC specification requirement to include authorization_details_types_supported in the OAuth Authorization Server metadata endpoint. This enables credential issuance using authorization_details when scope is absent, as required by the OID4VC specification.

Test Coverage

  • Metadata validation: Verifies authorization_details_types_supported is present and contains openid_credential
  • End-to-end flow: Complete credential issuance using authorization_details
  • Cross-reference validation: Ensures credential issuer metadata points to correct OAuth server
  • Feature flag testing: Validates behavior when OID4VC is disabled

…ported` on the Authorization Server metadata

Closes keycloak#43398

Signed-off-by: Ingrid Kamga <[email protected]>
Copy link
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.

@IngridPuppet Thanks, added inline comment.


config.setAuthorizationResponseIssParameterSupported(true);

if (Profile.isFeatureEnabled(Profile.Feature.OID4VC_VCI) && realm.isVerifiableCredentialsEnabled()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we instead retrieve this from available providers? I mean something similar like we're doing for example for retrieve the available signatures? I suppose that something like this may work:

session.getKeycloakSessionFactory().getProviderFactoriesStream(AuthorizationDetailsProcessor.class)
                .map(ProviderFactory::getId)

This automatically handles the case when OID4VC_VCI feature is disabled as in that case the provider factory will be unavailable.

It may also need to instantiate the processor and have new method on the AuthorizationDetailsProcessor like boolean isSupported() with the possible implementation for oid4vci like:

boolean isSupported() {
   return session.getContext().getRealm().isVerifiableCredentialsEnabled();
} 

This approach means that provider_id of the OID4VCAuthorizationDetailsProcessorFactory will need to be changed to be OID4VCAuthorizationDetailsProcessor.OPENID_CREDENTIAL_TYPE, but that is probably OK?

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.

Ensure openid_credential is one of authorization_details_types_supported on the Authorization Server metadata well-known endpoint

2 participants