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

Looking to add a way for the client applications to get the Control Room credential from RCC #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kariharju
Copy link
Contributor

  • Only in rcc conf credentials with both flags --json and --showSecrets the output JSON will contain the un-smudged secret values
  • Making this a very deliberate command, so that user must know they are about to get the secrets that are by default always smudged to avoid accidental logging etc.

…oom credential from RCC

- Only in `rcc conf credentials` with both flags `--json` and `--showSecrets` the output JSON will contain the un-smudged secret values
- Making this a very deliberate command, so that user must know they are about to get the secrets that are by default always smudged to avoid accidental logging etc.
Copy link

@fabioz fabioz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No real issues, just nitpicks, feel free to ignore as you see fit.

@@ -36,7 +36,7 @@ var credentialsCmd = &cobra.Command{
operations.VerifyAccounts(forceFlag)
}
if show && !deleteCredentialsFlag {
operations.ListAccounts(jsonFlag)
operations.ListAccounts(jsonFlag, secretsFlag)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: I think I'd call this showSecretsFlag to go along with the flag in the command line.

@@ -185,8 +185,14 @@ func smudgeSecrets(accounts accountList) accountList {
return accounts
}

func ListAccounts(json bool) {
accounts := smudgeSecrets(findAccounts())
func ListAccounts(json bool, secrets bool) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise here showSecrets would be a better variable name.

accounts := findAccounts()

// Smudge secrets by default, unless explicitly requested otherwise
if !(json && secrets) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition is right, but reading it that way was a bit confusing the first time I read it.

I'd probably write it as: if !showSecrets || !json to understand in both cases it'd enter it a bit easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants