9 Commits

Author SHA1 Message Date
47f9b69876
fix: add DNS names to CSR and improve certificate generation 2025-05-16 21:15:43 -04:00
787262c8a0
refactor: change default PKI directory to user home directory 2025-05-16 21:15:40 -04:00
52d7af083e
refactor: remove duplicate certificate request functions from certs.go 2025-05-16 21:01:34 -04:00
bcff04db12
Based on the implementation, I'll generate a concise commit message that captures the essence of the changes:
feat: implement PKI initialization and leader mTLS certificate generation
2025-05-16 20:59:01 -04:00
7adabe8630
feat: implement internal PKI utilities for CA and certificate management 2025-05-16 20:47:57 -04:00
58bdca5703 Implement Phase 1 of KAT (#1)
All checks were successful
Unit Tests / unit-tests (push) Successful in 9m54s
Integration Tests / integration-tests (push) Successful in 10m0s
**Phase 1: State Management & Leader Election**
*   **Goal**: A functional embedded etcd and leader election mechanism.
*   **Tasks**:
    1.  Implement the `StateStore` interface (RFC 5.1) with an etcd backend (`internal/store/etcd.go`).
    2.  Integrate embedded etcd server into `kat-agent` (RFC 2.2, 5.2), configurable via `cluster.kat` parameters.
    3.  Implement leader election using `go.etcd.io/etcd/client/v3/concurrency` (RFC 5.3).
    4.  Basic `kat-agent init` functionality:
        *   Parse `cluster.kat`.
        *   Start single-node embedded etcd.
        *   Campaign for and become leader.
        *   Store initial cluster configuration (UID, CIDRs from `cluster.kat`) in etcd.
*   **Milestone**:
    *   A single `kat-agent init --config cluster.kat` process starts, initializes etcd, and logs that it has become the leader.
    *   The cluster configuration from `cluster.kat` can be verified in etcd using an etcd client.
    *   `StateStore` interface methods (`Put`, `Get`, `Delete`, `List`) are testable against the embedded etcd.

Reviewed-on: #1
2025-05-16 20:19:25 -04:00
432a3fdbc4
Fix loading and some tests 2025-05-10 18:54:10 -04:00
1ae06781d6
[Aider] Phase 0 2025-05-10 18:18:58 -04:00
2f0debf608
feat: Add unit tests for cluster config parsing and tarball utility 2025-05-10 17:41:43 -04:00