Repository navigation
fix(agent): reuse managed certificates across restarts - #419
devin-ai-integration[bot] wants to merge 8 commits into
Conversation
Co-Authored-By: ashwin <ashwin@infisical.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Co-Authored-By: ashwin <ashwin@infisical.com>
Co-Authored-By: ashwin <ashwin@infisical.com>
Co-Authored-By: ashwin <ashwin@infisical.com>
Co-Authored-By: ashwin <ashwin@infisical.com>
Co-Authored-By: ashwin <ashwin@infisical.com>
|
Validation is complete on Fixes made during validation:
|
Co-Authored-By: ashwin <ashwin@infisical.com>
Co-Authored-By: ashwin <ashwin@infisical.com>
Description
Fixes #298. Profile-managed certificates currently issue on every Agent startup, consuming CA quota during systemd restarts and reboots.
<certificate.path>.infisical-state.json; optionallifecycle.state-pathsupports restricted writable directories. No private keys are stored in state.renew-before-expiry, preserve periodic status checks, and lock state against concurrent processes.omit-rootchanges without reissuing.Pre-upgrade recovery requires read access to the certificate profile. Keep state across restarts. A crash between submission and recording the response requires checking Infisical before restoring/removing state, rather than risking duplicate issuance.
Type
Tests
Local tests use a mock API and generated X.509 certificates, without external CA requests. Coverage includes restart reuse with/without state, actual-expiry and periodic renewal, pending issuance/renewal, output repair, invalid identities and keys, SAN-only leaves, external CSR keys, changed configuration, interrupted delivery and reload hooks, retry safety, revocation, state locks and takeover, symlink-safe paths, permissions, and chain integrity/root policy.
Real-backend CI coverage includes default root omission and restart reuse against an internal CA, plus ACME/Pebble certificate reuse after restart. Only fixtures requiring a nonempty root chain explicitly include roots. The E2E package is compile-checked locally; execution runs in CI.
The following local commands pass:
Changed Go files are gofmt-clean. Full-repository formatting and vet report existing issues in unchanged files. Full
go vet ./packages/...reports diagnostics inpackages/cmd/run.go,packages/gateway-v2/connection.go, andpackages/pam/handlers/kubernetes/proxy.go; Cmd tests disable vet to avoid existing dynamicMsgfdiagnostics.Link to Devin session: https://app.devin.ai/sessions/50f4661509d14da1b15820e86dc2b019
Open in Devin Desktop: https://app.devin.ai/desktop/session/50f4661509d14da1b15820e86dc2b019?variant=devin
Requested by: @ashwin-infisical