-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Rename default value of Attribute
configuration parameter to Authorization
from authorization
#8994
Rename default value of Attribute
configuration parameter to Authorization
from authorization
#8994
Comments
As mentioned in the other issue, just changing from "A" to "a" would break gRPC. We'd need a way to match this header in a case-insensitive manner. |
Got it! @jpkrohling I would like to implement this special case insensitivity only for default (Auth and fallback auth). In other cases I am planning to make it case sensitive. Does this sound good? |
Perhaps. Note that the RFC for the HTTP spec states that headers are case insensitive. So, a user specifying "authorization" would correctly expect we match both "authorization" and "auTHOrization". Perhaps we should do an optimistic lookup first, and do a case-insensitive search if no values are found? |
Before this change, users would make references to headers such as "authorization" and "X-CloudFront-Viewer-Latitude", which would potentially fail, as they would be stored in the context as "X-Cloudfront-Viewer-Latitude" or "Authorization". This PR changes this behavior, to attempt a case insensitive lookup to the backing map in case the key wasn't found under the requested casing. Under the assumption that the lookup key specified by users won't change, on a subsequent lookup, we proactively copy the value to the looked up key, to make the next lookup faster. Fixes open-telemetry#5610 Fixes open-telemetry/opentelemetry-collector-contrib#8994 Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Before this change, users would make references to headers such as "authorization" and "X-CloudFront-Viewer-Latitude", which would potentially fail, as they would be stored in the context as "X-Cloudfront-Viewer-Latitude" or "Authorization". This PR changes this behavior, to attempt a case insensitive lookup to the backing map in case the key wasn't found under the requested casing. Under the assumption that the lookup key specified by users won't change, on a subsequent lookup, we proactively copy the value to the looked up key, to make the next lookup faster. Fixes open-telemetry#5610 Fixes open-telemetry/opentelemetry-collector-contrib#8994 Signed-off-by: Juraci Paixão Kröhling <[email protected]>
* Change metadata lookup to be case insensitive Before this change, users would make references to headers such as "authorization" and "X-CloudFront-Viewer-Latitude", which would potentially fail, as they would be stored in the context as "X-Cloudfront-Viewer-Latitude" or "Authorization". This PR changes this behavior, to attempt a case insensitive lookup to the backing map in case the key wasn't found under the requested casing. Under the assumption that the lookup key specified by users won't change, on a subsequent lookup, we proactively copy the value to the looked up key, to make the next lookup faster. Fixes #5610 Fixes open-telemetry/opentelemetry-collector-contrib#8994 Signed-off-by: Juraci Paixão Kröhling <[email protected]> * Add changelog entry Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Prior Art: open-telemetry/opentelemetry-collector#4982
The client libraries (OAuth2) usually set the authorization tokens as "Authorization: <>". Currently, by default OIDC extension looks for "authorization" header key.
The text was updated successfully, but these errors were encountered: