Skip to content

Cli commands#79

Closed
SteveLasker wants to merge 6 commits intonotaryproject:mainfrom
SteveLasker:cli-commands
Closed

Cli commands#79
SteveLasker wants to merge 6 commits intonotaryproject:mainfrom
SteveLasker:cli-commands

Conversation

@SteveLasker
Copy link
Contributor

The equivalent of the notation --help cli, to iterate on the commands, parameters and help docs.

This builds (ok copies the premise) of #70
To see the commands in context, see: #78

I'll leave this in draft form for initial review.
Proposal is to get a baseline in, then iterate with subsequent PRs to this help doc, and samples showing contextual usage.

Steve Lasker and others added 6 commits June 19, 2020 17:39
Signed-off-by: Steve Lasker <stevelasker@hotmail.com>
Signed-off-by: Steve Lasker <stevelasker@hotmail.com>
Signed-off-by: Steve Lasker <stevelasker@hotmail.com>
Signed-off-by: Steve Lasker <stevelasker@hotmail.com>
Signed-off-by: Steve Lasker <stevenlasker@hotmail.com>
Signed-off-by: Steve Lasker <stevenlasker@hotmail.com>
@@ -0,0 +1,114 @@
# Notation CLI

A set of commands the `notation` cli sill support.
Copy link

Choose a reason for hiding this comment

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

will support

notation key - Commands for managing certificates

USAGE:
notation cert command [command options] [arguments...]
Copy link

Choose a reason for hiding this comment

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

notation key command

notation cert command [command options] [arguments...]

COMMANDS:
add, a Commands for managing certificates
Copy link

Choose a reason for hiding this comment

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

Commands for managing certificates? Is the key sub-command the same as cert?

notation cert command [command options] [arguments...]

COMMANDS:
add, a Commands for adding certificates
Copy link
Contributor

Choose a reason for hiding this comment

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

add is short enough. Not necessary to have a.

Copy link
Contributor

Choose a reason for hiding this comment

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

Does this add certificate to the list for signing or verifying? You could add a cert without private key into the verification policy.

Comment on lines +15 to +19
COMMANDS:
cert Commands for managing certificates
key Commands for managing private keys
config Commands for configuring notation
verify Commands for verifying an artifacts signature integrity
Copy link
Contributor

Choose a reason for hiding this comment

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

We have verify but miss sign.

COMMANDS:
cert Commands for managing certificates
key Commands for managing private keys
config Commands for configuring notation
Copy link
Contributor

Choose a reason for hiding this comment

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

What config is used for?

Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably be used for configuring signing providers (like key vault). We could remove this command till we detail it out.

@SteveLasker SteveLasker added the cli Issue or PR released to Notation CLI label Aug 30, 2021
Comment on lines +16 to +17
cert Commands for managing certificates
key Commands for managing private keys
Copy link
Contributor

Choose a reason for hiding this comment

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

It's unclear why we need both cert and key commands, and I feel it'll be confusing for the user to understand in what context/workflow to use these commands.

#70 refers to certificate for managing the policy for verification, whereas in this PR cert command is used for generating certificates and maintaining a list that notation knows about, but its purpose isn't clear, is it to be used for signing?

COMMANDS:
cert Commands for managing certificates
key Commands for managing private keys
config Commands for configuring notation
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably be used for configuring signing providers (like key vault). We could remove this command till we detail it out.

notation cert --help

NAME:
notation cert - Commands for managing certificates
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion - Commands for managing certificates used for signing and verification of artifacts.

notation cert command [command options] [arguments...]

COMMANDS:
add, a Commands for adding certificates
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this add certificate to the list for signing or verifying? You could add a cert without private key into the verification policy.

COMMANDS:
add, a Commands for adding certificates
remove, rm Commands for removing certificates
create Create a self-signed certificate
Copy link
Contributor

Choose a reason for hiding this comment

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

As per #78 creating a certificate automatically adds it to the verification policy. IMO this should be an explicit step, otherwise any test certificates created by user will be automatically added into the verification policy, and be unintentionally used in production.

add, a Commands for adding certificates
remove, rm Commands for removing certificates
create Create a self-signed certificate
list, ls List the concurrently configured certificates
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these certificates the ones to be used only for signing? If we provide commands to manage certificates in verification policy, we should allow managing more than one verification policy instead of a default one.

@SteveLasker
Copy link
Contributor Author

Closing as the implementation in #83 has completed the baseline work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Issue or PR released to Notation CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments