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

Use X-Serverless-Authorization instead of Authorization header #25

Merged
merged 2 commits into from
Jul 6, 2023
Merged

Conversation

Rokirok
Copy link
Contributor

@Rokirok Rokirok commented Jul 6, 2023

The usage of X-Serverless-Authorization in the cloud-run-proxy will prevent conflicts with the actual cloud run applications authentication/authorization flow.

If the Authorization header is overwritten by cloud-run-proxy it will in some applications conflict with the app's own authorization logic resulting in an unauthorized request.

X-Serverless-Authorization is a header supported by Identity-Aware-Proxy and it is also supported for google cloud run IAM authorization. If X-Serverless-Authorization and Authorization are both present, cloud run will use X-Serverless-Authorization for authorizing the user and resolving their IAM permissions.

The usage of X-Serverless-Authorization in the cloud-run-proxy will prevent conflicts with the actual cloud run applications authentication/authorization flow.
@google-cla
Copy link

google-cla bot commented Jul 6, 2023

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.

@sethvargo
Copy link
Member

@steren can you confirm this change is correct?

@steren
Copy link

steren commented Jul 6, 2023

The behavior described in the first comment is accurate: https://cloud.google.com/run/docs/authenticating/service-to-service#acquire-token

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.

None yet

3 participants