-
Hi, is it possible to use this library in conjunction with a requirement/need to accept a custom, hand-crafted (long-lived) JWT for another system to hit a particular endpoint on the service? In general, we've configured the add-on as a resource-server w/ OIDC integrated with Cognito and that's working great (thank you!!) - but we also need another service to access a particular endpoint with a custom JWT that's generated outside of any OIDC context/issuer. Can that be made to work? Cheers, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Yes, it is possible, but I'd advise you don't do that. You should probably be using If you really want to stick with your idea:
|
Beta Was this translation helpful? Give feedback.
Cognito only solution
Long-lived access tokens are a security risk. As
client_credentials
client side is rather easy to implement, including in most "legacy" systems, it is worth trying to use only Cognito (and short lived access-tokens).Multi-issuers solution
A JWT validation involves checking the payload integrity using the authorization server public key. Spring Security need the JWK-set to configure the JWT decoders (in charge of JWTs decoding and validation). Decoders are configured with the JWK-set (and not the public key directly) because the authorization server can (and should) rotate signing keys.
If you can provide this URI, then you have nothing more to do and tokens will be …