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

signatory to display the public key (not hash) of a given cloud kms #362

Open
nicolasochem opened this issue May 18, 2023 · 2 comments
Open

Comments

@nicolasochem
Copy link

I am writing a tutorial on how to use signatory + consensus key + google KMS and I am hitting the following problem:

[venv] nochem@peck ~/workspace/sandbox/gcp-kms-signatory $ ./signatory-cli  list -c signatory.yaml --base-dir .
INFO[0000] Initializing vault                            vault=cloudkms vault_name=gcp
Public Key Hash:    tz3iGkaoKJ5uZ51gotVp6x7wMkGPX1U5jNo5
Vault:              CloudKMS
ID:                 projects/tezos-baker-kms/locations/us-west1/keyRings/tezos-baker-kms/cryptoKeys/tezos-baker-kms/cryptoKeyVersions/1
Active:             false
nochem@peck ~/workspace/tezos () $ ./octez-client  register key alice as delegate with consensus key tz3iGkaoKJ5uZ51gotVp6x7wMkGPX1U5jNo5                                            
Warning:                                                                                                                                                                             
                                                                                                                                                                                     
                 This is NOT the Tezos Mainnet.                                                                                                                                      
                                                                                                                                                                                     
           Do NOT use your fundraiser keys on this network.                                                                                                                          
                                                                                                                                                                                     
Error:                                                                                                                                                                               
  Erroneous command line argument 9 (tz3iGkaoKJ5uZ51gotVp6x7wMkGPX1U5jNo5).                                                                                                          
  no public_key alias named tz3iGkaoKJ5uZ51gotVp6x7wMkGPX1U5jNo5                                                                                                                     
  cannot read file (Unix.Unix_error(Unix.ENOENT, "open", "tz3iGkaoKJ5uZ51gotVp6x7wMkGPX1U5jNo5"))                                                                                    
  Error while parsing URI: PK_URI needs a scheme                                                                                                                                     
  Could not parse input.         

I can solve it by signing a reveal operation and looking at the result on-chain but it's unnecessary; can we modify signatory to display the pubkey in addition to the hash? many thanks.

@stephengaudet
Copy link
Contributor

regarding "no public_key alias" from octez-client, possible you still need to import into octez-client private keys, the Signatory URI, and use that alias going forward
https://signatory.io/docs/cli#configuring-octez-client-to-use-signatory-for-remote-signing

I can understand wanting to get the public key value from signatory-cli before activating it, makes sense. one way to get the public key from Signatory is to make the key Active by configuring it in the tezos section of signatory.yaml. once active, the key's URI can be queried for the public key:
% curl localhost:6732/keys/tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb
{"public_key":"edpkvGfYw3LyB1UcCahKQk4rF2tvbMUk8GFiTuMjL75uGXrpvKXhjn"}

@nicolasochem
Copy link
Author

Yes, I figured this shortly after writing this ticket, and it works. Still it doesn't hurt to display it, but feel free to close otherwise.

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

No branches or pull requests

2 participants