Open willthames opened 1 year ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: willthames Once this PR has been reviewed and has the lgtm label, please assign nareddyt for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Hi @willthames. Thanks for your PR.
I'm waiting for a google member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
I'll mark this as draft while I work on getting the CLA sorted.
/ok-to-test
Private namespaced claims are recommended to be prefixed with URLs
Can you link to a specification that mentions this?
https://auth0.com/docs/secure/tokens/json-web-tokens/create-custom-claims#namespaced-guidelines
See also https://github.com/quarkusio/quarkus/issues/26185 for a similar issue in another library
It might only be auth0 who recommend this, but auth0 are a major advocate of JWT (they seem to be behind jwt.io for example)
I ran into this issue while trying to extract namespaced JWT claims into headers with envoy.
The JWT RFC (https://datatracker.ietf.org/doc/html/rfc7519#section-4.2) mentions using a domain name as a "Collision-Resistant Name" for claims and includes an example elsewhere using a domain namespaced claim:
{
"iss":"joe",
"exp":1300819380,
"http://example.com/is_root":true
}
I also ran into this issue with Envoy and have been trying to figure out a way to handle this. For Envoy it's not critical because we can use Lua scripting/filters to process the claim and place it in a header, but to solve this within Envoy source "natively" it would be way better if this lib had the support rather than having to work around it.
Private namespaced claims are recommended to be prefixed with URLs, but having dots in domain names means that working out nested key structure by splitting on dots doesn't work.
Instead we assume that if a claim starts with http:// or https:// then everything up to the third slash is part of the top-level key
So https://example.com/nested.claims.key gets treated as https://example.com/nested -> claims -> key