-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a config to prevent thumbprint converting to hex before encoding #2331
Conversation
...so2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/OAuth2Util.java
Outdated
Show resolved
Hide resolved
…nverting to hex in jwks endpoint
…pecification" This reverts commit 257ce78.
PR builder started |
PR builder completed |
JWK parsedJWK = JWK.parse(certificate); | ||
jwk.x509CertSHA256Thumbprint(parsedJWK.getX509CertSHA256Thumbprint()); | ||
} else { | ||
jwk.x509CertSHA256Thumbprint(new Base64URL(OAuth2Util.getThumbPrint(certificate, alias))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will produce double encoding right? Wihtin the getThumbprint method aren't we encode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Base64URL is just taking the string value and create a Base64URL instance where it doesn't encode it again. hence this won't be a problem
PR builder started |
This reverts commit 928f731.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, since this is a behavioural change please initiate and migration issue
PR builder completed |
Proposed changes in this pull request
Fix wso2/product-is#18817
As per the specifications (RFC7515) the
x5t#s256
value of the JWKS endpoint should be,Hence, this will revert the #2128 and use the JWK library to get the
x5t#S256
value.For the backward compatibility a config has been introduced.
If someone wants to hexify the thumbprint, add following config to the deployment.toml file
Before the Fix
x5t#S256
jwks response
After the Fix
x5t#S256
jwks response
Related PR
Related Issue