Skip to content

Conversation

@carlosmonastyrski
Copy link
Contributor

Description 📣

Add certificate template presets with industry-standard configurations for TLS server/client, code signing, device, user, email protection, and dual-purpose server certificates

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

Tests 🛠️

# Here's some code block to paste some code snippets

@maidul98
Copy link
Collaborator

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 14, 2025

Greptile Overview

Greptile Summary

Adds certificate template presets to the PKI certificate management UI, allowing users to quickly configure templates with industry-standard settings for common use cases.

Key Changes:

  • New preset selector dropdown in template creation modal with 7 preset options (TLS Server, TLS Client, Code Signing, Device, User, Email Protection, Dual-Purpose Server)
  • Form automatically populates with appropriate key usages, extended key usages, SANs, and algorithm selections when preset is selected
  • Preset automatically resets to "Custom" when user manually modifies any form field
  • Improved type safety by converting string literal arrays to enums (CertSubjectAttributeInclude, CertSanInclude)
  • All presets include reasonable defaults for validity (365 days) and wildcard patterns for flexible certificate issuance

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - it's a frontend-only enhancement with well-structured code
  • The changes are isolated to the frontend certificate template UI with no API modifications or breaking changes. The implementation follows TypeScript best practices with proper type safety, uses standard React patterns, and adds useful UX improvements. The presets align with industry standards for PKI certificate configurations.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
frontend/src/pages/cert-manager/PoliciesPage/components/CertificateTemplatesV2Tab/shared/template-presets.ts 5/5 New file adding certificate template presets with industry-standard configurations for TLS, code signing, device, user, and email protection certificates
frontend/src/pages/cert-manager/PoliciesPage/components/CertificateTemplatesV2Tab/CreateTemplateModal.tsx 5/5 Added preset selection dropdown with automatic form population and logic to reset to custom when user modifies form fields
frontend/src/pages/cert-manager/PoliciesPage/components/CertificateTemplatesV2Tab/shared/certificate-constants.ts 5/5 Converted string literal arrays to enums for type safety and added preset IDs and algorithm families constants
frontend/src/pages/cert-manager/PoliciesPage/components/CertificateTemplatesV2Tab/shared/schemas.ts 5/5 Updated validation schemas to use enums instead of string literals and added preset field validation

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@carlosmonastyrski carlosmonastyrski merged commit afd19f7 into main Nov 14, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants