Commit Graph
22 Commits
Author SHA1 Message Date
zeekay 892891478f fix(auth): accept comma-separated IAM_ISSUER allowlist (multi-issuer)
verifyJWT compared the token iss against the ENTIRE IAM_ISSUER string, so a
comma-list ('https://hanzo.id,https://iam.hanzo.ai,https://hanzo.ai') — the
production config — rejected every real token as wrong_iss. (The 2.x line
carried this split; it was lost in the 0.159.x re-baseline.) Mirror
checkAudience: split IAM_ISSUER on ',' into an allowlist, drop the single-value
jwt.WithIssuer, enforce via checkIssuer post-parse (trailing-slash normalized).
Single-issuer + wrong/attacker/missing-iss rejection unchanged.

Test: TestJWT_MultiIssuer_Accepted (3 listed issuers accepted, evil rejected);
existing F1 issuer-rejection + F4 multi-audience + TestList suites still green.
v0.159.9
2026-06-28 22:44:27 -07:00
zeekay ec3020383e build: regenerate luxfi go.sum via proxy path (matches GOPRIVATE-less Dockerfile build)
The image build-stage runs 'go mod download' WITHOUT GOPRIVATE in effect
(the env prefix binds to the preceding git-config, not the download), so
public luxfi modules resolve via proxy.golang.org (immutable version
content), while upstream has force-moved several luxfi tags so DIRECT git
now serves different bytes. Regenerate ALL luxfi sums via the same proxy
path the build uses (keys +AriQNM7, zap MiVRsRA8, ...). Gate: a
Dockerfile-identical 'go mod download' + CGO_ENABLED=0 build + TestList
suite verify against the regenerated go.sum.
v0.159.8
2026-06-29 05:24:40 +00:00
zeekay c97ff11cfa build: pin luxfi/[email protected] go.sum zip-hash to proxy-immutable content
The Dockerfile build stage runs 'go mod download' WITHOUT GOPRIVATE in effect
(shell: 'VAR=x git config ... && go mod download' applies VAR only to the
git-config, not the download), so luxfi/keys (public) resolves via
proxy.golang.org, whose v1.2.0 cache is immutable (+AriQNM7...). Upstream
later force-moved the v1.2.0 tag, so DIRECT git now serves different content
(3TAcr4tw...). The image build verifies against the proxy value; pin go.sum to
it. /go.mod hash already matches (build passed graph-load, failed only on zip).
v0.159.7
2026-06-28 22:19:20 -07:00
zeekay bdb0fc6196 build: reconcile go.sum via build-path (go mod download) for force-moved luxfi tags
go mod tidy and go mod download resolve the re-cut luxfi tags to different
commits; the image build uses 'go mod download', which stably resolves
luxfi/[email protected] to the +AriQNM7 content. Regenerate luxfi sums via the
build path so the Dockerfile 'go mod download' verifies. Proven in-job:
go mod verify + fresh readonly download + CGO_ENABLED=0 build of kmsd/kms
+ TestList endpoint suite all pass.
v0.159.6
2026-06-29 05:05:12 +00:00
zeekay ced1acc88a build: reconcile go.sum to canonical github.com luxfi content
The recorded luxfi/* hashes were generated against an internal mirror
that still serves pre-force-move content; github.com (what CI and the
image build fetch) serves the re-cut tags. Regenerate luxfi sums via
'go mod tidy' against github.com so 'go mod download' verifies in the
build environment. go.mod versions unchanged; go mod verify + CGO_ENABLED=0
build of kmsd/kms + TestList endpoint suite all pass.
v0.159.5
2026-06-29 04:54:24 +00:00
zeekayandGitHub 24949d7311 Merge pull request #19 from hanzoai/feat/secrets-metadata-list
feat(kms): metadata-only secret listing — GET /v1/kms/orgs/{org}/secrets
v0.159.4
2026-06-28 21:16:09 -07:00
zeekay 3b621e1fa9 docs(brand): add hero banner 2026-06-28 20:05:22 -07:00
zeekay fd086a440c chore(brand): dynamic hero banner 2026-06-28 20:05:21 -07:00
zeekay 86e785d5e7 feat(kms): metadata-only secret listing — GET /v1/kms/orgs/{org}/secrets
Add a bare list endpoint so an operator console can browse an org's secret
KEYS without ever exposing a value. Structurally incapable of leaking a value:
the scan iterates ZapDB KEYS ONLY (PrefetchValues=false) under
kms/secrets/<brand/org>/ and the row type has no value field — there is no
code path from this handler to a secret value blob.

Verified against the store: secret path/name/env are PLAINTEXT in the ZapDB
key kms/secrets/{path}/{env}/{name}; only the value blob is at-rest encrypted.
So names are honestly listable; values are never touched.

- Authz: identical authorize()+canActOnOrg() gate as get-one — never weaker.
  Structurally confined to the org's brand/<org>/ namespace (stricter: cannot
  enumerate another tenant's names). Optional ?prefix= (safePath + org
  containment) and ?env= filters.
- Routing: bare GET coexists with the {rest...} wildcard (Go 1.22 ServeMux);
  the bare path hits list, .../secrets/<path>/<name> still returns its value.
- updatedTime sourced from a new kms/mtimes/ sibling index (mirrors
  versioning.go), written on put/patch, deleted on delete — never from the
  value blob. Records predating this carry no mtime (updatedTime omitted),
  never faked.
- TestRed3 traversal heuristic tightened: '/secrets/foo/..' path-cleans to
  '/secrets' (the list), an authorized empty {secrets:[]} with no value; the
  test now asserts on an actual value payload, not the substring 'secret'.

Tests: 9 new TestList_* (no-value-leak, authz fail-closed, routing
precedence, prefix injection-safety, env filter, empty org, mtime RFC3339).
VERSION 2.5.2 -> 0.159.4 (patch, v0.x server line; tag cut on merge, not now).
2026-06-28 19:31:19 -07:00
zeekay 510ee7ae25 build: reconcile luxfi re-tag go.sum drift (age/keys/zap)
origin/main pins age v1.5.0 / keys v1.2.0 / zap v0.8.1 whose upstream tags
were re-cut (brand-scrub), so the recorded h1 content hashes no longer match
and `go build` fails closed with a checksum mismatch. Recompute the three
hashes from the actual module content (go, not a hand-copy) and drop pq's
stale zip hash (its code isn't compiled on this build graph — module-graph
pruning). kms stays v1.11.7 (origin/main's pin, untouched). `go mod verify`
=> all modules verified. Pre-existing drift, also fixed independently on
fix/kms-cli-build-luxfi-keys-gosum; values agree byte-for-byte.
2026-06-28 19:31:19 -07:00
zeekay 1df44ae993 deps: luxfi/kms v1.11.7 → v1.11.8 (zero-env OIDC SSO derivation)
Deliberate single-patch bump of the canonical backend to pull in the derived
<org>-kms OIDC client (KMS computes client_id/secret/state from KMS_IAM_OWNER —
no env coordination with IAM). hanzoai/kms is a thin wrapper; it pins luxfi/kms
intentionally rather than tracking latest.
2026-06-28 19:26:18 -07:00
zeekay ea20beada2 deps: reconcile go.sum after module re-tag (brand-scrub drift) 2026-06-24 19:06:31 -07:00
zeekay 07b2e990c7 docs+ui: neutralize legacy upstream brand references; add NOTICE
Replace inline upstream-brand mentions in DEPRECATED.md, LLM.md, and a
frontend gap description with neutral 'legacy fork' wording. Add a NOTICE
file carrying the required upstream MIT attribution. The LICENSE retains
the upstream copyright notice as required by the MIT license; that is the
only place the upstream name remains.

No functional changes. Go backend and frontend build unchanged.
v0.159.3 v2.5.4
2026-06-24 11:08:02 -07:00
3a69e2ae9b ci: run on self-hosted ARC pool (hanzo-build-linux-amd64/deploy), not GitHub-hosted (#16)
Co-authored-by: zeekay <[email protected]>
2026-06-19 20:36:03 -07:00
zeekayandGitHub e04189d728 chore(examples): drop orphaned Redis from HSM deploy examples (#15)
The current KMS is a pure Go binary. Per DEPRECATED.md the Node.js +
PostgreSQL + Redis Infisical fork was replaced — "no Node.js / Postgres /
Redis dependencies." The KMS Go runtime contains zero Redis references;
the `REDIS_URL` / `REDIS_HOST` knobs in these examples were leftover from
the deprecated stack and are never read.

Remove the orphaned Redis declarations from the three HSM compose examples
and the Zymbit k8s manifest:
- zymbit-hsm/compose.yml: redis service, REDIS_URL env, depends_on, volume
- zymbit-hsm/kubernetes-deployment.yaml: Redis Deployment/Service/PVC,
  REDIS_HOST/PORT ConfigMap keys, redis egress NetworkPolicy rule
- aws-cloudhsm/compose.yml: redis service, REDIS_URL env, depends_on, volume
- google-cloud-hsm/compose.yml: redis service, REDIS_URL env, depends_on, volume

No consumer migration needed — nothing read Redis. Postgres left intact.
2026-06-16 16:09:27 -07:00
zeekay 8e6277692f deps: update to latest real-semver, drop local replaces, fix breaks 2026-06-11 08:55:44 -07:00
zeekay cef9beb448 chore: scrub legacy hanzo-dev refs → hanzo-dev
Replace hardcoded usr_hanzo-dev test subject IDs with usr_hanzo_dev across
all JWT-minting calls in red_hardening_test.go.
2026-06-10 20:21:58 -07:00
zeekay da48b5f72c cmd: consume kmsclient from sdk/go module; corona naming
- cmd/kms, cmd/smoke-zap, cmd/kms-fetch import
  github.com/hanzoai/kms/sdk/go/kmsclient (require sdk/go v1.1.0)
- luxfi/kms v1.11.0 → v1.11.4: SignWithCorona is now
  SignWithCorona; key_type wire value follows (bls | corona)
2026-06-10 20:15:09 -07:00
zeekay 53c6f3e55d kmsclient: move pkg/kmsclient → sdk/go/kmsclient
The root module zip exceeds Go's download limit, so importing
github.com/hanzoai/kms/pkg/kmsclient pulled an undownloadable module.
The light sdk/go module now owns the Go client surface; consumers
import github.com/hanzoai/kms/sdk/go/kmsclient.
2026-06-10 20:14:12 -07:00
zeekay 4cb53e1502 ci: route to canonical native arcd labels [self-hosted, linux, <arch>]
Replaces non-canonical scale-set / org-prefixed labels with the
existing labels every arcd host registers with. Matches evo for
amd64 and spark for arm64. No new labels added.
2026-06-10 20:12:57 -07:00
zeekay 81514b25ca chore: update 2026-06-10 13:44:24 -07:00
zeekay f3fbb687d2 purge: rip remaining Infisical residue — docs, env examples, repo boilerplate
Following the earlier AdminShell+CollectionCRUD rewrite (PR #14) which
already deleted backend/, backend-go/, cloudformation/, helm-charts/,
nginx/, sink/, wasm/, upgrade-impact/, e2e/, migration/, package.json
and switched the frontend to a 184K Hanzo-first build, complete the
cleanup by deleting the remaining Infisical-era residue:

  - docs/                                   (1.0G Infisical mintlify docs)
  - .env.example, .env.dev.example,
    .env.migration.example, .env.test.example
                                            (legacy Postgres/Redis envs;
                                             no Go code references them)
  - .eslintignore, .husky/                  (TS toolchain leftovers)
  - CODE_OF_CONDUCT.md, CONTRIBUTING.md,
    SECURITY.md                             (Infisical repo boilerplate)

Working tree drops from ~1.0G to <600K of content (1.5G total is .git/
which `git gc --aggressive --prune=now` shrinks locally; the remote
keeps its history shape — anyone pulling gets the lean checkout).

Build + test verification:
  go build ./...                            (4 cmd binaries: green)
  go test ./... -count=1 -short             (all packages: ok)

Kept: cmd/, pkg/, sdk/, frontend/ (AdminShell), schema/, examples/,
root Go (audit.go, auth.go, consensus.go, embed.go, jwks.go, mount.go,
versioning.go + tests), Dockerfile, Dockerfile.kms-fetch, Makefile,
LLM.md, CLAUDE.md, DEPRECATED.md, SOVEREIGN-KMS-ARCHITECTURE.md,
TFHE-KMS-ARCHITECTURE.md, LICENSE, README.md, VERSION, .github/
(8 Hanzo workflows: build, build-kms-fetch, check-fe-ts-and-lint,
ci, pr-preview, release, validate-pr-title, workflow-sanity).
2026-06-07 14:23:12 -07:00