Skip to content

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

misc: addressed more feedback

Sheen Capadnganc2b2aa16a4b2
diff --git a/backend/src/services/project/project-service.ts b/backend/src/services/project/project-service.ts
index b1381562ea..2a900dcd35 100644
--- a/backend/src/services/project/project-service.ts
+++ b/backend/src/services/project/project-service.ts
@@ -206,8 +206,7 @@ export type TProjectServiceFactory = ReturnType<typeof projectServiceFactory>;
// Cosmetic overrides for requestProjectAccess; unlisted types fall back to the raw type/name.
const PROJECT_ACCESS_REQUEST_URL_SLUGS: Partial<Record<ProjectType, string>> = {
- [ProjectType.SecretManager]: "secret-management",
- [ProjectType.CertificateManager]: "cert-manager"
+ [ProjectType.SecretManager]: "secret-management"
};
const PROJECT_ACCESS_REQUEST_PRODUCT_LABELS: Partial<Record<ProjectType, string>> = {
@@ -2301,6 +2300,7 @@ export const projectServiceFactory = ({
const encodedRequesterEmail = encodeURIComponent(userDetails.email ?? "");
const orgScopedProductPath: Partial<Record<ProjectType, string>> = {
+ [ProjectType.CertificateManager]: "cert-manager",
[ProjectType.PAM]: "pam",
[ProjectType.AgentVault]: "agent-vault"
};
diff --git a/backend/src/services/signer/signer-issuance-fns.ts b/backend/src/services/signer/signer-issuance-fns.ts
index 87be5cfac2..a8b2547ace 100644
--- a/backend/src/services/signer/signer-issuance-fns.ts
+++ b/backend/src/services/signer/signer-issuance-fns.ts
@@ -91,7 +91,7 @@ export const issueSignerCertificate = async (
const ca = await certificateAuthorityDAL.findByIdWithAssociatedCa(caId, tx);
if (!ca || ca.projectId !== projectId) {
throw new BadRequestError({
- message: `Certificate authority '${caId}' is not in this project.`
+ message: `Certificate authority '${caId}' is not in this organization.`
});
}
if (ca.status !== CaStatus.ACTIVE) {
@@ -239,7 +239,7 @@ export const issueHsmBackedSignerCertificate = async (
const ca = await deps.certificateAuthorityDAL.findByIdWithAssociatedCa(input.caId);
if (!ca || ca.projectId !== input.projectId) {
throw new BadRequestError({
- message: `Certificate authority '${input.caId}' is not in this project.`
+ message: `Certificate authority '${input.caId}' is not in this organization.`
});
}
if (ca.status !== CaStatus.ACTIVE) {
diff --git a/backend/src/services/signer/signer-issuance-service.ts b/backend/src/services/signer/signer-issuance-service.ts
index a74c1d162b..6110cb629d 100644
--- a/backend/src/services/signer/signer-issuance-service.ts
+++ b/backend/src/services/signer/signer-issuance-service.ts
@@ -170,7 +170,7 @@ export const signerIssuanceServiceFactory = ({
const ca = await certificateAuthorityDAL.findByIdWithAssociatedCa(input.caId);
if (!ca || ca.projectId !== input.projectId) {
throw new BadRequestError({
- message: `Certificate authority '${input.caId}' is not in this project.`
+ message: `Certificate authority '${input.caId}' is not in this organization.`
});
}
if (ca.status !== CaStatus.ACTIVE) {
diff --git a/backend/src/services/signer/signer-service.ts b/backend/src/services/signer/signer-service.ts
index d2e7e035b1..8af7f9da54 100644
--- a/backend/src/services/signer/signer-service.ts
+++ b/backend/src/services/signer/signer-service.ts
@@ -452,7 +452,7 @@ export const signerServiceFactory = ({
throw new NotFoundError({ message: `Certificate with ID '${dto.certificateId}' not found` });
}
if (certificate.projectId !== dto.projectId) {
- throw new BadRequestError({ message: "Certificate must belong to the same project" });
+ throw new BadRequestError({ message: "Certificate must belong to the same organization" });
}
if (certificate.status === CertStatus.REVOKED) {
throw new BadRequestError({ message: "Certificate has been revoked" });
@@ -478,7 +478,7 @@ export const signerServiceFactory = ({
}
const ca = await certificateAuthorityDAL.findByIdWithAssociatedCa(dto.caId as string);
if (!ca || ca.projectId !== dto.projectId) {
- throw new NotFoundError({ message: `Certificate authority '${dto.caId}' not found in this project.` });
+ throw new NotFoundError({ message: `Certificate authority '${dto.caId}' not found in this organization.` });
}
if (ca.status !== CaStatus.ACTIVE) {
throw new BadRequestError({ message: "The selected certificate authority is not active." });
@@ -559,7 +559,7 @@ export const signerServiceFactory = ({
const result = await signerDAL.transaction(async (tx) => {
const project = await projectDAL.findOne({ id: dto.projectId }, tx);
if (!project) {
- throw new NotFoundError({ message: `Project '${dto.projectId}' not found.` });
+ throw new NotFoundError({ message: "Certificate Manager has not been set up for this organization." });
}
const policy = await approvalPolicyDAL.create(
{
@@ -834,7 +834,9 @@ export const signerServiceFactory = ({
} catch (error) {
// 23505 = unique constraint violation
if (error instanceof DatabaseError && (error.error as { code?: string })?.code === "23505") {
- throw new BadRequestError({ message: `A signer with the name '${dto.name}' already exists in this project` });
+ throw new BadRequestError({
+ message: `A signer with the name '${dto.name}' already exists in this organization`
+ });
}
throw error;
}
@@ -1268,7 +1270,7 @@ export const signerServiceFactory = ({
const ca = await certificateAuthorityDAL.findByIdWithAssociatedCa(dto.caId);
if (!ca || ca.projectId !== signer.projectId) {
- throw new NotFoundError({ message: `Certificate authority '${dto.caId}' not found in this project.` });
+ throw new NotFoundError({ message: `Certificate authority '${dto.caId}' not found in this organization.` });
}
if (ca.status !== CaStatus.ACTIVE) {
throw new BadRequestError({ message: "The selected certificate authority is not active." });
@@ -2008,7 +2010,7 @@ export const signerServiceFactory = ({
const ca = await certificateAuthorityDAL.findByIdWithAssociatedCa(signer.caId);
if (!ca || ca.projectId !== signer.projectId) {
- const reason = `Certificate authority '${signer.caId}' is no longer available in the project.`;
+ const reason = `Certificate authority '${signer.caId}' is no longer available in this organization.`;
logger.warn(`signer auto-renewal: ${reason} [signerId=${signer.id}]`);
await signerDAL.updateById(signer.id, {
status: SignerStatus.Failed,