8000 [OID4VCI-HAIP] Pass oid4vci-1_0-issuer-fail-invalid-client-attestation-pop-signature (blocked) by tdiesler · Pull Request #47605 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

[OID4VCI-HAIP] Pass oid4vci-1_0-issuer-fail-invalid-client-attestation-pop-signature (blocked) - #47605

Closed
tdiesler wants to merge 3 commits into
keycloak:mainfrom
tdiesler:ghi47584
Closed

tdiesler wants to merge 3 commits into
keycloak:mainfrom
tdiesler:ghi47584

Conversation

@tdiesler
@tdiesler tdiesler commented Mar 30, 2026 •
Copy link
Copy Markdown
Contributor

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

Hello @tdiesler - I reviewed the last commit of the PR and a few comments. Not sure if it is the only relevant commit of the PR.

Comment on lines +69 to +74
try {
Signature verifier = getSignature(input.getHeader().getAlgorithm());
verifier.initVerify(publicKey);
verifier.update(input.getEncodedSignatureInput().getBytes(StandardCharsets.UTF_8));
byte[] derSignature = transcodeSignatureToDER(input.getSignature());
return verifier.verify(derSignature);
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 code is very critical. We never know what slight error may be overlooked in the implementation of transcodeSignatureToDER below. I think it is preferable you reuse the ECDSASignatureVerifierContext class or at least the methods it reuses.

public boolean verify(byte[] data, byte[] signature) throws VerificationException {
try {
int expectedSize = ECDSAAlgorithm.getSignatureLength(getAlgorithm());
byte[] derSignature = ECDSAAlgorithm.concatenatedRSToASN1DER(signature, expectedSize);
return super.verify(data, derSignature);
} catch (Exception e) {

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.

I also fail to notice tests for the added logic. Is it done in another PR? I think it is really important to have some, especially with the introduction of ECDSAProvider.

@tdiesler tdiesler changed the title [OID4VCI-HAIP] Pass oid4vci-1_0-issuer-fail-invalid-client-attestation-pop-signature [OID4VCI-HAIP] Pass oid4vci-1_0-issuer-fail-invalid-client-attestation-pop-signature (blocked) Apr 8, 2026
@tdiesler
tdiesler force-pushed the ghi47584 branch 4 times, most recently from 75bcb79 to 51bbe31 Compare April 10, 2026 06:10
@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.cluster.UserFederationInvalidationClusterTest#crudWithFailover

Keycloak CI - Clustering IT

java.lang.AssertionError
	at org.junit.Assert.fail(Assert.java:87)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertFalse(Assert.java:65)
	at org.junit.Assert.assertFalse(Assert.java:75)
...

Report flaky test

Signed-off-by: Thomas Diesler <tdiesler@proton.me>
Signed-off-by: Thomas Diesler <tdiesler@proton.me>
…n-pop-signature

Signed-off-by: Thomas Diesler <tdiesler@proton.me>
@tdiesler tdiesler closed this Apr 16, 2026
@tdiesler
tdiesler deleted the ghi47584 branch April 16, 2026 09:28
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-HAIP] Pass oid4vci-1_0-issuer-fail-invalid-client-attestation-pop-signature

2 participants

0