-
Notifications
You must be signed in to change notification settings - Fork 6
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
CSM Authorization karavictl requires an admin token #222
Conversation
} | ||
|
||
adminTokenCmd.Flags().StringP("name", "n", "", "Admin name") | ||
adminTokenCmd.Flags().StringP("password", "p", "", "Specify password, or omit to use stdin") |
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.
Instead of using "password", this can be "jwtsigningsecret" (or "jwt-signing-secret") or similar to remain consistent with our RPM and Helm installs.
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.
Fixed
cmd/karavictl/cmd/generate_admin.go
Outdated
func NewAdminCmd() *cobra.Command { | ||
adminCmd := &cobra.Command{ | ||
Use: "admin", | ||
Short: "Generate admin token for use with Karavi", |
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.
Should we use csm instead of karavi?
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.
fixed
run e2e test |
Description
A few sentences describing the overall goals of the pull request's commits.
GitHub Issues
List the GitHub issues impacted by this PR:
Checklist:
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration
karavictl admin token --name Test --jwt-signing-secret secret
access: XlKaGJHY2lPaUpJVXpJMU5pSXNJ
refresh: ZXlKaGJHY2lPaUpJVXpJMU5pSXNJb
karavi-authorization]# karavictl admin token --name
Error: flag needs an argument: --name
Usage:
karavictl admin token [flags]
karavictl admin token --name Test
Enter JWT Signing Secret: