-
Notifications
You must be signed in to change notification settings - Fork 25
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
[VC-36032] Log the client-id when VenafiCloudKeypair authentication is used #625
Conversation
To help debugging authentication problems Signed-off-by: Richard Wall <richard.wall@venafi.com>
@@ -401,7 +406,8 @@ func ValidateAndCombineConfig(log logr.Logger, cfg Config, flags AgentCmdFlags) | |||
" - Use --api-token if you want to use the " + string(JetstackSecureAPIToken) + " mode.\n") | |||
} | |||
res.AuthMode = mode | |||
log.Info(reason) | |||
keysAndValues = append(keysAndValues, "mode", mode, "reason", reason) | |||
log.V(logs.Debug).Info("Authentication mode", keysAndValues...) |
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 changed this to a Debug log, so it will not be shown by default. Why? Because I thought it might be desirable to keep the logs as quiet as possible by default, while allowing these details to be logged in the case of problems.
I'm also not sure if the client-id is sensitive information...is there any risk in logging it?
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 client ID is just like a username I think. The difference being that it isn't a personal information (this GRPD course I had the other day made me start worrying about these things 😁). So I'd say that there is no problem displaying the client ID.
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 changes look good, and thank you for taking into account the log volume.
That said, it is only 1 log line and would only write once at startup, so perhaps it could just be an info level log? I'm not too fusses, just a suggestion :)
What is that default --log-level
set to? Or is it not set on deployment?
I am just trying to think how a user would enable this, either directly through helm or venctl
.
I added some notes to the Helm chart values and README in #627 jetstack-secure/deploy/charts/venafi-kubernetes-agent/values.yaml Lines 148 to 159 in 98afe3b
Those updated values will eventually find there way into the the docs at: |
In #549 @hawksight wrote:
I've added client-id to the log messages when the configuration resolver selects Venafi Cloud Authentication.
But in the interests of reducing the overwhelming quantity of log messages, I've also changed that log message to only be shown at debug log level
--log-level=1
.I've also associated this PR with
[VC-36032] AGENT: Enhanced troubleshooting through improved logging
.Testing