feat(pki): add default TTL setting to certificate profiles#5238
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Greptile OverviewGreptile SummaryThis PR adds optional default TTL support to certificate profiles, serving as a fallback when certificates are requested without an explicit TTL. The implementation follows a clear priority hierarchy: request TTL > profile default TTL > flow-specific default (47d for ACME, 90d for EST). Key Changes:
Issues Found:
Overall Assessment: Confidence Score: 4/5
Important Files Changed
|
...src/pages/cert-manager/PoliciesPage/components/CertificateProfilesTab/CreateProfileModal.tsx
Show resolved
Hide resolved
...src/pages/cert-manager/PoliciesPage/components/CertificateProfilesTab/CreateProfileModal.tsx
Show resolved
Hide resolved
...src/pages/cert-manager/PoliciesPage/components/CertificateProfilesTab/CreateProfileModal.tsx
Outdated
Show resolved
Hide resolved
…fectiveTtl` utility, and enhance validation logic.
…lt-certificate-ttl-values-to-profiles # Conflicts: # backend/src/services/certificate-v3/certificate-v3-service.ts
33aa9b0 to
4d4b92a
Compare
backend/src/db/migrations/20260127212335_add-default-ttl-to-certificate-profiles.ts
Show resolved
Hide resolved
backend/src/db/migrations/20260127212335_add-default-ttl-to-certificate-profiles.ts
Show resolved
Hide resolved
backend/src/db/migrations/20260127212335_add-default-ttl-to-certificate-profiles.ts
Show resolved
Hide resolved
…vices, refine TTL resolution logic, and enhance validation and defaults handling
…g explicit error
|
@greptile review this |
Additional Comments (1)
Either pass |
Aren't both falsy? |
backend/src/services/certificate-profile/certificate-profile-service.ts
Outdated
Show resolved
Hide resolved
…es and update its usage
…ltTtlDays is used when no explicit TTL is provided
…icate processing. Rename migration
Context
Certificate profiles now support an optional default TTL setting that serves as a fallback validity period when a TTL is not explicitly specified in the certificate request.
ACME and certificate issuance services can now use the profile's default TTL when no explicit TTL is provided in the request
Screenshots
Steps to verify the change
Create a policy with a max validity, create a profile with a default TTL (<= policy's max validity), use Certbot (ACME) to issue a certificate and it should use the default TTL provided.
Type
Checklist
type(scope): short description(scope is optional, e.g.,fix: prevent crash on syncorfix(api): handle null response).