-
Notifications
You must be signed in to change notification settings - Fork 704
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
feat(bom): read application default creds if available #794
Conversation
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.
Thanks for adding this.
requestInitializer = GoogleCredentials.setHttpTimeout(GoogleCredential.getApplicationDefault()); | ||
log.info("Loaded application default credential for reading BOMs & profiles."); | ||
} catch (Exception e) { | ||
requestInitializer = GoogleCredentials.retryRequestInitializer(); |
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.
Because credentials are not normally required in a standard use case scenario, the message details are probably distracting -- at least if they are because there no credentials. If the error is a problem with actual supplied credentials then that would be interesting.
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.
That's fair - I added this since I thought you might find it useful when getting started, especially because there will be no other indication (other than a 401 when trying to read) that your creds may not have been loaded. Is that 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.
your call. I'm not sure of the context of this call. I assumed that the generated exception would be different if you did not have credentials vs if they were invalid. For example if you arent on GCP and dont have the environment variable set then I dont think the exception message would be useful and unlikely relevant.
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.
relegated to log.debug
No description provided.