You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These lines enforce that a JWT contains the claim upd. Unfortunately it is impossible to suppress this behavior. When you look at https://docs.oracle.com/en/cloud/paas/identity-cloud/rest-api/ClientAssertion.html, you see JWTs that Oracle IDCS/IAM Domains would expect. With the lines above the request will always fail as extra/unexpected claims lead to rejection
The text was updated successfully, but these errors were encountered:
Currently the upn claim is always added to JWT created by Helidon. It will contain either upn claim, or preferred username, or subject (depending on what is configured when creating the JWT).
We do not have support for excluding claims from the generated JWT - this could be added to the builder, but when we create a JWT from JSON, we still set it from the other claims.
What could be done:
add a builder option "exclude claims", or "upn as configured"
add a method to JWT to return the configured upn, instead of the "guessed one"
when adding claims to serialized JWT, use the first option to either use the "guessed" upn or the explicitly configured one (which may not be present at all)
A solution could be for Jwt.userPrincipal() to return the value of the "upn" claim if present, otherwise the "preferred_username" value if present, otherwise the "sub" value if present. And the Jwt constructors to set userPrincipal based solely on "upn".
helidon/security/jwt/src/main/java/io/helidon/security/jwt/Jwt.java
Lines 273 to 275 in 84123e8
These lines enforce that a JWT contains the claim
upd
. Unfortunately it is impossible to suppress this behavior. When you look at https://docs.oracle.com/en/cloud/paas/identity-cloud/rest-api/ClientAssertion.html, you see JWTs that Oracle IDCS/IAM Domains would expect. With the lines above the request will always fail as extra/unexpected claims lead to rejectionThe text was updated successfully, but these errors were encountered: