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

Signer auth #673

Open
852Kerfunkle opened this issue May 25, 2023 · 2 comments
Open

Signer auth #673

852Kerfunkle opened this issue May 25, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@852Kerfunkle
Copy link

Would be nice if signers started with --require-authentication were supported.

Presumably (but I haven't really looked at the details) one would need to add an auth private key (preferably referencing a file, so it can be generated service-side and only the pubkey exported) to the config and supply a signature along with requests to the signer.

@852Kerfunkle 852Kerfunkle added the enhancement New feature or request label May 25, 2023
@852Kerfunkle
Copy link
Author

Had a look and it's not quite clear how the signature is supposed to be included in the sign request.

If anyone has a hint, I'd be happy to make a PR

@nicolasochem
Copy link
Contributor

nicolasochem commented Feb 7, 2024

Here's a hint: https://github.com/midl-dev/tezos-serverless-signer-apps/blob/main/consensus-kms-signer/signer/tezos-kms-client.mjs#L94-L99

  1. append prefix bytes 040101
  2. append the public key hash of the signer, in bytes, without prefix
  3. append the message being signed, in bytes, without prefix
  4. sign these appended bytes from 1. 2. and 3. with the authorized key
  5. add the resulting signature string (in base58 format, prefixed, for example spsig...) as an authentication header in the signature request.

Note that in order to support any kind of authorized key type (tz1, tz2...) 4. and 5. will likely require adding pytezos as a requirement to TRD. That's quite heavy. However, this is very much needed on my end.

@852Kerfunkle are you still around? Are you still happy to make a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants