Commit Graph

106 Commits

Author SHA1 Message Date
Shankar f644b5ea80 docs: add value context, usage examples, and fix stale counts in features.md
Every major section now explains why the feature matters (not just what it
does) with concrete curl examples. Fixes stale counts: 84→91 endpoints,
18→19 tables, 860→900+ tests, 85→93 OpenAPI operations. Adds network scan
env vars to config reference and M21/M22 rows to feature matrix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 23:52:00 -04:00
Shankar d768848825 fix: remove duplicate containsSubstring helper and update README for M21+M22
Removes redeclared containsSubstring from network_scan_test.go (already
defined in profile_test.go in the same package). Updates README with 91
endpoints, 19 tables, network discovery API section, Prometheus endpoint,
and M21/M22 roadmap entries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 23:43:42 -04:00
Shankar be85fbd77e feat: add network certificate discovery (M21) and Prometheus metrics (M22)
M21 adds server-side active TLS scanning of CIDR ranges with concurrent
probing, sentinel agent pattern for pipeline reuse, and full CRUD API for
scan targets. M22 adds Prometheus exposition format endpoint alongside
existing JSON metrics. Comprehensive documentation audit updates all docs
to reflect 91 endpoints, 19 tables, 6 scheduler loops, and 900+ tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 23:37:47 -04:00
Shankar 3dc76e0b87 fix: normalize certificate status case in stats service
The stats service compared statuses using exact string match against
PascalCase domain constants, but the database may contain legacy
lowercase values. This caused the dashboard to show duplicate pie chart
segments (green "Active" + gray "active") and incorrect summary counts.

Use strings.ToLower() normalization in both GetCertificatesByStatus and
GetDashboardSummary to handle any case variant from the database.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 12:17:24 -04:00
Shankar 520dc06e15 fix: normalize seed data status values to match domain constants
Seed data used lowercase statuses ('active', 'expiring', 'expired',
'renewal_in_progress', 'failed') but the domain model uses PascalCase
('Active', 'Expiring', 'Expired', 'RenewalInProgress', 'Failed'). This
caused the dashboard pie chart to show two separate "active" segments
because the stats service only recalculates status for certs matching
the capitalized "Active" string.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 12:13:47 -04:00
Shankar 716a0f2958 fix: migration runner only executes .up.sql files, skips .down.sql and seeds
The migration runner was collecting all .sql files alphabetically, which
caused .down.sql rollback files (DROP TABLE) to execute before .up.sql
files on restart with a persisted postgres volume. Filter to only .up.sql
files — these are idempotent (IF NOT EXISTS) and safe to re-run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 12:08:12 -04:00
Shankar a0e0bccc85 fix: bump Docker Go version from 1.22 to 1.25 to match go.mod
go.mod requires go >= 1.25.0 but both Dockerfiles used golang:1.22-alpine,
causing `go mod download` to fail during container build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 12:03:36 -04:00
Shankar 8da760335c docs: add compliance mapping guides and comprehensive documentation audit
Add SOC 2 Type II, PCI-DSS 4.0, and NIST SP 800-57 compliance mapping
guides — the final V2 deliverable. All claims verified against actual
codebase (router.go, config.go, main.go). Also audit and update all
existing docs: fix endpoint/tool/test counts in features.md, expand
demo-guide.md and demo-advanced.md with CLI/MCP/discovery coverage,
update connectors.md F5/IIS status to V3 paid, add compliance reference
to architecture.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 01:36:50 -04:00
Shankar fbb7c69570 fix: remove unused import and variable flagged by go vet
Remove unused repository import from discovery_handler_test.go and
unused tests variable from discovery_test.go (replaced by testCases).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 01:07:16 -04:00
Shankar 734cdce1f1 fix: use repository.DiscoveryFilter in postgres implementation to satisfy interface
The postgres DiscoveryRepository had a duplicate local DiscoveryFilter struct
instead of using repository.DiscoveryFilter, causing a type mismatch that
broke CI build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 01:05:14 -04:00
Shankar 27d2f8b95e feat: M18b Filesystem Certificate Discovery — agent scanning, server dedup, triage API
Agent-side:
- Filesystem scanner walks configured directories (CERTCTL_DISCOVERY_DIRS)
- Parses PEM (.pem, .crt, .cer, .cert) and DER (.der) certificate files
- Extracts CN, SANs, serial, issuer/subject DN, validity, key info, SHA-256 fingerprint
- Reports discoveries to control plane on startup + every 6 hours
- Skips files >1MB and private key files

Server-side:
- Migration 000006: discovered_certificates + discovery_scans tables
- Domain model: DiscoveredCertificate, DiscoveryScan, DiscoveryReport
- Three triage states: Unmanaged, Managed (claimed), Dismissed
- Repository with upsert dedup (fingerprint + agent + path)
- Service layer: process reports, claim, dismiss, list, summary
- 7 new API endpoints (84 total):
  POST /agents/{id}/discoveries, GET /discovered-certificates,
  GET /discovered-certificates/{id}, POST .../claim, POST .../dismiss,
  GET /discovery-scans, GET /discovery-summary
- Audit trail: scan_completed, cert_claimed, cert_dismissed events

Tests: 28 new test functions (domain, handler, service layers)
Docs: README, quickstart, demo-guide, demo-advanced, architecture,
      concepts, connectors, features.md all updated

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 00:25:00 -04:00
Shankar 5ac1bbbc4c docs: add feature inventory, complete demo-advanced and architecture coverage
- Create docs/features.md — comprehensive V2 feature inventory (15+ sections
  covering all 77 endpoints, 4 issuers, 5 targets, 6 notifiers, profiles,
  agent groups, revocation, observability, CLI, MCP, and configuration)
- Update docs/demo-advanced.md — add Parts 10-13 (Certificate Profiles,
  Agent Groups, Interactive Approval, Advanced Query Features), fix
  notification channel count (2→6), fix scheduler loop count (4→5),
  update architecture summary flowchart
- Update docs/architecture.md — add revocation data flow diagram (Section
  3.5), profile enforcement note, M20 Enhanced Query API section, OpenAPI
  spec reference, CLI Tool section, update connector test counts (23→57),
  add e2e_test.go mention

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 21:49:26 -04:00
Shankar e23f59d41b docs: add MCP server guide and OpenAPI spec guide
New docs/mcp.md covers MCP server setup with Claude Desktop, Cursor,
and Claude Code, lists all 76 tools across 16 domains, includes example
conversations, and documents security considerations.

New docs/openapi.md covers Swagger UI setup, SDK generation for
TypeScript/Python/Go/Java, Postman import, spec validation, and
contract testing with schemathesis.

Updated cross-references in concepts.md and architecture.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 19:18:50 -04:00
Shankar 9656c6c585 docs: comprehensive V2 documentation update across all guides
Add missing V2 concepts (Certificate Profiles, Revocation with CRL/OCSP,
Short-Lived Certificates, CLI, MCP Server, Observability) to concepts guide.
Update quickstart with revocation examples, sorting/filtering, cursor pagination,
sparse fields, stats/metrics, and approval workflows. Align 5-minute demo guide
and advanced demo to full V2 feature set including revocation workflows, bulk ops,
fleet overview, and dashboard charts. Update architecture with MCP server section,
5th scheduler loop, API audit log, and 860+ test count. Add revocation-across-issuers
section to connectors guide.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 19:10:57 -04:00
Shankar 0d58ce22bf docs: update README and CLAUDE.md for M20 Enhanced Query API
- Mark M20 as complete in V2 roadmap
- Add deployments endpoint to API overview
- Update endpoint count (76 → 77)
- Update test count to 860+
- Document new query params (sort, time-range, cursor, sparse fields)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 18:57:46 -04:00
Shankar 2f0a721b86 feat: M20 Enhanced Query API — sort, time-range filters, cursor pagination, sparse fields, deployments endpoint
V2 (free) query enhancements for certificates:
- `sort` param with direction (`?sort=-notAfter` for descending)
- Time-range filters: `expires_before`, `expires_after`, `created_after`, `updated_after`
- Cursor-based pagination (`?cursor=token&page_size=100`) alongside page-based
- Sparse field selection (`?fields=id,commonName,status`)
- Additional filters: `agent_id`, `profile_id`
- New endpoint: `GET /api/v1/certificates/{id}/deployments`

25 new tests (12 handler + 13 e2e) covering all M20 features.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 18:56:02 -04:00
Shankar 53f2f239af docs: update README, architecture, and connectors for M17/M16b/M19/M16a
- Mark OpenSSL issuer as implemented, add CLI section to README
- Update notifier table (Slack, Teams, PagerDuty, OpsGenie now implemented)
- Add OpenSSL and notifier config vars to configuration table
- Update V2 roadmap milestones (M19, M16a, M17, M16b marked complete)
- Update architecture diagrams (OpenSSL implemented, notifier connectors)
- Add OpenSSL connector docs and notifier env var table to connectors.md
- Update audit trail section (API audit log now implemented)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 18:30:29 -04:00
Shankar bcd19f4170 feat: comprehensive e2e test suite for cross-milestone integration testing
7 test functions with 35+ subtests covering stats/metrics endpoints,
cross-resource workflows (policy→cert→agent→renew→revoke→audit),
job approval workflows, notification endpoints, CRL endpoint,
pagination across 6 endpoints, and issuer/target CRUD lifecycle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 18:25:43 -04:00
Shankar 502902b8c9 feat: M17 OpenSSL/Custom CA issuer connector + M16b CLI tool with bulk import
M17: Script-based issuer connector delegating sign/revoke/CRL to user-provided
scripts. Compatible with any CA tooling (OpenSSL, cfssl, custom PKI). Configurable
timeout, environment variable passthrough. 14 tests including timeout enforcement.

M16b: certctl-cli wraps all 76 REST API endpoints for terminal workflows. Supports
certs/agents/jobs list/get/renew/revoke/cancel, bulk PEM import with progress
reporting, server health status, table and JSON output formats. Zero external
dependencies (stdlib only). 14 tests with mock HTTP server.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 18:12:40 -04:00
Shankar c0de973c53 feat: M19 API audit log + M16a notifier connectors (Slack, Teams, PagerDuty, OpsGenie)
M19: HTTP middleware records every API call to the immutable audit trail
with method, path, actor, SHA-256 body hash, status, and latency. Best-effort
async recording via goroutine. Health/ready probes excluded.

M16a: Four pluggable notifier connectors — Slack (incoming webhook), Teams
(MessageCard), PagerDuty (Events API v2), OpsGenie (Alert API v2). Each
enabled by config env var. 30 new tests across middleware and connectors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:58:14 -04:00
Shankar 04fb4a4853 fix: tolerate empty body on job rejection endpoint
The reject job handler should accept nil/empty bodies (no reason given)
while still rejecting malformed JSON. Check for io.EOF and http.NoBody
to distinguish missing body from invalid body.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:39:16 -04:00
Shankar d460950cce fix: Go 1.25 upgrade, codebase audit fixes, MCP server tests
Upgrade from Go 1.22 to 1.25 (minimum for MCP SDK, actively supported).
CI updated to match.

Codebase audit fixes:
- Local CA parseIP() now uses net.ParseIP — IP SANs no longer silently dropped
- Nil pointer guards in agent.go GetWorkWithTargets for target/cert enrichment
- MCP CreateCertificateInput marks owner_id/team_id as required
- NGINX connector uses CombinedOutput() — captures diagnostic output on failure
- Jobs handler validates JSON decode on rejection body — returns 400 on malformed
- CRL/OCSP handlers propagate requestID for error tracing

MCP server tests (26 tests):
- client_test.go: HTTP client coverage (GET/POST/PUT/DELETE, auth, 204, errors, binary)
- tools_test.go: tool registration, pagination, end-to-end flows with mock API

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:36:25 -04:00
Shankar 7c8d4d29ff fix: pin Go version to 1.23 (minimum for MCP SDK compatibility)
The MCP Go SDK (modelcontextprotocol/go-sdk) requires Go 1.23+. Previous
commit accidentally bumped to 1.25 via go mod tidy on a newer toolchain.
Pin to 1.23 as the minimum compatible version — closest to our original
1.22 baseline. CI updated to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:05:45 -04:00
Shankar a36223a17e fix: update CI to Go 1.25 and add mcp-server to build
go.mod was bumped to go 1.25.0 by go mod tidy. CI was still on 1.22,
causing covdata tool errors. Also adds mcp-server binary to CI build step.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:03:40 -04:00
Shankar 8bd9559ba2 chore: add mcp-server binary to .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:00:59 -04:00
Shankar 4232b4acc7 fix: add go.sum and indirect deps for MCP SDK
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:00:30 -04:00
Shankar 89fe48923d feat: M18a — MCP server exposing all 76 API endpoints as AI-native tools
Separate standalone binary (cmd/mcp-server/) using official MCP Go SDK
(modelcontextprotocol/go-sdk v1.4.1) with stdio transport. Stateless HTTP
proxy translates MCP tool calls to certctl REST API requests. 76 tools
across 16 resource domains with typed input structs and jsonschema tags
for automatic LLM-friendly schema generation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 16:49:39 -04:00
Shankar c65eec4f5e docs: add OpenAPI 3.1 spec covering all 78 API operations
Generate api/openapi.yaml from handler and domain source code. Covers
all 76 endpoints under /api/v1/ plus /health and /ready (78 total).
Includes full request/response schemas, domain model definitions,
enum types (CertificateStatus, JobType, RevocationReason, etc.),
reusable pagination envelope, error responses, and common parameters.

This spec serves as the contract for the upcoming MCP server (M18a)
and enables Swagger/Redocly interactive documentation immediately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 16:21:24 -04:00
Shankar 0a76658ba9 docs: restructure V2 roadmap milestones, add missing env vars to README
Restructure remaining V2 milestones to reflect split ordering:
M18a (MCP Server, V2.1) ships first, M16 split into M16a (notifier
connectors, parallel with M19) and M16b (CLI + bulk import, after
discovery), M18 split into M18a/M18b, compliance mapping docs added.

Add 13 previously undocumented env vars to Configuration table: CORS,
rate limiting, migrations path, scheduler intervals, DNS-01 scripts,
step-ca key/password. Update scheduler diagram with 5th loop
(short-lived expiry check).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 16:08:40 -04:00
Shankar 8ba260e43f docs: add M19 immutable API audit log to V2 roadmap, complete API endpoint documentation
- Add M19 (Immutable API Audit Log) to V2 roadmap — HTTP middleware
  logging every API call to audit_events table
- Mark M14 (Observability) as complete in README roadmap
- Add 16 missing endpoints to API Overview (profiles, agent-groups,
  job approve/reject, audit/notification detail)
- Add Observability section with stats + metrics endpoints
- Fix endpoint count (78 → 76 under /api/v1/)
- Fix page count (17 → 19 pages)
- Note V2 audit trail expansion in Security section

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 00:33:42 -04:00
Shankar 45d6e2f7b2 feat: M14 — Observability (dashboard charts, agent fleet, stats API, metrics, structured logging, rollback)
Backend: StatsService with 5 aggregation methods, JSON metrics endpoint, slog-based
structured logging middleware. Stats API: dashboard summary, certificates-by-status,
expiration timeline, job trends, issuance rate. 23 new backend tests.

Frontend: Recharts-powered dashboard with 4 charts (status pie, expiration heatmap,
job trends line, issuance bar), agent fleet overview page with OS/arch grouping and
version breakdown, deployment rollback buttons on version history. 7 new frontend tests.

78 API endpoints, 744+ total tests (658 Go + 86 Vitest).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 19:46:13 -04:00
Shankar 7d6ae75fae docs: correct test counts, endpoint count, and M15b file locations
README.md:
- Endpoint count: 72 → 71 (actual route registrations)
- Test count: 660+ → 677+ (497 Go functions + 101 subtests + 79 frontend)
- Corrected per-layer test breakdown

architecture.md:
- DER CRL and OCSP responder are implemented (were marked "planned for M15b")
- Added OCSP endpoint and short-lived cert exemption documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 19:20:07 -04:00
Shankar 27f9c8ceb8 fix: handle 'not found' errors as 404 in CRL/OCSP handlers
The error routing only checked for "issuer not found" but not
"certificate not found", causing cert-not-found errors to fall
through to a generic 500. Broadened the check to match any
"not found" error string for both CRL and OCSP handlers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 19:06:37 -04:00
Shankar 95c875d769 fix: wire issuer registry in revocation tests, correct CRL/OCSP handler test URLs
Service tests: newRevocationTestService() was missing SetIssuerRegistry(),
causing all 8 CRL/OCSP tests to fail with "issuer registry not configured".

Handler tests: CRL tests used /api/v1/issuers/{id}/crl but handler parses
/api/v1/crl/{id}. OCSP tests used query string ?serial=X but handler
expects path param /api/v1/ocsp/{id}/{serial}. Fixed all 9 test URLs.

All issues pre-date CI on v2-dev — introduced during M15b.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 16:02:36 -04:00
Shankar 956fc26afd fix: unused certRepo variable and missing revocation wiring
- revocation_test.go: certRepo unused in TestGenerateDERCRL_Success,
  replaced with blank identifier
- lifecycle_test.go: missing revocationRepo init and setter calls
  (SetRevocationRepo, SetNotificationService, SetIssuerRegistry)
  that negative_test.go already had

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 15:55:44 -04:00
Shankar 8f8b4f2a2f fix: remove extra context.Context args from CRL/OCSP tests
GenerateDERCRL and GetOCSPResponse don't take a context parameter,
but all 8 test calls passed context.Background() as the first arg.
Pre-existing issue never caught because CI wasn't running on v2-dev.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 15:40:38 -04:00
Shankar 522b13e296 fix: use service-layer types in adapter tests
GenerateCRL test was passing []issuer.RevokedCertEntry instead of
[]CRLEntry, causing go vet failure. Also fixed OCSPSignRequest
references to use service-layer type for consistency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 15:21:03 -04:00
Shankar 489ec92aca fix: remove unused variable failing go vet in CI
expectedCRL was declared but never used in TestIssuerConnectorAdapter_GenerateCRL_Success.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 15:18:30 -04:00
Shankar 37c9ba252b ci: add v2-dev branch to CI triggers
Pushes to v2-dev were not running CI because the workflow only
triggered on master. Add v2-dev to the push branch list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 15:13:22 -04:00
Shankar cc4c59fbdc feat: M13 — GUI operations (bulk ops, deployment timeline, policy editor, target wizard, audit export, short-lived creds)
Bulk certificate operations: multi-select checkboxes on certificates list with
bulk action bar for triggering renewal, revocation (with RFC 5280 reason modal
and progress bar), and owner reassignment across selected certificates.

Deployment status timeline: visual 4-step lifecycle pipeline (Requested → Issued
→ Deploying → Active) on certificate detail page, powered by per-cert job queries
with animated status indicators for active steps and failure states.

Inline policy editor: edit/save/cancel interface on certificate detail page for
changing renewal policy and certificate profile assignments via dropdown selectors
with lazy-loaded policy and profile lists.

Target connector configuration wizard: 3-step modal (Select Type → Configure →
Review) with type-specific configuration fields for NGINX, Apache, HAProxy, F5
BIG-IP, and IIS targets including required field validation.

Audit trail export: CSV and JSON download buttons on audit page with applied
filters preserved in export. Added action filter input for narrower searches.

Short-lived credentials dashboard: new page at /short-lived showing ephemeral
certificates (profile TTL < 1 hour) with live TTL countdown, auto-refresh every
10 seconds, profile lookup, and stats bar (active/expired/profiles).

DataTable enhanced with optional selectable/selectedKeys/onSelectionChange props
for checkbox multi-select with select-all toggle and row highlighting.

Frontend tests expanded from 53 to 79: full API client endpoint coverage for
profiles, owners, teams, agent groups, revocation, approval/rejection, policy
violations, and issuer creation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 15:07:10 -04:00
Shankar 458a8c2740 feat: M15b — OCSP responder, DER CRL, short-lived exemption, revocation GUI
Backend:
- Embedded OCSP responder: GET /api/v1/ocsp/{issuer_id}/{serial} returns
  signed OCSP responses (good/revoked/unknown) using CA key
- DER-encoded X.509 CRL: GET /api/v1/crl/{issuer_id} returns proper DER CRL
  signed by issuing CA with 24h validity window
- Short-lived cert exemption: certs with profile TTL < 1 hour skip CRL/OCSP
  (expiry is sufficient revocation for ephemeral workloads)
- Extended issuer connector interface with GenerateCRL and SignOCSPResponse
- Local CA implements full CRL/OCSP signing; ACME and step-ca return
  appropriate "use native endpoint" errors
- IssuerConnectorAdapter bridges new methods between layers

Frontend:
- Revoke button on certificate detail page with RFC 5280 reason modal
- Revocation banner with reason display and timestamp
- Revocation status indicators in lifecycle section
- "Revoked" filter option in certificates list
- API client: revokeCertificate() function and Certificate type extensions

Tests: ~31 new tests across connector, service, handler, and adapter layers
Docs: milestones renumbered (M13-M14, M16-M18), M15b marked complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 14:39:10 -04:00
Shankar c2cd48c38b docs: remove version labels from public docs to avoid telegraphing roadmap
Strip explicit V2/V3 version labels from planned features in README,
architecture, connectors, and demo docs. F5/IIS now say "interface only"
and "implementation planned" without version targets. DigiCert and other
future issuers say "planned" without version numbers. Keeps completed
milestones detailed (social proof) while keeping future work abstract.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 13:50:03 -04:00
Shankar d9103b62cf docs: restructure roadmap for V2/V3 product strategy
Trim V2 roadmap to free-tier features only (GUI operations, CLI, notifiers,
Prometheus metrics, OCSP, MCP server, filesystem discovery). Move enterprise
features to V3 with deliberately vague descriptions. Remove specific version
references for F5/IIS implementations and SSE/WebSocket from docs. Add
roadmap.md to gitignore for private strategy tracking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 13:19:37 -04:00
Shankar e39f68630b docs: update README, architecture, and demo docs for M15a revocation
Update test counts (525+ → 600+), table counts (17 → 18), endpoint
counts (68 → 70), add revocation/CRL endpoints to API overview, add
certificate_revocations table to schema docs, update M15 roadmap to
show M15a complete and M15b remaining.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 11:03:37 -04:00
Shankar 5cd9e890f4 feat: M15a — certificate revocation API, CRL endpoint, and revocation notifications
Implements core revocation infrastructure: POST /api/v1/certificates/{id}/revoke
with all 8 RFC 5280 reason codes, JSON-formatted CRL at GET /api/v1/crl, webhook
and email revocation notifications, best-effort issuer notification, and immutable
revocation audit trail. Includes 48 new tests across service, handler, integration,
and domain layers (600+ total). Fixes 3 pre-existing test bugs (team_test error
matching, agent_group delete status code, team handler per_page validation).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 10:59:18 -04:00
Shankar f971662302 fix: correct agent_group_members seed data — reference actual agent IDs
The seed_demo.sql referenced nonexistent agent IDs (agent-web-1, agent-api-1,
agent-db-1) in the agent_group_members table, causing a FK constraint violation
on fresh database initialization. Fixed to use the actual agent IDs defined
earlier in the same file (ag-web-prod, ag-web-staging, ag-iis-prod).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 10:28:41 -04:00
Shankar b9accf010c test: comprehensive test expansion — 330+ to 525+ tests, close M11b coverage gaps
Add 195+ new tests across service, handler, connector, and integration layers:
- Service tests: team (23), owner (21), agent_group (25), issuer (18), issuer_adapter (6)
- Handler tests: teams (26), owners (21)
- NGINX target connector tests (13): config validation, deployment, reload
- Integration tests: 19 M11b endpoint subtests (teams, owners, agent groups CRUD)
- CI pipeline: add ./internal/connector/target/... to test coverage path
- Docs: update test counts to 525+ across README, architecture, CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 23:43:32 -04:00
Shankar d1d59fdd4f docs: cross-validate all documentation against codebase, fix 21 inaccuracies
Fact-checked every doc file against actual source code. Key corrections:
- Table count 14→17 (added profiles, agent_groups, agent_group_members)
- Endpoint count 55→68 (counted from router.go)
- Test count 250+→330+ (99 service + 165 handler + 53 frontend + connectors)
- Dashboard views 14→16 pages (counted from web/src/pages/)
- step-ca marked implemented (was "Planned V2") across all docs
- ACME DNS-01 marked implemented (was "planned") in concepts.md
- Removed ADCS as separate planned connector (handled via sub-CA mode)
- Fixed pointer types in connectors.md interface docs (*string, *time.Time)
- Added 3 missing tables to architecture.md ER diagram
- Added 5 missing env vars to README config table
- Updated M11/M12 to  in README roadmap
- Issuer count in quickstart demo data 3→4 (added step-ca)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 23:12:23 -04:00
Shankar 195de1dde4 feat: M12 — sub-CA mode, ACME DNS-01 challenges, step-ca issuer connector
Sub-CA mode: Local CA loads CA cert+key from disk (CERTCTL_CA_CERT_PATH +
CERTCTL_CA_KEY_PATH) to operate as subordinate CA under enterprise root
(e.g., ADCS). Supports RSA, ECDSA, PKCS#8 keys. Validates IsCA and
KeyUsageCertSign. Falls back to self-signed when paths unset.

DNS-01 challenges: Pluggable DNSSolver interface with script-based hook
implementation. User-provided scripts create/cleanup _acme-challenge TXT
records for any DNS provider. Configurable propagation wait. Enables
wildcard certs and non-HTTP-accessible hosts.

step-ca connector: Smallstep private CA via native /sign API with JWK
provisioner auth. Issuance, renewal, revocation. Registered as iss-stepca.

23 new tests across 3 files. CI test path widened to ./internal/connector/issuer/...

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 22:55:50 -04:00
Shankar 189fd24f02 docs: fix SC-081v3 voting claim — not unanimous, zero opposition with 5 abstentions
The ballot passed 25-0-5 among CAs and 4-0-0 among browsers.
Not unanimous due to 5 CA abstentions (Entrust, IdenTrust,
Japan Registry Services, SECOM, TWCA).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 16:40:51 -04:00