Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Address PR comments

Carlos Monastyrski04e3d2d2480e
diff --git a/backend/src/services/certificate-authority/acme/acme-certificate-authority-fns.ts b/backend/src/services/certificate-authority/acme/acme-certificate-authority-fns.ts
index fc30aec1ee..7ec5e67943 100644
--- a/backend/src/services/certificate-authority/acme/acme-certificate-authority-fns.ts
+++ b/backend/src/services/certificate-authority/acme/acme-certificate-authority-fns.ts
@@ -155,9 +155,9 @@ type TAcmeCertificateAuthorityFnsDeps = {
pkiSyncQueue: Pick<TPkiSyncQueueFactory, "queuePkiSyncSyncCertificatesById">;
projectDAL: Pick<TProjectDALFactory, "findById" | "findOne" | "updateById" | "transaction">;
certificateProfileDAL?: Pick<TCertificateProfileDALFactory, "findById">;
- gatewayV2Service?: Pick<TGatewayV2ServiceFactory, "getPlatformConnectionDetailsByGatewayId">;
- gatewayPoolService?: Pick<TGatewayPoolServiceFactory, "resolveEffectiveGatewayId">;
- keyStore?: Pick<TKeyStoreFactory, "acquireLock">;
+ gatewayV2Service: Pick<TGatewayV2ServiceFactory, "getPlatformConnectionDetailsByGatewayId">;
+ gatewayPoolService: Pick<TGatewayPoolServiceFactory, "resolveEffectiveGatewayId">;
+ keyStore: Pick<TKeyStoreFactory, "acquireLock">;
};
type TOrderCertificateDeps = {
@@ -173,9 +173,9 @@ type TOrderCertificateDeps = {
>;
projectDAL: Pick<TProjectDALFactory, "findById" | "findOne" | "updateById" | "transaction">;
certificateProfileDAL?: Pick<TCertificateProfileDALFactory, "findById">;
- gatewayV2Service?: Pick<TGatewayV2ServiceFactory, "getPlatformConnectionDetailsByGatewayId">;
- gatewayPoolService?: Pick<TGatewayPoolServiceFactory, "resolveEffectiveGatewayId">;
- keyStore?: Pick<TKeyStoreFactory, "acquireLock">;
+ gatewayV2Service: Pick<TGatewayV2ServiceFactory, "getPlatformConnectionDetailsByGatewayId">;
+ gatewayPoolService: Pick<TGatewayPoolServiceFactory, "resolveEffectiveGatewayId">;
+ keyStore: Pick<TKeyStoreFactory, "acquireLock">;
};
type DBConfigurationColumn = {
@@ -1002,7 +1002,10 @@ export const AcmeCertificateAuthorityFns = ({
certificateBodyDAL,
certificateSecretDAL,
kmsService,
- projectDAL
+ projectDAL,
+ gatewayV2Service,
+ gatewayPoolService,
+ keyStore
}
);
await triggerAutoSyncForSubscriber(subscriber.id, { pkiSyncDAL, pkiSyncQueue });
diff --git a/backend/src/services/certificate-authority/acme/dns-providers/powerdns.ts b/backend/src/services/certificate-authority/acme/dns-providers/powerdns.ts
index b3caa41679..96585e6951 100644
--- a/backend/src/services/certificate-authority/acme/dns-providers/powerdns.ts
+++ b/backend/src/services/certificate-authority/acme/dns-providers/powerdns.ts
@@ -59,7 +59,7 @@ const withRrsetLock = async <T>(
if (!lock) {
throw new Error(
- `Timed out waiting to update the PowerDNS record '${name}'. Another certificate order is using it. Retry the order.`
+ `Timed out waiting to update the PowerDNS record '${name}'. Another certificate order is still using it.`
);
}
diff --git a/backend/src/services/certificate-authority/certificate-authority-queue.ts b/backend/src/services/certificate-authority/certificate-authority-queue.ts
index 77aedcdf1a..995ad332f2 100644
--- a/backend/src/services/certificate-authority/certificate-authority-queue.ts
+++ b/backend/src/services/certificate-authority/certificate-authority-queue.ts
@@ -100,7 +100,8 @@ export const certificateAuthorityQueueFactory = ({
pkiSyncDAL,
pkiSyncQueue,
gatewayV2Service,
- gatewayPoolService
+ gatewayPoolService,
+ keyStore
});
const azureAdCsFns = AzureAdCsCertificateAuthorityFns({
diff --git a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AcmeFields.tsx b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AcmeFields.tsx
index 56c467610f..ad5f221e7c 100644
--- a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AcmeFields.tsx
+++ b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AcmeFields.tsx
@@ -220,7 +220,9 @@ export const AcmeFields = ({
control={control}
render={({ field: { value, onChange }, fieldState: { error } }) => (
<Field className="mb-4">
- <FieldLabel>Zone</FieldLabel>
+ <FieldLabel>
+ Zone <span className="text-danger">*</span>
+ </FieldLabel>
<FilterableSelect
isLoading={isPowerDnsZonesPending && !!dnsAppConnection.id}
isDisabled={!dnsAppConnection.id}
@@ -233,7 +235,7 @@ export const AcmeFields = ({
}}
options={powerDnsZones}
placeholder="Select a zone..."
- getOptionLabel={(option) => option.name}
+ getOptionLabel={(option) => option.name.replace(/\.$/, "")}
getOptionValue={(option) => option.id}
isError={Boolean(error)}
/>
@@ -256,6 +258,13 @@ export const AcmeFields = ({
placeholder="https://acme-v02.api.letsencrypt.org/directory"
isError={Boolean(error)}
/>
+ {field.value?.startsWith("http://") && (
+ <p className="mt-2 flex items-center gap-1.5 text-xs text-warning">
+ <Info className="size-3.5" />
+ This directory is served over plain HTTP. Account credentials and EAB keys will be
+ sent unencrypted. Use HTTPS unless this is a local test directory.
+ </p>
+ )}
<FieldError errors={[error]} />
</Field>
)}
@@ -289,6 +298,16 @@ export const AcmeFields = ({
) : (
<span className="text-muted">(optional)</span>
)}
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Info />
+ </TooltipTrigger>
+ <TooltipContent className="max-w-md">
+ The key identifier your CA issued for External Account Binding. It ties this ACME
+ account to your existing account with the CA. Required by CAs such as DigiCert,
+ ZeroSSL and Google Trust Services.
+ </TooltipContent>
+ </Tooltip>
</FieldLabel>
<Input
{...field}
@@ -308,6 +327,15 @@ export const AcmeFields = ({
<Field className="mb-4">
<FieldLabel>
EAB HMAC Key <span className="text-muted">(optional)</span>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Info />
+ </TooltipTrigger>
+ <TooltipContent className="max-w-md">
+ The base64-encoded HMAC key issued alongside the EAB Key Identifier. Provide both or
+ neither.
+ </TooltipContent>
+ </Tooltip>
</FieldLabel>
<Input
type="password"
diff --git a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsx b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsx
index 2b79464634..81045bec65 100644
--- a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsx
+++ b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsx
@@ -474,6 +474,30 @@ export const ExternalCaModal = ({ popUp, handlePopUpToggle }: Props) => {
availableGoDaddyConnections
]);
+ const dnsAppConnections: TAvailableAppConnection[] = useMemo(() => {
+ switch (dnsProvider) {
+ case AcmeDnsProvider.ROUTE53:
+ return availableRoute53Connections || [];
+ case AcmeDnsProvider.Cloudflare:
+ return availableCloudflareConnections || [];
+ case AcmeDnsProvider.DNSMadeEasy:
+ return availableDNSMadeEasyConnections || [];
+ case AcmeDnsProvider.AzureDNS:
+ return availableAzureDNSConnections || [];
+ case AcmeDnsProvider.PowerDns:
+ return availablePowerDnsConnections || [];
+ default:
+ return [];
+ }
+ }, [
+ dnsProvider,
+ availableRoute53Connections,
+ availableCloudflareConnections,
+ availableDNSMadeEasyConnections,
+ availableAzureDNSConnections,
+ availablePowerDnsConnections
+ ]);
+
const isPending =
((isRoute53Pending ||
isCloudflarePending ||
@@ -964,7 +988,7 @@ export const ExternalCaModal = ({ popUp, handlePopUpToggle }: Props) => {
dnsProvider={dnsProvider}
directoryUrl={directoryUrl}
dnsAppConnection={dnsAppConnection}
- availableConnections={availableConnections}
+ availableConnections={dnsAppConnections}
isPending={isPending}
cloudflareZones={cloudflareZones}
isZonesPending={isZonesPending}
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/PowerDnsConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/PowerDnsConnectionForm.tsx
index fb2730e697..9834009f66 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/PowerDnsConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/PowerDnsConnectionForm.tsx
@@ -99,6 +99,19 @@ const formSchema = z.discriminatedUnion("method", [
type FormData = z.infer<typeof formSchema>;
+const normalizeApiUrl = (value: string) => {
+ const trimmed = value.trim();
+ if (!trimmed) return trimmed;
+
+ try {
+ const url = new URL(trimmed);
+ url.pathname = url.pathname.replace(/\/api(\/v\d+)?\/*$/, "");
+ return url.toString().replace(/\/$/, "");
+ } catch {
+ return trimmed;
+ }
+};
+
export const PowerDnsConnectionForm = ({ appConnection, onSubmit }: Props) => {
const isUpdate = Boolean(appConnection);
const [selectedTab, setSelectedTab] = useState("configuration");
@@ -212,7 +225,7 @@ export const PowerDnsConnectionForm = ({ appConnection, onSubmit }: Props) => {
<Controller
name="credentials.apiUrl"
control={control}
- render={({ field: { value, onChange }, fieldState: { error } }) => (
+ render={({ field: { value, onChange, onBlur }, fieldState: { error } }) => (
<Field className="mb-4">
<FieldLabel htmlFor="api-url">API URL</FieldLabel>
<FieldDescription>
@@ -222,6 +235,10 @@ export const PowerDnsConnectionForm = ({ appConnection, onSubmit }: Props) => {
id="api-url"
value={value}
onChange={(e) => onChange(e.target.value)}
+ onBlur={(e) => {
+ onChange(normalizeApiUrl(e.target.value));
+ onBlur();
+ }}
placeholder="https://pdns.example.com:8081"
isError={Boolean(error?.message)}
/>