- services/transparency-log/pkg/backend/trillian.go: real gRPC client on github.com/google/trillian v1.6.1. Submit() does QueueLeaf with the canonical DSSE envelope as LeafValue and the raw content_hash bytes as LeafIdentityHash, then polls GetLatestSignedLogRoot + GetInclusionProofByHash until the leaf is sequenced. Idempotency uses Trillian's ALREADY_EXISTS signal on the inner QueuedLogLeaf.Status, so a repeated submit still returns 200 OK with the originally-assigned log_index + a valid proof against the current STH. - Unconfigured backend (missing endpoint or LogID) returns the historical ErrTrillianUnavailable so the httpapi layer keeps mapping it to 503 instead of silently 500. Existing stub-returns-503 test updated. - cmd/transparency-log: pointer-receiver Trillian wiring; flag docs mention the production SRV name. - services/transparency-log/Dockerfile: distroless multi-stage build used by deploy/trillian/40-transparency-log.yaml. - deploy/trillian/: full K8s stack for the agent-trust namespace — MySQL 8.4 StatefulSet (schema init ConfigMap vendored from upstream storage.sql v1.6.1), Trillian LogServer + LogSigner Deployments on gcr.io/trillian-opensource-ci:v1.6.1, createtree Job that writes the TreeID to a ConfigMap (re-apply safe), transparency-log Deployment with --backend=trillian pulling TRILLIAN_LOG_ID from the ConfigMap. - deploy/trillian/README.md: first-time apply + smoke-test + secret rotation + signer-key clarification (STH key is Trillian-internal; DSSE envelope signing stays with signing-service / OpenBao). - services/admin-api: go.mod / go.sum pick up the new transitive deps (trillian + grpc) via the local replace on transparency-log. - services/transparency-log/README.md: Backends table updated; next- steps list no longer carries Trillian-deployment as a follow-up. Deployed to the live cluster from this heartbeat: MySQL + LogServer + LogSigner running in agent-trust, tree id 8482455225499059043, service smoke-tested end-to-end (201 on first POST, 200 on idempotent repeat, 409 on content_hash mismatch, tree_size=2 with correct audit path). Co-Authored-By: Paperclip <noreply@paperclip.ing>
75 lines
2.1 KiB
YAML
75 lines
2.1 KiB
YAML
---
|
|
# Transparency-log Deployment: serves POST /api/v1/log/entries (ADR-0005)
|
|
# backed by the real Trillian LogServer in this namespace.
|
|
#
|
|
# Image: build+push to the in-cluster Harbor registry as
|
|
# harbor.basicstack.de/proofedmesh/transparency-log:<tag>
|
|
# — before the first apply. See deploy/trillian/README.md for the build
|
|
# command (uses the Dockerfile at services/transparency-log/Dockerfile).
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: transparency-log
|
|
namespace: agent-trust
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/name: transparency-log
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: 8080
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: transparency-log
|
|
namespace: agent-trust
|
|
labels:
|
|
app.kubernetes.io/name: transparency-log
|
|
app.kubernetes.io/part-of: proofedmesh
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: transparency-log
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: transparency-log
|
|
spec:
|
|
containers:
|
|
- name: transparency-log
|
|
image: harbor.basicstack.de/proofedmesh/transparency-log:v0.1.0
|
|
imagePullPolicy: IfNotPresent
|
|
args:
|
|
- --addr=:8080
|
|
- --backend=trillian
|
|
- --trillian-addr=$(TRILLIAN_ADDR)
|
|
- --trillian-log-id=$(TRILLIAN_LOG_ID)
|
|
env:
|
|
- name: TRILLIAN_ADDR
|
|
value: trillian-log-server.agent-trust.svc.cluster.local:8090
|
|
- name: TRILLIAN_LOG_ID
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: trillian-log-id
|
|
key: TRILLIAN_LOG_ID
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 8080
|
|
initialDelaySeconds: 3
|
|
periodSeconds: 5
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: 8080
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 20
|
|
resources:
|
|
requests:
|
|
cpu: "20m"
|
|
memory: "64Mi"
|
|
limits:
|
|
memory: "256Mi"
|