Skip to content

Duplicate baker pkh in signatory list #142

@michaelkernaghan

Description

@michaelkernaghan

Summary

When importing a key that already exists in a vault, signatory-cli import should warn or prevent the duplicate import.

Current Behavior

YubiHSM (and potentially other backends) allows importing the same secret multiple times with different IDs:

Public Key Hash:    tz1TfGsL6o754mfxcntSzDDTh9RrjZVNocjP
Vault:              YubiHSM
ID:                 bce7
Status:             ACTIVE

Public Key Hash:    tz1TfGsL6o754mfxcntSzDDTh9RrjZVNocjP
Vault:              YubiHSM
ID:                 caa0
Status:             ACTIVE

Proposed Solution

Add a pre-import check to signatory-cli import that:

  1. Lists existing keys in the target vault
  2. Compares the public key hash of the key being imported
  3. Warns user if duplicate exists, with option to proceed or abort

This check should be implemented for all backends, not just YubiHSM.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    yubihsmIssues related to the YubiHSM

    Projects

    Status

    Planning

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions