8000 [OID4VCI] Migrate OID4VCCredentialOfferMatrixTest by tdiesler · Pull Request #46608 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

[OID4VCI] Migrate OID4VCCredentialOfferMatrixTest - #46608

Closed
tdiesler wants to merge 1 commit into
keycloak:mainfrom
tdiesler:ghi46275
Closed

tdiesler wants to merge 1 commit into
keycloak:mainfrom
tdiesler:ghi46275

Conversation

@tdiesler
@tdiesler tdiesler commented Feb 25, 2026 •
Copy link
Copy Markdown
Contributor

relates to #46275

depends on

#46672

This PR ...

  • migrates OID4VCCredentialOfferMatrixTest
  • Adds support for authorization_code grant in CredentialsOffer
  • provides an OID4VCBasicWallet to support composite message flows

@mposolda
Copy link
Copy Markdown
Contributor

@tdiesler Thanks! I've merged the PR #46356 , which was dependency on this.

Added some comments to your other PR #45985 , which is dependency of this.

In general: It would be easier if for migration of the tests, you send just some "minimal" PR, which would not introduce other changes (especially the changes outside of testsuite) but would migrate ideally only one of the tests. As this PR contains huge amount of changes unrelated to the test migration.

@mposolda mposolda self-assigned this Feb 26, 2026
@tdiesler
tdiesler force-pushed the ghi46275 branch 2 times, most recently from e6eb217 to c5b214d Compare February 26, 2026 09:00
@tdiesler
Copy link
Copy Markdown
Contributor Author

In general: It would be easier if for migration of the tests, you send just some "minimal" PR, which would not introduce other changes (especially the changes outside of testsuite) but would migrate ideally only one of the tests. As this PR contains huge amount of changes unrelated to the test migration.

What you see is the accumulation of a "huge amount" of stuff that built up until #46385 - then came the testsuite "rug pull". I migrated the credential offer matrix test that I had to test authorization_code grant. So yes, this PR might be larger that it would have been when done earlier - it however still the foundation for comprehensive offer matrix testing.

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

Ok, I can try to send alternative PR, which will focus just on migration of some of the test. Will try to check if I can use some of your stuff from this PR. I can do it next week at the earliest as I have also some other stuff to do.

It is generally preferred in KC community to send smaller PRs instead of huge PRs with big amount of changes (especially when changes are stacked on top of other stuff)

CredentialOfferURI credOfferURI = new CredentialOfferURI()
.setIssuer(credOffer.getCredentialIssuer() + "/protocol/" + OID4VC_PROTOCOL + "/" + CREDENTIAL_OFFER_PATH)
.setNonce(offerState.getNonce())
.setTxCode(redactedTxCode);
.setTxCode(offerState.getTxCode());
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.

Not sure why you keep adding this. It is entirely broken

@tdiesler tdiesler Feb 27, 2026 •
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.

The TestResource is not available in the new test suite AFAIK. Perhaps we can agree that we want working tests - I'm using the above to achieve that under current conditions - its not by bad intention.

As soon as a better alternative is available we can use that.

I might want to add that this is only temporary - with credential policies (#46466) we will have this secure-by-default again (i.e. redacted).

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.

Please keep in mind that we can of course move changes from one PR (i.e. this one) to the next (i.e. #46385), but is that really worth it? The latter is the important one. This one contains the test infra borrowed from it.

@tdiesler
Copy link
Copy Markdown
Contributor Author

@mposolda you might have seen - the dependency on oauth.authorizationRequest() is gone

@tdiesler tdiesler changed the title [OID4VCI] Migrate OID4VCI automated tests to the new testsuite [OID4VCI] Migrate OID4VCCredentialOfferMatrixTest Mar 2, 2026
@tdiesler
tdiesler force-pushed the ghi46275 branch 9 times, most recently from 6cf3922 to 60b3fa5 Compare March 2, 2026 19:10
Signed-off-by: Thomas Diesler <tdiesler@ibm.com>
@tdiesler tdiesler closed this Mar 3, 2026
@tdiesler
tdiesler deleted the ghi46275 branch March 3, 2026 06:58
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.

2 participants

0