-
Notifications
You must be signed in to change notification settings - Fork 21
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: more token information on config read #39
Conversation
@@ -118,6 +120,16 @@ func (b *backend) pathConfigRead(ctx context.Context, req *logical.Request, _ *f | |||
"url": config.ArtifactoryURL, | |||
} | |||
|
|||
// Optionally include token info if it parses properly |
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 reason I did this was to not have to mess with the unit tests. When I made the parsing required (i.e.
if err != nil {
return nil, err
}
... the unit test failed because its bogus artifactory URL and token obviously won't parse correctly. (fails to detect the artifactory version)
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.
Look good to me, except the extra layer of function abstraction.
LGTM? :) |
LGTM = Looks Good To Me 😄 |
Waiting for @shrajfr12 review |
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.
lgtm
Show more useful token information when reading config. SHA256 is not useful after rotating token, show username, token_id and scope.
Example
Fixes #36