-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
JWT Claim to Header extraction fails when claim is a URL-like string #33603
Comments
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
i'll volunteer to take a look into this |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions. |
I'm going to have some free time soon (in between jobs). Can I help to assess this in any way? @derekargueta, how can I help? The issue became stale in the meantime... |
This is because of a poorly documented feature of "nested claim" support. Dot is interpreted as a separator. |
What would be the best way to handle this then? Should the jet_verify_lib handle these situations or should it be handled before reaching it? I think ideally in the base lib, but I'm afraid I don't know enough C++ to handle that change nor do I know how receptive google is to PRs |
I think the base library should not be interpreting the keys and let Envoy handle tree-walking. |
Turns out, there's actually an open PR on the |
When attempting to perform a JWT Claim to Header extraction, envoy will fail to do the extraction if the claim is a URL-like string, for instance
http://example.org/some_claim
, and the fail is possibly silently, as I've been unable to locate logs with the failure.Given a claim like
on the resulting request headers, the claim
"http://example.org/parent_token": "xyz"
will not have been extracted.Here's the
claim_to_headers
block:In order to show this, I've created a docker compose based reproduction at CelsoSantos/envoy-jwt-claim-extraction, which contains a README.md detailing the steps to reproduce and showcase the issue.
Now, there are some open questions here, namely:
jwt
logs nor others inspected. Which log should expose the error message?The text was updated successfully, but these errors were encountered: