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
misc feedback
x0322057c3c5842ad12
diff --git a/backend/src/ee/routes/v1/project-template-router.ts b/backend/src/ee/routes/v1/project-template-router.tsindex f92f747773..4ea363fc67 100644--- a/backend/src/ee/routes/v1/project-template-router.ts+++ b/backend/src/ee/routes/v1/project-template-router.ts@@ -311,8 +311,10 @@ export const registerProjectTemplateRouter = async (server: FastifyZodProvider)environments: ProjectTemplateEnvironmentsSchema.nullish().describe(ProjectTemplates.CREATE.environments),users: ProjectTemplateUsersSchema.default([]).describe(ProjectTemplates.CREATE.users),groups: ProjectTemplateGroupsSchema.default([]).describe(ProjectTemplates.CREATE.groups),- identities: ProjectTemplateIdentitiesSchema.default([]),- projectManagedIdentities: ProjectTemplateProjectManagedIdentitiesSchema.default([])+ identities: ProjectTemplateIdentitiesSchema.default([]).describe(ProjectTemplates.CREATE.identities),+ projectManagedIdentities: ProjectTemplateProjectManagedIdentitiesSchema.default([]).describe(+ ProjectTemplates.CREATE.projectManagedIdentities+ )}).superRefine((data, ctx) => {validateUserRoles(data.users, data.roles, ctx);@@ -364,8 +366,10 @@ export const registerProjectTemplateRouter = async (server: FastifyZodProvider)environments: ProjectTemplateEnvironmentsSchema.nullish().describe(ProjectTemplates.UPDATE.environments),users: ProjectTemplateUsersSchema.nullish().describe(ProjectTemplates.UPDATE.users),groups: ProjectTemplateGroupsSchema.nullish().describe(ProjectTemplates.UPDATE.groups),- identities: ProjectTemplateIdentitiesSchema.nullish(),- projectManagedIdentities: ProjectTemplateProjectManagedIdentitiesSchema.nullish()+ identities: ProjectTemplateIdentitiesSchema.nullish().describe(ProjectTemplates.UPDATE.identities),+ projectManagedIdentities: ProjectTemplateProjectManagedIdentitiesSchema.nullish().describe(+ ProjectTemplates.UPDATE.projectManagedIdentities+ )}).superRefine((data, ctx) => {// Note: For updates, if users are provided but roles are not, validation against existing template rolesdiff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.tsindex 61c4894337..4ac4a0a8cd 100644--- a/backend/src/lib/api-docs/constants.ts+++ b/backend/src/lib/api-docs/constants.ts@@ -2332,7 +2332,11 @@ export const ProjectTemplates = {users:"The users to be automatically added to projects created from this template. Each user is identified by username and assigned one or more roles.",groups:- "The groups to be automatically added to projects created from this template. Each group is identified by slug and assigned one or more roles."+ "The groups to be automatically added to projects created from this template. Each group is identified by slug and assigned one or more roles.",+ identities:+ "The organization-owned identities to be automatically added to projects created from this template. Each identity is identified by ID and assigned one or more roles.",+ projectManagedIdentities:+ "The project-owned identities to be automatically created for projects created from this template. Each identity is identified by name and assigned one or more roles."},UPDATE: {templateId: "The ID of the project template to be updated.",@@ -2343,7 +2347,11 @@ export const ProjectTemplates = {users:"The updated users to be automatically added to projects created from this template. Each user is identified by username and assigned one or more roles.",groups:- "The updated groups to be automatically added to projects created from this template. Each group is identified by slug and assigned one or more roles."+ "The updated groups to be automatically added to projects created from this template. Each group is identified by slug and assigned one or more roles.",+ identities:+ "The updated organization-owned identities to be automatically added to projects created from this template. Each identity is identified by ID and assigned one or more roles.",+ projectManagedIdentities:+ "The updated project-owned identities to be automatically created for projects created from this template. Each identity is identified by name and assigned one or more roles."},DELETE: {templateId: "The ID of the project template to be deleted."diff --git a/backend/src/services/project/project-service.ts b/backend/src/services/project/project-service.tsindex e770209b0d..4bd8ae0507 100644--- a/backend/src/services/project/project-service.ts+++ b/backend/src/services/project/project-service.ts@@ -6,6 +6,7 @@ import {AccessScope,ActionProjectType,OrganizationActionScope,+ OrgMembershipRole,ProjectMembershipRole,ProjectType,ProjectVersion,@@ -609,7 +610,7 @@ export const projectServiceFactory = ({roleAssignments.push({membershipId: orgMembership.id,- role: ProjectMembershipRole.NoAccess+ role: OrgMembershipRole.NoAccess});for (const roleSlug of templateIdentity.roles) {diff --git a/frontend/src/pages/organization/SettingsPage/components/ProjectTemplatesTab/components/EditProjectTemplateSection/components/ProjectTemplateIdentitiesSection.tsx b/frontend/src/pages/organization/SettingsPage/components/ProjectTemplatesTab/components/EditProjectTemplateSection/components/ProjectTemplateIdentitiesSection.tsxindex 0c1f18bbf5..a3866452aa 100644--- a/frontend/src/pages/organization/SettingsPage/components/ProjectTemplatesTab/components/EditProjectTemplateSection/components/ProjectTemplateIdentitiesSection.tsx+++ b/frontend/src/pages/organization/SettingsPage/components/ProjectTemplatesTab/components/EditProjectTemplateSection/components/ProjectTemplateIdentitiesSection.tsx@@ -342,7 +342,7 @@ export const ProjectTemplateIdentitiesSection = ({isDisabled={!isAllowed}type="button">- Add Identity+ Add Machine Identity</Button></div>)}diff --git a/frontend/src/pages/organization/SettingsPage/components/ProjectTemplatesTab/components/ProjectTemplatesTable.tsx b/frontend/src/pages/organization/SettingsPage/components/ProjectTemplatesTab/components/ProjectTemplatesTable.tsxindex bb1f292392..a642ab16cf 100644--- a/frontend/src/pages/organization/SettingsPage/components/ProjectTemplatesTab/components/ProjectTemplatesTable.tsx+++ b/frontend/src/pages/organization/SettingsPage/components/ProjectTemplatesTab/components/ProjectTemplatesTable.tsx@@ -71,7 +71,7 @@ export const ProjectTemplatesTable = ({ onEdit }: Props) => {<Th>Roles</Th><Th>Users</Th><Th>Groups</Th>- <Th>Identities</Th>+ <Th>Machine Identities</Th><Th /></Tr></THead>@@ -178,7 +178,32 @@ export const ProjectTemplatesTable = ({ onEdit }: Props) => {</Tooltip>)}</Td>- <Td className="pl-8">{totalIdentities}</Td>+ <Td className="pl-8">+ {totalIdentities}+ {Boolean(totalIdentities) && (+ <Tooltip+ content={+ <ul className="ml-2 list-disc">+ {(projectManagedIdentities || []).map((identity) => (+ <li key={identity.name}>{identity.name}</li>+ ))}+ {identities && Boolean(identities?.length) && (+ <li key="org">+ {identities.length} Organization Identit+ {identities.length === 1 ? "y" : "ies"}+ </li>+ )}+ </ul>+ }+ >+ <FontAwesomeIcon+ size="sm"+ className="ml-2 text-mineshaft-400"+ icon={faCircleInfo}+ />+ </Tooltip>+ )}+ </Td><Td className="w-5">{name !== "default" && (<OrgPermissionCan