-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Authenticating AWS ALB #73
Comments
Pulling the |
Thanks @zandbelt, The (I previously edited this comment saying the |
I just read up on the Amazon docs and they suggest to use the approach that you have described indeed.... I don't think that makes much sense but it would allow them to rotate the key indeed. I'm not sure if they do, I don't have any experience with it myself, I just added this way back when someone suggested it may be useful. I'm not aware of any users today. Also we don't have a real test environment anymore, just unit tests for this feature that don't rotate the key, as we were not aware this was an option at the time. |
since you suggest ALBs do rotate the key, and they do it frequently, this is functionality that is not usable as it is and it should be fixed; I'm not sure when we'll get to this (we also need to have a real test environment during development and adapt our unit tests), of course a PR is welcome... |
No problems at all, In the mean time, we might just re-authenticate the Cognito token (the X-Amzn-AccessToken) using the And yes, I'll see if I can put together a PR 🤔 can't say I've done much C in my life - to keep the feature "tight", and backwards-compatible (just in case anyone is using
We'd use the ARN to construct the keys endpoint, append the KID, and also verify the ARN = signer inside the token header.
Largely, it would just call the existing eckey_uri to do the actual key verification, but maybe a wrapper to handle the ALB specific stuff. ? |
which supports key rotation, see: OpenIDC/mod_oauth2#73 Signed-off-by: Hans Zandbelt <[email protected]>
it is now done here https://github.com/OpenIDC/liboauth2/tree/alb-ec-key-signer-update ; by accident the unit test initially pulled live keys from AWS and succeeded so I'm pretty convinced that it all works now; please confirm |
Thanks, will test this first thing in the morning (AEST) and get back to you! |
@zandbelt Looks good to me 🚀
Thanks for your help with this one. |
I will merge the branch and release 2.1.0 later this week. Thank you for your contribution! |
Fantastic, can't wait! |
squash-merged and released in https://github.com/OpenIDC/liboauth2/releases/tag/v2.1.0 |
Thanks @zandbelt! You wouldn't happen to know if there are any arm builds available for Deb? Was looking at the repository and couldn't find any in apt |
the 2.1.0 version will take a while to get there, but 2.0.0 is at e.g. https://packages.debian.org/sid/arm64/liboauth2-0/download |
Great thank you! Any reason the ARM builders are commented out in GH actions? Not working? |
yes, not working; vague crashes in make check, perhaps related to memory alignment; I haven't figured that out yet |
Hey OpenIDC team, just wanted to say thanks for putting in so much effort into this module, it's working great for us so far.
We've just come up against one hurdle which I'd love some help with. How should someone verify a token signed by ALB?
Right now we've set this, and it works:
My only concern here is that KID field is hardcoded, just wondering if that should come from the token?
I've had a look through the code, and I can see there is a "peek" happening, so maybe the kid could be grabbed from that?
Second concern is - how do we verify the signer? Is that part of the scope for OAuth2TokenVerify, or should we just have a seperate Require oauth2_claim signer XXX for that?
The text was updated successfully, but these errors were encountered: