-
Notifications
You must be signed in to change notification settings - Fork 728
fix(sec): warn users of unsafe credential generation methods #2604
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
Conversation
...-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.java
Outdated
Show resolved
Hide resolved
...-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.java
Outdated
Show resolved
Hide resolved
...-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.java
Outdated
Show resolved
Hide resolved
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.
Thank you!
* @return the credential defined by the credentialStream. | ||
* @throws IOException if the credential cannot be created from the stream. | ||
* @deprecated This method is being deprecated because of a potential security risk. | ||
* Please use {@link <a href="https://javadoc.io/doc/com.google.auth/google-auth-library-oauth2-http/latest/com/google/auth/oauth2/GoogleCredentials.html">GoogleCredentials</a> instead. |
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.
Can you link to cloud rad instead of javadoc?
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.
Will raise a separate PR
Unlike the efforts in the current non-deprecated auth library googleapis/google-auth-library-java#1802 and googleapis/google-auth-library-java#1798, this library is deprecated and promotes usage of google-auth-library-java.
However, we also add a comment with notice of the unsafety of the
fromStream()
methods, repeating the existing note of class deprecation (theGoogleCredential
is already deprecated).This library does not have subclasses for credentials (e.g. service account credentials).