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

Lack of any logging or debugging flags to assist in troubleshooting #430

Closed
lindsayismith opened this issue May 5, 2020 · 3 comments · Fixed by #435
Closed

Lack of any logging or debugging flags to assist in troubleshooting #430

lindsayismith opened this issue May 5, 2020 · 3 comments · Fixed by #435
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@lindsayismith
Copy link

This plugin goes through a number of steps to try to find credentials. But there's no logging or any way to debug which of the methods was tried, which were unsuccessful, and whether any credentials were returned. I'm trying to work out if my env var is even being seen by this plugin, but there's no way to tell.

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels May 6, 2020
@danoscarmike
Copy link

@lindsayismith what is your env var name and the nature of your credentials?

export GOOGLE_APPLICATION_CREDENTIALS='<path to your service account credentials json>' should do the trick. See https://cloud.google.com/docs/authentication/getting-started#setting_the_environment_variable for more on this set up.

@danoscarmike danoscarmike added type: question Request for information or clarification. Not an issue. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels May 15, 2020
@lindsayismith
Copy link
Author

Hi Dan,

My issue is specifically around the level of logging in this library, not a specific situation. My case is that I'm working on a Maven wagon that handles auth against my teams GCP service (https://github.com/GoogleCloudPlatform/artifact-registry-maven-tools), and our library depends on this one to get application default credentials.

I've been testing the scenario where a maven project is built and deployed from Jenkins using our Wagon. I've been trying to work out how our plugin behaves in different situations and what the right way to set ADC should be as we write guides to our customers. Because the build is running within Jenkins, it's tricky to introspect how that build is run, and what the env variables are, what the system path is, etc, etc.

Because this library has a number of different paths it might take to find ADC, I think it would be very useful, not just for me, but for any customer trying to debug their credential exchange, if there was logging in this library that can explain which steps it has tried and which it settled on. In particular the DefaultCredentialsProvider.java class implements the search strategy, but doesn't give any logging about what steps it is trying or which succeeds.

@danoscarmike danoscarmike added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed type: question Request for information or clarification. Not an issue. labels May 15, 2020
@danoscarmike
Copy link

Ah, OK. Let me investigate some more internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants