Skip to content

feat(frontend): move issuer signing key to KMS/HSM abstraction - #460

Open
kuse-design wants to merge 1 commit into
ToluLabs:mainfrom
kuse-design:feat/kms-issuer-signer
Open

feat(frontend): move issuer signing key to KMS/HSM abstraction#460
kuse-design wants to merge 1 commit into
ToluLabs:mainfrom
kuse-design:feat/kms-issuer-signer

Conversation

@kuse-design

Copy link
Copy Markdown

Add an IssuerSigner interface in frontend/lib/signer.ts with two implementations:

  • EnvSigner: signs with a local secp256k1 private key (dev/mock only)
  • KmsSigner: delegates to AWS KMS via Sign(KeyId, Digest) — the raw private key never enters the Node.js process

Selected via ISSUER_SIGNER=env|kms env var (defaults to env for local dev). KMS returns a DER signature which is converted to the raw (r,s) 64-byte form Noir expects. prehash: false semantics are preserved via KMS MessageType=DIGEST.

The @stellarcred/issuer IssuerClient now accepts an IssuerSigner option alongside the legacy privateKey path, so existing code keeps working unchanged.

Security notes documented in SECURITY.md.

Generated with Codebuff 🤖

What does this PR do?

Type of change

  • Bug fix
  • New feature / credential type
  • Refactor / cleanup
  • Docs
  • CI / tooling

Merge requirements

  • CI is greencargo test (contracts), pnpm tsc --noEmit (frontend), pnpm build (frontend), circuit tests — all green
  • Greptile confidence ≥ 4/5 — all review comments addressed, no unresolved threads
  • Circuit changes: fixtures/<type>/ artifacts updated
  • No NEXT_PUBLIC_ prefix on server-only env vars
  • No identity fields stored or logged after KYC provider call
  • prehash:false preserved on any issuer signing path touched
  • Issuer private key never referenced from client-bundled code

✅ Merge requirements

  • All CI checks pass (contracts / frontend / circuits as applicable)
  • Every Greptile review comment is addressed — no unresolved review threads
  • Greptile confidence score is 4/5 or higher

closes #69

Add an IssuerSigner interface in frontend/lib/signer.ts with two
implementations:
- EnvSigner: signs with a local secp256k1 private key (dev/mock only)
- KmsSigner: delegates to AWS KMS via Sign(KeyId, Digest) — the raw
  private key never enters the Node.js process

Selected via ISSUER_SIGNER=env|kms env var (defaults to env for local
dev). KMS returns a DER signature which is converted to the raw (r,s)
64-byte form Noir expects. prehash: false semantics are preserved via
KMS MessageType=DIGEST.

The @stellarcred/issuer IssuerClient now accepts an IssuerSigner
option alongside the legacy privateKey path, so existing code keeps
working unchanged.

Security notes documented in SECURITY.md.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@kuse-design Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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

Successfully merging this pull request may close these issues.

Move issuer signing key to a KMS/HSM instead of an env var

1 participant