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

docs: add warning against accepting untrusted credentials #598

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

Conversation

bshaffer
Copy link
Contributor

No description provided.

@bshaffer bshaffer requested a review from a team as a code owner January 16, 2025 21:55
* external source for authentication to Google Cloud Platform, you must validate it before
* providing it to any Google API or library. Providing an unvalidated credential configuration to
* Google APIs can compromise the security of your systems and data. For more information
* {@see https://cloud.google.com/docs/authentication/external/externally-sourced-credentials}

Choose a reason for hiding this comment

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

can you put the warning as part of the method that loads any json/file/stream and builds an appropriate cred for it.

See https://github.com/googleapis/google-auth-library-python/pull/1655/files as an example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only issue there is that we would need to add it to ApplicationDefaultCredentials::getCredentials, ApplicationDefaultCredentials::getMiddleware, ApplicationDefaultCredentials::getIdTokenCredentials, ApplicationDefaultCredentials::getIdTokenMiddleware, and ApplicationDefaultCredentials::getIdTokenProxyCredentials. I can do it, but it just seems a bit over-verbose. Since it applies to essentially every method in the class, it makes more sense to me to add it at the top of the class.

Choose a reason for hiding this comment

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

Sounds good.

Choose a reason for hiding this comment

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

Actually .Net has similar case. looks ok to update everywhere googleapis/google-api-dotnet-client#2916

@sai-sunder-s sai-sunder-s added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Indicates a pull request not ready for merge, due to either quality or timing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants