9
0
Fork
You've already forked locksmith
0

feat/hosted-keymaker #6

Open
vkobel wants to merge 16 commits from feat/hosted-keymaker into main
pull from: feat/hosted-keymaker
merge into: caution:main
caution:main
caution:deploy/hosted
caution:deploy-tests
caution:fix/preferred-hash-fallback
caution:anton/fix-error-handling

Hosted keymaker adjustments for GA.

Remaining work:

  • Rate limiting + spawn_blocking
  • test ensure_safe() in a real Nitro enclave, with a real deployment
    • decide if we wanna ensure using hw randomness: ensure_safe() to also verify rng_current == nsm-hwrng when running inside Nitro
Hosted keymaker adjustments for GA. Remaining work: - Rate limiting + spawn_blocking - test ensure_safe() in a real Nitro enclave, with a real deployment - decide if we wanna ensure using hw randomness: `ensure_safe()` to also `verify rng_current == nsm-hwrng` when running inside Nitro
Move ErrorResponse, error_logger_middleware, ApiError, and the
GenerateQuorumErrorKind→StatusCode mapping into keymaker-core behind
an optional `axum` feature. Both keymaker and keymaker-hosted now share
one canonical copy instead of two byte-identical middleware files and
duplicate ApiError definitions.
generate_quorum is CPU-bound; wrap in spawn_blocking so Tokio workers
aren't monopolised under concurrent load. Add SHOOT_SELF_IN_FOOT bypass
to the 400 test so ensure_safe() doesn't abort before parse_certs runs.
main deploys the one-shot self-nuking keymaker (caution.hcl -> /keymaker).
The hosted always-on keymaker lives on the deploy/hosted branch.
Author
Owner
Copy link

Split keymaker deploys into two branches, migrated off the legacy Procfiles to caution.hcl:

  • main — one-shot, self-nuking keymaker (/keymaker). Default per docs: git push caution main to mint your own quorum, then it reboots so entropy never persists.
  • deploy/hosted — always-on keymaker-hosted at keymaker.caution.co, the convenience endpoint we run. Caution deploys this branch.

deploy/hosted diverges by exactly two files (root caution.hcl + Containerfile, building keymaker-hosted).

this branch should be merged to main, and deploy/hosted should stay

Split keymaker deploys into two branches, migrated off the legacy Procfiles to `caution.hcl`: - **`main`** — one-shot, self-nuking keymaker (`/keymaker`). Default per docs: `git push caution main` to mint your own quorum, then it reboots so entropy never persists. - **`deploy/hosted`** — always-on `keymaker-hosted` at `keymaker.caution.co`, the convenience endpoint we run. Caution deploys this branch. `deploy/hosted` diverges by exactly two files (root `caution.hcl` + `Containerfile`, building `keymaker-hosted`). ## this branch should be merged to main, and `deploy/hosted` should stay
Five tests against a deployed keymaker: health, statelessness (distinct
derived public keys), keyring_hash == sha256(keyring), well-formed 2-of-3
bundle, and 400 on a bad keyring. Skipped when KEYMAKER_URL is unset.
Author
Owner
Copy link

Will likely be superseded by #7

Will likely be superseded by https://codeberg.org/caution/locksmith/issues/7
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/hosted-keymaker:feat/hosted-keymaker
git switch feat/hosted-keymaker

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feat/hosted-keymaker
git switch feat/hosted-keymaker
git rebase main
git switch main
git merge --ff-only feat/hosted-keymaker
git switch feat/hosted-keymaker
git rebase main
git switch main
git merge --no-ff feat/hosted-keymaker
git switch main
git merge --squash feat/hosted-keymaker
git switch main
git merge --ff-only feat/hosted-keymaker
git switch main
git merge feat/hosted-keymaker
git push origin main
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
caution/locksmith!6
Reference in a new issue
caution/locksmith
No description provided.
Delete branch "feat/hosted-keymaker"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?