-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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(auth): add warning about externally-provided credentials #11462
Conversation
65ef727
to
38ec6c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, but consider the comment.
@@ -109,18 +109,50 @@ type CredentialSource struct { | |||
// File is the location for file sourced credentials. | |||
// One field amongst File, URL, Executable, or EnvironmentID should be | |||
// provided, depending on the kind of credential in question. | |||
// | |||
// Important: If you accept a credential configuration (credential |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least for this package we have a security considerations section in the godoc -- perhaps this should be added there. This actually sounds pretty similar to that disclaimer. Wonder if we should just have that sort of message in each of the credential packages instead of putting this on the field docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sai-sunder-s PTAL at Cody's comment above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We mainly need it for the method that loads any arbitrary json. This is what we are doing in other languages.
@codyoss what do you mean by "each credential package"? I thought go doesn't expose per credential type methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing warning is in external account specific section. Do you mean put the warning in the documentation of each cred?
If so, that is not of much use for the issue we are dealing with now. The issue is specifically when a developer accepts cred config from external sources and builds a cred out of it. They expect only certain type like Service Account but they end up accepting other cred types.
So the warning needs to be in a central place like the method used to load arbitrary creds. Maybe it can go at the top of the detect method as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what I was aiming for was having a central section to put such information. I don't love having to maintain the same docs in N places. Would prefer to have it in a single place. I was wondering if having a security section in the package docs would suffice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it needs to be there for the detect method. Additionally can be put in central place as well. We can remove other places added in this PR.
Does that sound ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove the warnings added to this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove other places added in this PR.
Please directly note on this PR which warnings to keep and which to remove.
@@ -109,18 +109,50 @@ type CredentialSource struct { | |||
// File is the location for file sourced credentials. | |||
// One field amongst File, URL, Executable, or EnvironmentID should be | |||
// provided, depending on the kind of credential in question. | |||
// | |||
// Important: If you accept a credential configuration (credential |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove the warnings added to this file
No description provided.