Private
Public Access
1
0

feat: add self-enrollment workflow for automated PKI provisioning
Some checks failed
CI/CD Pipeline / Code Format (push) Failing after 1s
CI/CD Pipeline / Clippy Lints (push) Failing after 43s
CI/CD Pipeline / Enrollment Tests (push) Has been skipped
CI/CD Pipeline / Verify Enrollment CLI Flag (push) Has been skipped
CI/CD Pipeline / All Unit Tests (push) Successful in 1m14s
CI/CD Pipeline / Build Debian Package (push) Has been skipped
CI/CD Pipeline / Build Debian Package (Ubuntu 22.04) (push) Has been skipped
CI/CD Pipeline / Build RPM Package (push) Has been skipped
CI/CD Pipeline / Build Alpine Package (push) Has been skipped
CI/CD Pipeline / Build Arch Package (push) Has been skipped
CI/CD Pipeline / Security Audit (push) Successful in 5s

- Phase 1: CLI args (--enroll flag), enroll module skeleton, config support
- Phase 2: Registration request, polling loop (24h timeout), main.rs integration
- Phase 3: PKI extraction, atomic cert writing, whitelist auto-append, mTLS transition
- Phase 4: E2E test suite, README/DEPLOYMENT docs, CI pipeline
- Phase 5: SPEC.md, API_DOCUMENTATION.md, CHANGELOG.md, ROADMAP.md sync

Security review: APPROVED (0 critical, 0 high findings)
Cross-distro compatible: Debian/Ubuntu, RHEL/CentOS/Fedora, Alpine, Arch Linux
This commit is contained in:
2026-05-17 05:30:42 +00:00
parent d297c8d3b1
commit 9a129170f8
25 changed files with 4610 additions and 70 deletions

View File

@ -61,6 +61,10 @@ sysinfo = "0.30"
# Network utilities
addr = "0.15"
if-addrs = "0.13"
# HTTP client for enrollment communication
reqwest = { version = "0.12", features = ["json", "rustls-tls"] }
# Clap for CLI arguments
clap = { version = "4", features = ["derive", "env"] }
@ -69,6 +73,12 @@ clap = { version = "4", features = ["derive", "env"] }
systemd = "0.10"
pidlock = "0.2"
# URL parsing
url = "2"
# File locking for concurrent-safe whitelist modifications
fs2 = "0.4"
[dev-dependencies]
actix-rt = "2"
tokio-test = "0.4"
@ -77,6 +87,19 @@ serial_test = "3"
tempfile = "3"
criterion = { version = "0.5", features = ["html_reports"] }
# Integration tests in subdirectories
[[test]]
name = "enroll_identity"
path = "tests/unit/enroll_identity.rs"
[[test]]
name = "enrollment_test"
path = "tests/integration/enrollment_test.rs"
[[test]]
name = "enrollment_e2e"
path = "tests/e2e/test_enrollment_e2e.rs"
[[bench]]
name = "api_benchmarks"
harness = false