Skip to content
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

Adding a Load Balancer Endpoint like AWS's 'public-keys.auth.elb.' #365

Open
Maxyme opened this issue Feb 2, 2023 · 0 comments
Open

Adding a Load Balancer Endpoint like AWS's 'public-keys.auth.elb.' #365

Maxyme opened this issue Feb 2, 2023 · 0 comments

Comments

@Maxyme
Copy link

Maxyme commented Feb 2, 2023

Would it be possible (or is there already?) to add an endpoint that replicates this functionality?

https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-authenticate-users.html

Basically, in the ALB (Application Load Balancer) flow, a user gets a public key from the public-keys.auth.elb endpoint using the id_token's key_id [kid]:

url = 'https://public-keys.auth.elb.' + region + '.amazonaws.com/' + kid
req = requests.get(url)
pub_key = req.text

In a normal flow with JWKS, using the JWKS endpoint works well (ie.
http://localhost:9229/userpool/.well-known/jwks.json) but it would be nice to have the public key from an endpoint on cognito-local to match AWS's flow with ALBs.

It should be straightforward enough, like using pem = jwkToPem(jwk); and returning the pem from a given endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant