I'm using AWS Elastic Load Balancer to authenticate users, which signs the user claim so that applications can verify the signature and verify that the claims were sent by the load balancer, as described in:
To verify the signature, it is necessary to request the public key located at:
https://public-keys.auth.elb.region.amazonaws.com/key-id
Notice that the key-id is dynamic, and is sent along the JWT on the header, in the kid field.
{
"alg": "algorithm",
"kid": "12345678-1234-1234-1234-123456789012",
"signer": "arn:aws:elasticloadbalancing:region-code:account-id:loadbalancer/app/load-balancer-name/load-balancer-id",
"iss": "url",
"client": "client-id",
"exp": "expiration"
}
At the application level, I want to use Quarkus with smallrye-jwt to verify the JWT. Reading the guide at:
https://quarkus.io/guides/security-jwt#configuration-reference
There is the configuration mp.jwt.verify.publickey.location which accepts a URL, but how do i configure it when the the public key URL from AWS requires a key-id to be extracted from the JWT header?