Skip to content

Signing with local private keys #539

@ningziwen

Description

@ningziwen

What is the areas you would like to add the new feature to?

Notation CLI

Is your feature request related to a problem?

Based on the discussion, Notation is not supporting signing with local private keys except the testing only keys, and will support it in the future.

I understand current plugin approach is more secure which can manage the private keys for users, but I'd like to see local private key feature as a less advanced feature than current plugin approach, which gives users more flexibility to onboard to existing key management workflow.

What solution do you propose?

  • Not exact a completed solution. I'd like to discuss the external interface first before the detailed design.
  • I also like alternative 2. Want to get community's input.

The current workflow is Notation is to manage the key in a separated store, and let sign use the key from the store. To be compatible with current workflow, the intuitive way is to add local private key to the key store.

  1. Add a special plugin value "none" (or other better name) to state the key is from local.
  2. Add a new flag "key-file" to pass the local key file.
notation key add --plugin none --key-file <key_file_path> <key_name>
notation key add --plugin none --key-file key.key my_key

What alternatives have you considered?

  1. Bypass the key store workflow. Directly make --key-file part of sign
notation sign --key-file <key_file_path> <reference>

Even we don't choose this alternative, the alternative could be an improvement of proposed solution.

  1. Add a very simple build-in plugin for local key file.

The good thing is no special value is needed. The plugin can be called "local" and has only one args --key-file with only one feature of providing local key file.

Any additional context?

I'm happy to contribute this feature when we reach a concensus.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedNeed contributors to help

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions