Skip to content

refactor(security)!: Change to camelCase args for secrets-config proxy tls#4433

Merged
bnevis-i merged 1 commit intoedgexfoundry:mainfrom
bnevis-i:cli-consistency
Mar 13, 2023
Merged

refactor(security)!: Change to camelCase args for secrets-config proxy tls#4433
bnevis-i merged 1 commit intoedgexfoundry:mainfrom
bnevis-i:cli-consistency

Conversation

@bnevis-i
Copy link
Collaborator

BREAKING CHANGE: To be consistent with other secrets-config sub-commands, the tls command will now accept camelCase command line arguments. Also fixes issue with -h option resulting in an error in addition to printing help.

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Testing Instructions

For help, use secrets-config (command) (subcommand) -h
tls subcommand works as usual, with exception of breaking change to argument casing.

New Dependency Instructions (If applicable)

@bnevis-i bnevis-i requested a review from farshidtz March 10, 2023 18:07
@bnevis-i bnevis-i added this to the Minnesota milestone Mar 10, 2023
@bnevis-i bnevis-i added security-services tech-debt issue_type denoting refactoring to improve design or removal of temporary workarounds labels Mar 10, 2023

Upon completion, for token-type == "jwt", the command outputs the autogenerated _key_ for the **id** command above.
This value must be used during later construction of the JWT.
vault_token=$(curl -ks "http://localhost:8200/v1/auth/userpass/login/${username}" -d "{\"password\":\"${password}\"}" | jq -r '.auth.client_token')

Choose a reason for hiding this comment

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

what happens if this fails, the developer can re-run or restart the service?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Vault is always running. Additional runs of secrets-config adduser will set a new password on the account at which point need to go through the login/generate jwt process again.

Choose a reason for hiding this comment

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

could you add what you said into docs to help developers in this case? thanks!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added that as well as other documentation.

…y tls

BREAKING CHANGE: To be consistent with other secrets-config sub-commands, the tls command will now accept camelCase command line arguments.  Also fixes issue with -h option resulting in an error in addition to printing help.

Signed-off-by: Bryon Nevis <bryon.nevis@intel.com>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
34.9% 34.9% Duplication

Copy link

@jim-wang-yutsung jim-wang-yutsung left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@farshidtz farshidtz left a comment

Choose a reason for hiding this comment

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

Thanks. Looks good.

Any reason we have the documentation both in code and docs? It is hard to maintain and prone to going out of sync.

@bnevis-i
Copy link
Collaborator Author

Thanks. Looks good.

Any reason we have the documentation both in code and docs? It is hard to maintain and prone to going out of sync.

Which would you rather I keep? Would it be OK to just put a README.md to point to the docs, or should I delete it entirely?

@farshidtz
Copy link
Member

Which would you rather I keep? Would it be OK to just put a README.md to point to the docs, or should I delete it entirely?

I think the README.md can go entirely in favor of the docs. Keeping a link from README.md to docs isn't necessary IMO as it also adds maintenance burden for the versioning of the URL.

@bnevis-i
Copy link
Collaborator Author

Which would you rather I keep? Would it be OK to just put a README.md to point to the docs, or should I delete it entirely?

I think the README.md can go entirely in favor of the docs. Keeping a link from README.md to docs isn't necessary IMO as it also adds maintenance burden for the versioning of the URL.

Ok. I'll merge this since I need to copy it over to docs, then follow up with a remove later.

@bnevis-i bnevis-i merged commit a4ee942 into edgexfoundry:main Mar 13, 2023
@bnevis-i bnevis-i deleted the cli-consistency branch March 13, 2023 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security-services tech-debt issue_type denoting refactoring to improve design or removal of temporary workarounds

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants