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

Verify that the request comes from GCP #45

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

przemub
Copy link

@przemub przemub commented Jan 25, 2024

The underlying GCP Pilot library requests that Google Cloud Tasks signs the request with an OIDC token, but there is no logic to check that in the view.

This is a security vulnerability since the tasks can be run by anyone now.

The underlying GCP Pilot library requests that Google Cloud Tasks signs the request with an OIDC token, but there is no logic to check that in the view.

This is a security vulnerability since the tasks can be run by anyone now.
Copy link

codeclimate bot commented Jan 25, 2024

Code Climate has analyzed commit aa9db5f and detected 0 issues on this pull request.

View more on Code Climate.

Copy link
Contributor

@joaodaher joaodaher left a comment

Choose a reason for hiding this comment

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

For setups that use private Cloud Run instances, the OIDC token is already validated by Cloud Run ingress [ref]. Adding a manual OIDC verification would be redundant.

Although I agree we should definitely allow manual checking for other uses cases, such as public Cloud Run instances. Thus, I'd suggest making this authentication opt-in using a setting (eg. DJANGO_CLOUD_TASKS_AUTH)

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