Skip to content

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

docs: dynamic secret templating

Daniel Hougaardc61b0c0c3508
diff --git a/docs/documentation/platform/dynamic-secrets/aws-elasticache.mdx b/docs/documentation/platform/dynamic-secrets/aws-elasticache.mdx
index 92851cd037..cad659fde7 100644
--- a/docs/documentation/platform/dynamic-secrets/aws-elasticache.mdx
+++ b/docs/documentation/platform/dynamic-secrets/aws-elasticache.mdx
@@ -3,6 +3,8 @@ title: "AWS ElastiCache"
description: "Learn how to dynamically generate AWS ElastiCache user credentials."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical AWS ElastiCache dynamic secret allows you to generate AWS ElastiCache credentials on demand based on configured role.
## Prerequisites
@@ -95,29 +97,7 @@ The Infisical AWS ElastiCache dynamic secret allows you to generate AWS ElastiCa
</Step>
<Step title="(Optional) Modify ElastiCache Statements">
![Modify ElastiCache Statements Modal](/images/platform/dynamic-secrets/modify-elasticache-statement.png)
- <ParamField path="Username Template" type="string" default="{{randomUsername}}">
- Specifies a template for generating usernames. This field allows customization of how usernames are automatically created.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
<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 resource.
</ParamField>
diff --git a/docs/documentation/platform/dynamic-secrets/aws-iam.mdx b/docs/documentation/platform/dynamic-secrets/aws-iam.mdx
index c1fc85257a..e3b84e528f 100644
--- a/docs/documentation/platform/dynamic-secrets/aws-iam.mdx
+++ b/docs/documentation/platform/dynamic-secrets/aws-iam.mdx
@@ -3,6 +3,8 @@ title: "AWS IAM"
description: "Learn how to dynamically generate AWS IAM Users."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical AWS IAM dynamic secret allows you to generate AWS IAM Users and temporary credentials on demand based on a configured AWS policy. Infisical supports several authentication methods to connect to your AWS account, including assuming an IAM Role, using IAM Roles for Service Accounts (IRSA) on EKS, or static Access Keys.
## AWS STS Duration Limits
@@ -185,29 +187,7 @@ Infisical needs an AWS IAM principal (a user or a role) with the required permis
Maximum time-to-live for a generated secret
</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.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
<ParamField path="Tags" type="map<string, string>[]">
Tags to be added to the created IAM User resource.
@@ -253,19 +233,7 @@ Infisical needs an AWS IAM principal (a user or a role) with the required permis
The AWS IAM inline policy that should be attached to the created users. Multiple values can be provided by separating them with commas.
</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.
-
- Allowed template variables are:
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are:
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
<ParamField path="Tags" type="map<string, string>[]">
Tags to be added to the created IAM User resource.
@@ -405,29 +373,7 @@ Infisical needs an AWS IAM principal (a user or a role) with the required permis
<ParamField path="Max TTL" type="string" required>
Maximum time-to-live for a generated secret
</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.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
<ParamField path="Tags" type="map<string, string>[]">
Tags to be added to the created IAM User resource.
</ParamField>
@@ -469,19 +415,7 @@ Infisical needs an AWS IAM principal (a user or a role) with the required permis
The AWS IAM inline policy that should be attached to the created users. Multiple values can be provided by separating them with commas.
</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.
-
- Allowed template variables are:
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are:
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
<ParamField path="Tags" type="map<string, string>[]">
Tags to be added to the created IAM User resource.
@@ -600,19 +534,7 @@ Infisical needs an AWS IAM principal (a user or a role) with the required permis
The AWS IAM inline policy that should be attached to the created users. Multiple values can be provided by separating them with commas.
</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.
-
- Allowed template variables are:
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are:
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
<ParamField path="Tags" type="map[string]string">
Tags to be added to the created IAM User resource.
diff --git a/docs/documentation/platform/dynamic-secrets/azure-sql-database.mdx b/docs/documentation/platform/dynamic-secrets/azure-sql-database.mdx
index f92ea7232a..b95cadf015 100644
--- a/docs/documentation/platform/dynamic-secrets/azure-sql-database.mdx
+++ b/docs/documentation/platform/dynamic-secrets/azure-sql-database.mdx
@@ -3,6 +3,8 @@ title: "Azure SQL Database"
description: "Learn how to dynamically generate Azure SQL Database user credentials."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical Azure SQL Database dynamic secret allows you to generate Azure SQL Database user credentials on demand based on configured roles.
## How Azure SQL Database Authentication Works
@@ -103,29 +105,7 @@ The user needs:
SQL statements executed when a lease expires or is manually revoked. The system intelligently routes DROP USER commands to the target database and DROP LOGIN commands to the master database for proper cleanup.
</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.
-
- Allowed template variables are:
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are:
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
</Step>
<Step title="Click 'Submit'">
diff --git a/docs/documentation/platform/dynamic-secrets/cassandra.mdx b/docs/documentation/platform/dynamic-secrets/cassandra.mdx
index 16cca4dfe0..b5251a346f 100644
--- a/docs/documentation/platform/dynamic-secrets/cassandra.mdx
+++ b/docs/documentation/platform/dynamic-secrets/cassandra.mdx
@@ -3,6 +3,8 @@ title: "Cassandra"
description: "Learn how to dynamically generate Cassandra database user credentials"
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical Cassandra dynamic secret allows you to generate Cassandra database credentials on demand based on configured role.
## Prerequisite
@@ -79,29 +81,7 @@ The above configuration allows user creation and granting permissions.
</Step>
<Step title="(Optional) Modify CQL Statements">
![Modify CQL Statements Modal](../../../images/platform/dynamic-secrets/modify-cql-statements.png)
- <ParamField path="Username Template" type="string" default="{{randomUsername}}">
- Specifies a template for generating usernames. This field allows customization of how usernames are automatically created.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
<ParamField path="Customize CQL Statement" type="string">
If you want to provide specific privileges for the generated dynamic credentials, you can modify the CQL statement to your needs. This is useful if you want to only give access to a specific key-space(s).
</ParamField>
diff --git a/docs/documentation/platform/dynamic-secrets/couchbase.mdx b/docs/documentation/platform/dynamic-secrets/couchbase.mdx
index 6a803c1f8f..960d07fc67 100644
--- a/docs/documentation/platform/dynamic-secrets/couchbase.mdx
+++ b/docs/documentation/platform/dynamic-secrets/couchbase.mdx
@@ -3,6 +3,8 @@ title: "Couchbase"
description: "Learn how to dynamically generate Couchbase Database user credentials."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical Couchbase dynamic secret allows you to generate Couchbase Cloud Database user credentials on demand based on configured roles and bucket access permissions.
## Prerequisite
@@ -89,31 +91,7 @@ Create an API Key in your Couchbase Cloud following the [official documentation]
- **Scope Name**: Name of the scope (e.g., inventory, _default)
- **Collections**: Optional array of collection names within the scope
</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.
-
- Allowed template variables are:
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are:
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // infisical-3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random 5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
-
+ <DynamicSecretUsernameTemplateParamField />
<ParamField path="Password Configuration" type="object">
Optional password generation requirements for Couchbase users:
diff --git a/docs/documentation/platform/dynamic-secrets/elastic-search.mdx b/docs/documentation/platform/dynamic-secrets/elastic-search.mdx
index f1c5f11282..e27b030b49 100644
--- a/docs/documentation/platform/dynamic-secrets/elastic-search.mdx
+++ b/docs/documentation/platform/dynamic-secrets/elastic-search.mdx
@@ -3,6 +3,8 @@ title: "Elasticsearch"
description: "Learn how to dynamically generate Elasticsearch user credentials."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical Elasticsearch dynamic secret allows you to generate Elasticsearch credentials on demand based on configured role.
## Prerequisites
@@ -87,29 +89,7 @@ The port that your Elasticsearch instance is running on. _(Example: 9200)_
<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.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
![Dynamic Secret Setup Modal](../../../images/platform/dynamic-secrets/dynamic-secret-input-modal-elastic-search.png)
diff --git a/docs/documentation/platform/dynamic-secrets/ldap.mdx b/docs/documentation/platform/dynamic-secrets/ldap.mdx
index a113ec344b..f1b0569f10 100644
--- a/docs/documentation/platform/dynamic-secrets/ldap.mdx
+++ b/docs/documentation/platform/dynamic-secrets/ldap.mdx
@@ -3,6 +3,8 @@ title: "LDAP"
description: "Learn how to dynamically generate user credentials via LDAP."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical LDAP dynamic secret allows you to generate user credentials on demand via LDAP. The integration is general to any LDAP implementation but has been tested with OpenLDAP and Active directory as of now.
## Prerequisites
@@ -123,29 +125,7 @@ The Infisical LDAP dynamic secret allows you to generate user credentials on dem
changetype: delete
```
</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.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
</Step>
<Step title="Click `Submit`">
diff --git a/docs/documentation/platform/dynamic-secrets/mongo-atlas.mdx b/docs/documentation/platform/dynamic-secrets/mongo-atlas.mdx
index f167a06419..4ce0162125 100644
--- a/docs/documentation/platform/dynamic-secrets/mongo-atlas.mdx
+++ b/docs/documentation/platform/dynamic-secrets/mongo-atlas.mdx
@@ -3,6 +3,8 @@ title: "Mongo Atlas"
description: "Learn how to dynamically generate Mongo Atlas Database user credentials."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical Mongo Atlas dynamic secret allows you to generate Mongo Atlas Database credentials on demand based on configured role.
## Prerequisite
@@ -63,29 +65,7 @@ Create a project scoped API Key with the required permission in your Mongo Atlas
![Modify Scope Modal](../../../images/platform/dynamic-secrets/advanced-option-atlas.png)
-<ParamField path="Username Template" type="string" default="{{randomUsername}}">
- Specifies a template for generating usernames. This field allows customization of how usernames are automatically created.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
<ParamField path="Customize Scope" type="string">
List that contains clusters, MongoDB Atlas Data Lakes, and MongoDB Atlas Streams Instances that this database user can access. If omitted, MongoDB Cloud grants the database user access to all the clusters, MongoDB Atlas Data Lakes, and MongoDB Atlas Streams Instances in the project.
diff --git a/docs/documentation/platform/dynamic-secrets/mongo-db.mdx b/docs/documentation/platform/dynamic-secrets/mongo-db.mdx
index 6753b8f0ea..b3112ce262 100644
--- a/docs/documentation/platform/dynamic-secrets/mongo-db.mdx
+++ b/docs/documentation/platform/dynamic-secrets/mongo-db.mdx
@@ -3,6 +3,8 @@ title: "Mongo DB"
description: "Learn how to dynamically generate Mongo DB Database user credentials."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical Mongo DB dynamic secret allows you to generate Mongo DB Database credentials on demand based on configured role.
@@ -66,29 +68,7 @@ Create a user with the required permission in your MongoDB instance. This user w
<ParamField path="CA(SSL)" type="string">
A CA may be required if your DB requires it for incoming connections.
</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.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
![Dynamic Secret Setup Modal](../../../images/platform/dynamic-secrets/dynamic-secret-mongodb.png)
</Step>
diff --git a/docs/documentation/platform/dynamic-secrets/mssql.mdx b/docs/documentation/platform/dynamic-secrets/mssql.mdx
index 8bb9423149..31b220e86a 100644
--- a/docs/documentation/platform/dynamic-secrets/mssql.mdx
+++ b/docs/documentation/platform/dynamic-secrets/mssql.mdx
@@ -3,6 +3,8 @@ title: "MS SQL"
description: "Learn how to dynamically generate MS SQL database user credentials."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical MS SQL dynamic secret allows you to generate Microsoft SQL server database credentials on demand based on configured role.
## Prerequisite
@@ -71,30 +73,7 @@ Create a user with the required permission in your SQL instance. This user will
</Step>
<Step title="(Optional) Modify SQL Statements">
![Modify SQL Statements Modal](../../../images/platform/dynamic-secrets/modify-sql-statements-mssql.png)
-<ParamField path="Username Template" type="string" default="{{randomUsername}}">
- Specifies a template for generating usernames. This field allows customization of how usernames are automatically created.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
-
+ <DynamicSecretUsernameTemplateParamField />
</Step>
<Step title="Click 'Submit'">
After submitting the form, you will see a dynamic secret created in the dashboard.
diff --git a/docs/documentation/platform/dynamic-secrets/mysql.mdx b/docs/documentation/platform/dynamic-secrets/mysql.mdx
index c354dfe39c..475f7e338d 100644
--- a/docs/documentation/platform/dynamic-secrets/mysql.mdx
+++ b/docs/documentation/platform/dynamic-secrets/mysql.mdx
@@ -3,6 +3,8 @@ title: "MySQL"
description: "Learn how to dynamically generate MySQL Database user credentials."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical MySQL dynamic secret allows you to generate MySQL Database credentials on demand based on configured role.
## Prerequisite
@@ -69,29 +71,7 @@ Create a user with the required permission in your SQL instance. This user will
</Step>
<Step title="(Optional) Modify SQL Statements">
![Modify SQL Statements Modal](../../../images/platform/dynamic-secrets/modify-sql-statement-mysql.png)
-<ParamField path="Username Template" type="string" default="{{randomUsername}}">
- Specifies a template for generating usernames. This field allows customization of how usernames are automatically created.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
</Step>
<Step title="Click `Submit`">
After submitting the form, you will see a dynamic secret created in the dashboard.
diff --git a/docs/documentation/platform/dynamic-secrets/oracle.mdx b/docs/documentation/platform/dynamic-secrets/oracle.mdx
index 2d6193abd5..74e139a013 100644
--- a/docs/documentation/platform/dynamic-secrets/oracle.mdx
+++ b/docs/documentation/platform/dynamic-secrets/oracle.mdx
@@ -3,6 +3,8 @@ title: "Oracle"
description: "Learn how to dynamically generate Oracle Database user credentials."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical Oracle dynamic secret allows you to generate Oracle Database credentials on demand based on configured role.
## Prerequisite
@@ -71,29 +73,7 @@ Create a user with the required permission in your SQL instance. This user will
</Step>
<Step title="(Optional) Modify SQL Statements">
![Modify SQL Statements Modal](../../../images/platform/dynamic-secrets/modify-sql-statement-oracle.png)
-<ParamField path="Username Template" type="string" default="{{randomUsername}}">
- Specifies a template for generating usernames. This field allows customization of how usernames are automatically created.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
</Step>
<Step title="Click 'Submit'">
After submitting the form, you will see a dynamic secret created in the dashboard.
diff --git a/docs/documentation/platform/dynamic-secrets/postgresql.mdx b/docs/documentation/platform/dynamic-secrets/postgresql.mdx
index 1f5c79f1e3..9785e7d669 100644
--- a/docs/documentation/platform/dynamic-secrets/postgresql.mdx
+++ b/docs/documentation/platform/dynamic-secrets/postgresql.mdx
@@ -3,6 +3,8 @@ title: "PostgreSQL"
description: "Learn how to dynamically generate PostgreSQL database users."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical PostgreSQL dynamic secret allows you to generate PostgreSQL database credentials on demand based on configured role.
## Prerequisite
@@ -72,29 +74,7 @@ Create a user with the required permission in your SQL instance. This user will
</Step>
<Step title="(Optional) Modify SQL Statements">
![Modify SQL Statements Modal](../../../images/platform/dynamic-secrets/modify-sql-statements.png)
-<ParamField path="Username Template" type="string" default="{{randomUsername}}">
- Specifies a template for generating usernames. This field allows customization of how usernames are automatically created.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
<ParamField path="Customize SQL Statement" type="string">
If you want to provide specific privileges for the generated dynamic credentials, you can modify the SQL statement to your needs. This is useful if you want to only give access to a specific table(s).
</ParamField>
diff --git a/docs/documentation/platform/dynamic-secrets/rabbit-mq.mdx b/docs/documentation/platform/dynamic-secrets/rabbit-mq.mdx
index cac5ac1207..42c7a2d878 100644
--- a/docs/documentation/platform/dynamic-secrets/rabbit-mq.mdx
+++ b/docs/documentation/platform/dynamic-secrets/rabbit-mq.mdx
@@ -3,6 +3,8 @@ title: "RabbitMQ"
description: "Learn how to dynamically generate RabbitMQ user credentials."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical RabbitMQ dynamic secret allows you to generate RabbitMQ credentials on demand based on configured role.
## Prerequisites
@@ -65,29 +67,7 @@ The port that the RabbitMQ management plugin is listening on. This is `15672` by
leases.
</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.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+<DynamicSecretUsernameTemplateParamField />
<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.
diff --git a/docs/documentation/platform/dynamic-secrets/redis.mdx b/docs/documentation/platform/dynamic-secrets/redis.mdx
index 583bd1d87c..12ede82b91 100644
--- a/docs/documentation/platform/dynamic-secrets/redis.mdx
+++ b/docs/documentation/platform/dynamic-secrets/redis.mdx
@@ -3,6 +3,8 @@ title: "Redis"
description: "Learn how to dynamically generate Redis Database user credentials."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical Redis dynamic secret allows you to generate Redis Database credentials on demand based on configured role.
## Prerequisite
@@ -57,29 +59,7 @@ Create a user with the required permission in your Redis instance. This user wil
</Step>
<Step title="(Optional) Modify Redis Statements">
![Modify Redis Statements Modal](/images/platform/dynamic-secrets/modify-redis-statement.png)
-<ParamField path="Username Template" type="string" default="{{randomUsername}}">
- Specifies a template for generating usernames. This field allows customization of how usernames are automatically created.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
<ParamField path="Customize Redis Statement" type="string">
If you want to provide specific privileges for the generated dynamic credentials, you can modify the Redis statement to your needs. This is useful if you want to only give access to a specific table(s).
</ParamField>
diff --git a/docs/documentation/platform/dynamic-secrets/sap-ase.mdx b/docs/documentation/platform/dynamic-secrets/sap-ase.mdx
index 8009c779c7..7e33753d56 100644
--- a/docs/documentation/platform/dynamic-secrets/sap-ase.mdx
+++ b/docs/documentation/platform/dynamic-secrets/sap-ase.mdx
@@ -3,6 +3,8 @@ title: "SAP ASE"
description: "Learn how to dynamically generate SAP ASE database account credentials."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical SAP ASE dynamic secret allows you to generate SAP ASE database credentials on demand.
## Prerequisite
@@ -64,29 +66,7 @@ The Infisical SAP ASE dynamic secret allows you to generate SAP ASE database cre
</Step>
<Step title="(Optional) Modify SAP SQL Statements">
![Modify SQL Statements Modal](../../../images/platform/dynamic-secrets/sap-ase/dynamic-secret-sap-ase-statements.png)
-<ParamField path="Username Template" type="string" default="{{randomUsername}}">
- Specifies a template for generating usernames. This field allows customization of how usernames are automatically created.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
<ParamField path="Customize Statement" type="string">
If you want to provide specific privileges for the generated dynamic credentials, you can modify the SQL statement to your needs.
diff --git a/docs/documentation/platform/dynamic-secrets/sap-hana.mdx b/docs/documentation/platform/dynamic-secrets/sap-hana.mdx
index ce016e6814..0d2348a8f7 100644
--- a/docs/documentation/platform/dynamic-secrets/sap-hana.mdx
+++ b/docs/documentation/platform/dynamic-secrets/sap-hana.mdx
@@ -3,6 +3,8 @@ title: "SAP HANA"
description: "Learn how to dynamically generate SAP HANA database account credentials."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical SAP HANA dynamic secret allows you to generate SAP HANA database credentials on demand.
## Prerequisite
@@ -64,29 +66,7 @@ The Infisical SAP HANA dynamic secret allows you to generate SAP HANA database c
</Step>
<Step title="(Optional) Modify SAP SQL Statements">
![Modify SQL Statements Modal](../../../images/platform/dynamic-secrets/modify-sap-hana-sql-statements.png)
-<ParamField path="Username Template" type="string" default="{{randomUsername}}">
- Specifies a template for generating usernames. This field allows customization of how usernames are automatically created.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
<ParamField path="Customize Statement" type="string">
If you want to provide specific privileges for the generated dynamic credentials, you can modify the SQL statement to your needs.
diff --git a/docs/documentation/platform/dynamic-secrets/snowflake.mdx b/docs/documentation/platform/dynamic-secrets/snowflake.mdx
index 10d7c182f2..4755d04f57 100644
--- a/docs/documentation/platform/dynamic-secrets/snowflake.mdx
+++ b/docs/documentation/platform/dynamic-secrets/snowflake.mdx
@@ -3,6 +3,8 @@ title: "Snowflake"
description: "Learn how to dynamically generate Snowflake user credentials."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
Infisical's Snowflake dynamic secrets allow you to generate Snowflake user credentials on demand.
## Snowflake Prerequisites
@@ -77,29 +79,7 @@ Infisical's Snowflake dynamic secrets allow you to generate Snowflake user crede
</Step>
<Step title="(Optional) Modify SQL Statements">
![Modify SQL Statements Modal](/images/platform/dynamic-secrets/snowflake/dynamic-secret-snowflake-sql-statements.png)
- <ParamField path="Username Template" type="string" default="{{randomUsername}}">
- Specifies a template for generating usernames. This field allows customization of how usernames are automatically created.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- - `{{identity.name}}`: Name of the identity that is generating the secret
- - `{{random N}}`: Random string of N characters
-
- Allowed template functions are
- - `truncate`: Truncates a string to a specified length
- - `replace`: Replaces a substring with another value
-
- Examples:
- ```
- {{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
- {{unixTimestamp}} // 17490641580
- {{identity.name}} // testuser
- {{random-5}} // x9k2m
- {{truncate identity.name 4}} // test
- {{replace identity.name 'user' 'replace'}} // testreplace
- ```
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
<ParamField path="Customize Statement" type="string">
If you want to provide specific privileges for the generated dynamic credentials, you can modify the SQL
diff --git a/docs/documentation/platform/dynamic-secrets/vertica.mdx b/docs/documentation/platform/dynamic-secrets/vertica.mdx
index 3d5c7b1a9a..0cb3442308 100644
--- a/docs/documentation/platform/dynamic-secrets/vertica.mdx
+++ b/docs/documentation/platform/dynamic-secrets/vertica.mdx
@@ -3,6 +3,8 @@ title: "Vertica"
description: "Learn how to dynamically generate Vertica database users."
---
+import DynamicSecretUsernameTemplateParamField from "/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx";
+
The Infisical Vertica dynamic secret allows you to generate Vertica database credentials on demand based on configured role.
## Prerequisite
@@ -63,13 +65,7 @@ Create a user with the required permission in your Vertica instance. This user w
</Step>
<Step title="(Optional) Modify SQL Statements">
![Modify SQL Statements Modal](../../../images/platform/dynamic-secrets/vertica/modify-sql-statements-vertica.png)
- <ParamField path="Username Template" type="string" default="{{randomUsername}}">
- Specifies a template for generating usernames. This field allows customization of how usernames are automatically created.
-
- Allowed template variables are
- - `{{randomUsername}}`: Random username string
- - `{{unixTimestamp}}`: Current Unix timestamp
- </ParamField>
+ <DynamicSecretUsernameTemplateParamField />
<ParamField path="Creation Statement" type="string">
Customize the SQL statement used to create new users. Default creates a user with basic schema permissions.
</ParamField>
diff --git a/docs/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx b/docs/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx
new file mode 100644
index 0000000000..cb0e831ba5
--- /dev/null
+++ b/docs/snippets/documentation/platform/dynamic-secrets/dynamic-secret-username-template-field.mdx
@@ -0,0 +1,28 @@
+<ParamField path="Username Template" type="string" default="{{randomUsername}}">
+
+ Specifies a template for generating usernames. This field allows customization of how usernames are automatically created.
+
+ Allowed template variables are:
+ - `{{randomUsername}}`: Random username string.
+ - `{{unixTimestamp}}`: Current Unix timestamp at the time of lease creation.
+ - `{{identity.name}}`: Name of the identity that is generating the lease.
+ - `{{dynamicSecret.name}}`: Name of the associated dynamic secret.
+ - `{{dynamicSecret.type}}`: Type of the associated dynamic secret.
+ - `{{random N}}`: Random string of N characters.
+
+ Allowed template functions are:
+ - `truncate`: Truncates a string to a specified length.
+ - `replace`: Replaces a substring with another value.
+ - `uppercase`: Converts a string to uppercase.
+ - `lowercase`: Converts a string to lowercase.
+
+ Examples:
+ ```yaml
+ {{ randomUsername }} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX
+ {{ unixTimestamp }} // 17490641580
+ {{ identity.name }} // <identity-name>
+ {{ random 5 }} // x9K2m
+ {{ truncate identity.name 4 }} // test
+ {{ replace identity.name '<identity-name>' 'new-value' }} // new-value
+ ```
+</ParamField>
\ No newline at end of file