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

Fix X-Id-Token auth header forwarding #1007

Merged
merged 6 commits into from
Oct 2, 2024

Conversation

ivanahuckova
Copy link
Member

Fixes https://github.com/grafana/support-escalations/issues/12471

We have recently changed X-Id-Token header from X-ID-Token to X-Id-Token and infinity was relying on the exact X-ID-Token value. This PR makes the check more robust, and checks for case insensitive form of header. This is the same function as in https://github.com/grafana/grafana-azure-sdk-go/blob/dc5d2b54c53f5ad1d8210508dfecf1775bd7fa1a/azusercontext/from_req.go#L67.

More context in https://raintank-corp.slack.com/archives/C04CHPYT954/p1727793584704099

Fixed functionality:

infinityforward.mov

@ivanahuckova ivanahuckova requested a review from a team as a code owner October 2, 2024 11:16
Copy link
Collaborator

@yesoreyeram yesoreyeram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ivanahuckova
Copy link
Member Author

I have updated PR based on suggestions. Moreover, I had to update tests, but because they are in different package, Ihad to export those auth header names.

@ivanahuckova ivanahuckova merged commit 9d6533c into main Oct 2, 2024
6 checks passed
@ivanahuckova ivanahuckova deleted the ivana/infinity-forward-id-header branch October 2, 2024 14:11
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

Successfully merging this pull request may close these issues.

2 participants