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
feat: resolved reptile changes
=b5c3f17ec141
diff --git a/backend/src/ee/routes/v1/dynamic-secret-router.ts b/backend/src/ee/routes/v1/dynamic-secret-router.tsindex 486f92980a..ba2a5e4ebc 100644--- a/backend/src/ee/routes/v1/dynamic-secret-router.ts+++ b/backend/src/ee/routes/v1/dynamic-secret-router.ts@@ -7,6 +7,7 @@ import { daysToMillisecond } from "@app/lib/dates";import { removeTrailingSlash } from "@app/lib/fn";import { ms } from "@app/lib/ms";import { isValidHandleBarTemplate } from "@app/lib/template/validate-handlebars";+import { CharacterType, characterValidator } from "@app/lib/validator/validate-string";import { readLimit, writeLimit } from "@app/server/config/rateLimiter";import { slugSchema } from "@app/server/lib/schemas";import { verifyAuth } from "@app/server/plugins/auth/verify-auth";@@ -14,9 +15,21 @@ import { SanitizedDynamicSecretSchema } from "@app/server/routes/sanitizedSchemaimport { AuthMode } from "@app/services/auth/auth-type";import { ResourceMetadataSchema } from "@app/services/resource-metadata/resource-metadata-schema";+const validateUsernameTemplateCharacters = characterValidator([+ CharacterType.AlphaNumeric,+ CharacterType.Underscore,+ CharacterType.Hyphen,+ CharacterType.OpenBrace,+ CharacterType.CloseBrace,+ CharacterType.CloseBracket,+ CharacterType.OpenBracket,+ CharacterType.Fullstop+]);+const userTemplateSchema = z.string().trim()+ .refine((el) => validateUsernameTemplateCharacters(el)).refine((el) =>isValidHandleBarTemplate(el, {allowedExpressions: (val) => ["randomUsername", "unixTimestamp"].includes(val)diff --git a/backend/src/ee/services/dynamic-secret/providers/aws-elasticache.ts b/backend/src/ee/services/dynamic-secret/providers/aws-elasticache.tsindex 5e6279a13e..56fa110d13 100644--- a/backend/src/ee/services/dynamic-secret/providers/aws-elasticache.ts+++ b/backend/src/ee/services/dynamic-secret/providers/aws-elasticache.ts@@ -134,7 +134,7 @@ const generatePassword = () => {const generateUsername = (usernameTemplate?: string | null) => {const charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-";- const randomUsername = `inf-${customAlphabet(charset, 32)()}`; // Username must start with an ascii letter, so we prepend the username with "inf-"+ const randomUsername = `inf-${customAlphabet(charset, 32)()}`;if (!usernameTemplate) return randomUsername;return handlebars.compile(usernameTemplate)({diff --git a/backend/src/ee/services/dynamic-secret/providers/mongo-db.ts b/backend/src/ee/services/dynamic-secret/providers/mongo-db.tsindex 2af7dcf4e0..0a15209e0a 100644--- a/backend/src/ee/services/dynamic-secret/providers/mongo-db.ts+++ b/backend/src/ee/services/dynamic-secret/providers/mongo-db.ts@@ -14,7 +14,7 @@ const generatePassword = (size = 48) => {};const generateUsername = (usernameTemplate?: string | null) => {- const randomUsername = alphaNumericNanoId(32); // Username must start with an ascii letter, so we prepend the username with "inf-"+ const randomUsername = alphaNumericNanoId(32);if (!usernameTemplate) return randomUsername;return handlebars.compile(usernameTemplate)({diff --git a/docs/documentation/platform/dynamic-secrets/aws-elasticache.mdx b/docs/documentation/platform/dynamic-secrets/aws-elasticache.mdxindex de8278a8f9..66c4c706a4 100644--- a/docs/documentation/platform/dynamic-secrets/aws-elasticache.mdx+++ b/docs/documentation/platform/dynamic-secrets/aws-elasticache.mdx@@ -103,7 +103,7 @@ The Infisical AWS ElastiCache dynamic secret allows you to generate AWS ElastiCa- `{{unixTimestamp}}`: Current Unix timestamp</ParamField><ParamField path="Customize ElastiCache Statement" type="string">- If you want to provide specific privileges for the generated dynamic credentials, you can modify the ElastiCache statement to your needs. This is useful if you want to only give access to a specific table(s).+ If you want to provide specific privileges for the generated dynamic credentials, you can modify the ElastiCache statement to your needs. This is useful if you want to only give access to a specific resource.</ParamField></Step><Step title="Click `Submit`">diff --git a/docs/documentation/platform/dynamic-secrets/mongo-atlas.mdx b/docs/documentation/platform/dynamic-secrets/mongo-atlas.mdxindex 9830787962..5d27d16e24 100644--- a/docs/documentation/platform/dynamic-secrets/mongo-atlas.mdx+++ b/docs/documentation/platform/dynamic-secrets/mongo-atlas.mdx@@ -7,7 +7,7 @@ The Infisical Mongo Atlas dynamic secret allows you to generate Mongo Atlas Data## Prerequisite-Create a project scopped API Key with the required permission in your Mongo Atlas following the [official doc](https://www.mongodb.com/docs/atlas/configure-api-access/#grant-programmatic-access-to-a-project).+Create a project scoped API Key with the required permission in your Mongo Atlas following the [official doc](https://www.mongodb.com/docs/atlas/configure-api-access/#grant-programmatic-access-to-a-project).<Info>The API Key must have permission to manage users in the project.</Info>@@ -83,7 +83,7 @@ Create a project scopped API Key with the required permission in your Mongo AtlaAfter submitting the form, you will see a dynamic secret created in the dashboard.<Note>- If this step fails, you may have to add the CA certficate.+ If this step fails, you may have to add the CA certificate.</Note>@@ -102,7 +102,7 @@ Create a project scopped API Key with the required permission in your Mongo Atla<Tip>- Ensure that the TTL for the lease fall within the maximum TTL defined when configuring the dynamic secret.+ Ensure that the TTL for the lease falls within the maximum TTL defined when configuring the dynamic secret.</Tip>diff --git a/docs/documentation/platform/dynamic-secrets/rabbit-mq.mdx b/docs/documentation/platform/dynamic-secrets/rabbit-mq.mdxindex 4ec7a62ab9..09c04e61b4 100644--- a/docs/documentation/platform/dynamic-secrets/rabbit-mq.mdx+++ b/docs/documentation/platform/dynamic-secrets/rabbit-mq.mdx@@ -65,9 +65,6 @@ The port that the RabbitMQ management plugin is listening on. This is `15672` byleases.</ParamField>- <ParamField path="CA(SSL)" type="string">- A CA may be required if your DB requires it for incoming connections. This is often the case when connecting to a managed service.- </ParamField><ParamField path="Username Template" type="string" default="{{randomUsername}}">Specifies a template for generating usernames. This field allows customization of how usernames are automatically created.diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapAseInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapAseInputForm.tsxindex 2cb80c0ef6..e5caa5214e 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapAseInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapAseInputForm.tsx@@ -277,7 +277,6 @@ sp_droplogin '{{username}}';`label="Username Template"isError={Boolean(error?.message)}errorText={error?.message}- tooltipText="randomUsername: Function used to generate random username"><Input{...field}diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapHanaInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapHanaInputForm.tsxindex e368f7c549..2fab9b18cc 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapHanaInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapHanaInputForm.tsx@@ -278,7 +278,6 @@ DROP USER {{username}};`,label="Username Template"isError={Boolean(error?.message)}errorText={error?.message}- tooltipText="randomUsername: Function used to generate random username"><Input{...field}