Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix(ui): clear stale ADCS template on issuer type or CA change
Scott Wilson010de204fab7
diff --git a/frontend/src/pages/cert-manager/PoliciesPage/components/CertificateProfilesTab/CreateProfileModal.tsx b/frontend/src/pages/cert-manager/PoliciesPage/components/CertificateProfilesTab/CreateProfileModal.tsxindex 92d3cac1ed..7df9b95428 100644--- a/frontend/src/pages/cert-manager/PoliciesPage/components/CertificateProfilesTab/CreateProfileModal.tsx+++ b/frontend/src/pages/cert-manager/PoliciesPage/components/CertificateProfilesTab/CreateProfileModal.tsx@@ -972,6 +972,7 @@ export const CreateProfileModal = ({ isOpen, onClose, profile, mode = "create" }onValueChange={(next) => {if (next === IssuerType.SELF_SIGNED) {setValue("certificateAuthorityId", "");+ setValue("externalConfigs", undefined);}onChange(next);}}@@ -1011,17 +1012,22 @@ export const CreateProfileModal = ({ isOpen, onClose, profile, mode = "create" }<FilterableSelectvalue={certificateAuthorities.find((ca) => ca.id === value) || null}onChange={(selectedCaValue) => {+ let nextCaId = "";if (Array.isArray(selectedCaValue)) {- onChange(selectedCaValue[0]?.id || "");+ nextCaId = selectedCaValue[0]?.id || "";} else if (selectedCaValue &&typeof selectedCaValue === "object" &&"id" in selectedCaValue) {- onChange(selectedCaValue.id || "");- } else {- onChange("");+ nextCaId = selectedCaValue.id || "";}+ if (nextCaId !== value) {+ // Templates are per-CA; a stale hidden template would+ // fail step validation for non-ADCS issuers.+ setValue("externalConfigs", undefined);+ }+ onChange(nextCaId);}}getOptionLabel={(ca) => ca.name}getOptionValue={(ca) => ca.id}