docs: add self-enrollment client workflow to API documentation
All checks were successful
CI/CD Pipeline / Code Format (push) Successful in 4s
CI/CD Pipeline / Clippy Lints (push) Successful in 41s
CI/CD Pipeline / Unit Tests (push) Successful in 54s
CI/CD Pipeline / Security Audit (push) Successful in 5s
CI/CD Pipeline / Build Debian Package (Ubuntu 22.04) (push) Successful in 2m16s
CI/CD Pipeline / Build Debian Package (push) Successful in 2m17s
CI/CD Pipeline / Build Arch Package (push) Successful in 2m30s
CI/CD Pipeline / Build Alpine Package (push) Successful in 3m29s
CI/CD Pipeline / Build RPM Package (push) Successful in 3m53s
All checks were successful
CI/CD Pipeline / Code Format (push) Successful in 4s
CI/CD Pipeline / Clippy Lints (push) Successful in 41s
CI/CD Pipeline / Unit Tests (push) Successful in 54s
CI/CD Pipeline / Security Audit (push) Successful in 5s
CI/CD Pipeline / Build Debian Package (Ubuntu 22.04) (push) Successful in 2m16s
CI/CD Pipeline / Build Debian Package (push) Successful in 2m17s
CI/CD Pipeline / Build Arch Package (push) Successful in 2m30s
CI/CD Pipeline / Build Alpine Package (push) Successful in 3m29s
CI/CD Pipeline / Build RPM Package (push) Successful in 3m53s
This commit is contained in:
20
SPEC.md
20
SPEC.md
@ -136,12 +136,30 @@
|
||||
## Certificate Management
|
||||
|
||||
- **CA Type:** Internal self-hosted Certificate Authority
|
||||
- **Distribution:** Manual certificate distribution to clients
|
||||
- **Distribution:** Manual certificate distribution OR automated Self-Enrollment
|
||||
- **Scope:** Limited distribution (small number of authorized clients)
|
||||
- **Validity Period:** 1 year standard expiration
|
||||
- **Client Identity:** Unique certificate per client (no shared certs)
|
||||
- **Rotation:** Manual renewal process before expiration
|
||||
|
||||
## Self-Enrollment Workflow
|
||||
|
||||
The `linux_patch_api` daemon supports an automated self-enrollment workflow to securely request identity from the `linux_patch_manager` without manual PKI distribution.
|
||||
|
||||
- **Trigger:** Initiated via CLI flag during setup/first run (e.g., `linux_patch_api --enroll https://<manager_url>`).
|
||||
- **Phase 1: Registration Request:**
|
||||
- Extracts `/etc/machine-id`, FQDN, IP Address, and OS details.
|
||||
- Submits an unauthenticated `POST /api/v1/enroll` request to the manager.
|
||||
- Receives a temporary `polling_token`.
|
||||
- **Phase 2: Polling & Approval:**
|
||||
- The daemon enters a polling loop, querying `GET /api/v1/enroll/status/{token}` (e.g., every 60 seconds).
|
||||
- Aborts if HTTP 403 or 404 is returned (request denied/purged).
|
||||
- **Phase 3: Provisioning:**
|
||||
- Upon HTTP 200, extracts the provided PKI bundle (`ca.crt`, `server.crt`, `server.key`).
|
||||
- Writes certificates to the configured mTLS storage paths.
|
||||
- Automatically appends the manager's IP address to `/etc/linux_patch_api/whitelist.yaml`.
|
||||
- Transitions to standard mTLS listening mode without requiring a service restart.
|
||||
|
||||
## Audit Logging
|
||||
|
||||
- **Log Content (All Required):**
|
||||
|
||||
Reference in New Issue
Block a user