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

Transit Import Key CLI functionality #18887

Merged
merged 7 commits into from
Jan 30, 2023
Merged

Transit Import Key CLI functionality #18887

merged 7 commits into from
Jan 30, 2023

Conversation

sgmiller
Copy link
Collaborator

Adds transit import/import-key to bring keys into transit and transform via
the key wrapping protocol.

@sgmiller sgmiller requested a review from a team January 27, 2023 21:15
@sgmiller sgmiller added this to the 1.13.0-rc1 milestone Jan 27, 2023
Copy link
Contributor

@kitography kitography left a comment

Choose a reason for hiding this comment

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

Looks pretty good!

Are there tests here anywhere?

wrappedTargetKey, err := wrapKWP.Wrap(key)
if err != nil {
c.UI.Error(fmt.Sprintf("failure wrapping source key: %v", err))
return 2
Copy link
Contributor

Choose a reason for hiding this comment

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

what are your return codes / are they documented somewhere? (in particular 1 vs. 2 vs 3 as failures)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do.

@sgmiller
Copy link
Collaborator Author

Apparently cli commands don't have unit tests? The actual import algo is covered by the unit tests in transit though.

command/transit_import_key.go Outdated Show resolved Hide resolved
@cipherboy
Copy link
Contributor

Apparently cli commands don't have unit tests?

CLI does have unit tests, see e.g., pki_health_check_test.go or pki_verify_sign_test.go for more complicated ones. :-)

@sgmiller sgmiller merged commit cd70976 into main Jan 30, 2023
@sgmiller sgmiller deleted the cli-byok branch January 30, 2023 18:47
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.

4 participants