Commit Graph

9 Commits

Author SHA1 Message Date
74e35ce63e Add certificate detail page and tests
- Add cert detail page with metadata display and download link
- Change cert issuance to return tgz with key.pem and cert.pem
- Add handleCertDetail and handleCertDownload handlers
- Extract vaultBackend interface for testability
- Add table-driven tests for cert detail handlers

Co-authored-by: Junie <junie@jetbrains.com>
2026-03-15 13:24:05 -07:00
b4dbc088cb Add certificate issuance, CSR signing, and cert listing to web UI
- Add SignCSR RPC to v2 CA proto and regenerate; implement handleSignCSR
  in CA engine and caServer gRPC layer; add SignCSR client method and
  POST /pki/sign-csr web route with result display in pki.html
- Fix issuer detail cert listing: template was using map-style index on
  CertSummary structs; switch to struct field access and populate
  IssuedBy/IssuedAt fields from proto response
- Add certificate detail view (cert_detail.html) with GET /cert/{serial}
  and GET /cert/{serial}/download routes
- Update Makefile proto target to generate both v1 and v2 protos

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 13:21:13 -07:00
65c92fe5ec Add audit logging for all mutating gRPC operations
Log Info-level audit events on success for:
- system: Init, Unseal, Seal
- auth: Login, Logout
- engine: Mount, Unmount
- policy: CreatePolicy, DeletePolicy
- ca: ImportRoot, CreateIssuer, DeleteIssuer, IssueCert, RenewCert

Each log line includes relevant identifiers (mount, issuer, serial, CN,
SANs, username) so that certificate issuance and other privileged
operations are traceable in the server logs.

Co-authored-by: Junie <junie@jetbrains.com>
2026-03-15 13:11:17 -07:00
8215aaccc5 Add grpcserver test coverage
- Add comprehensive test file for internal/grpcserver package
- Cover interceptors, system, engine, policy, and auth handlers
- Cover pbToRule/ruleToPB conversion helpers
- 37 tests total; CA/PKI/ACME and Login/Logout skipped (require live deps)

Co-authored-by: Junie <junie@jetbrains.com>
2026-03-15 13:07:42 -07:00
ad167aed9b Checkpoint: grpc auth fix, issuer list/detail, v2 protos, architecture docs
Co-authored-by: Junie <junie@jetbrains.com>
2026-03-15 11:39:13 -07:00
d0b1875dbb Fix all errcheck linter issues
Co-authored-by: Junie <junie@jetbrains.com>
2026-03-15 10:36:35 -07:00
33e71eeee9 Fix gosec, errorlint, and gofmt linter errors in unseal.go and grpc.go
Co-authored-by: Junie <junie@jetbrains.com>
2026-03-15 10:30:18 -07:00
fbaf79a8a0 Fix gosec, govet, and errorlint linter errors
Co-authored-by: Junie <junie@jetbrains.com>
2026-03-15 10:16:28 -07:00
44e5e6e174 Checkpoint: auth, engine, seal, server, grpc updates
Co-authored-by: Junie <junie@jetbrains.com>
2026-03-15 10:15:47 -07:00