mirror of
https://github.com/luxfi/kms.git
synced 2026-07-26 23:59:24 +00:00
This repo carried two KMS implementations. cmd/kms is a Go service serving
/v1/kms/orgs/{org}/secrets/{path}/{name} out of ZapDB behind IAM-signed
bearers, and its own source calls that "the ONLY HTTP way to read or write
secrets". Alongside it sat frontend/ — 3,083 files of the Infisical console,
calling /api/v1/{dynamic-secrets,secret-scanning,projects}. Two systems, one
name. LLM.md already listed frontend/ as "Legacy — Old React dashboard" and
claimed "NO Node, NO Infisical"; the tree said otherwise.
Deleted frontend/, the go:embed of its build output, registerWebUI, and the
/v1/admin/config endpoint that existed only to bootstrap that SPA. The three
Dockerfiles collapse to one: the server-only build, which the frontend-building
variants existed to work around. Makefile loses build-ui/copy-ui. CI already
pointed at `Dockerfile` and so needs no change.
This also removes a trap. The embedded SPA answered every unmatched path with
HTML, so a wrong URL looked like a 200 instead of a 404 — which is exactly how
genesis called Infisical /api/v3/secrets/raw against this host for however long
and got the console page back instead of an error. The API now 404s honestly.
8,407 tracked files -> 5,320. Every route is /v1/kms/* plus /health{,z}.
Build clean, cmd/kms and root package tests pass.
Co-authored-by: Hanzo Dev <dev@hanzo.ai>
22 lines
441 B
Makefile
22 lines
441 B
Makefile
.PHONY: build test clean docker dev
|
|
|
|
BINARY := kms
|
|
IMAGE := ghcr.io/luxfi/kms:latest
|
|
|
|
|
|
build:
|
|
CGO_ENABLED=0 go build -ldflags="-w -s" -o $(BINARY) ./cmd/kms/
|
|
|
|
test:
|
|
go test -v -race ./...
|
|
|
|
clean:
|
|
rm -f $(BINARY)
|
|
|
|
dev:
|
|
KMS_DATA_DIR=./data KMS_LISTEN=:8080 go run ./cmd/kms/
|
|
|
|
docker:
|
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o $(BINARY) ./cmd/kms/
|
|
docker build --platform linux/amd64 -t $(IMAGE) -f Dockerfile .
|