feat(dynamic-secret): Added new options to username template

This commit is contained in:
carlosmonastyrski
2025-06-04 16:43:17 -03:00
parent 419e9ac755
commit 5367d1ac2e
32 changed files with 551 additions and 196 deletions

View File

@@ -123,14 +123,29 @@ The Infisical LDAP dynamic secret allows you to generate user credentials on dem
changetype: delete
```
</ParamField>
<ParamField path="Username Template" type="string" default="{{randomUsername}}">
<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
- `{{identityName}}`: Name of the identity that is generating the secret
</ParamField>
- `{{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>
</Step>
<Step title="Click `Submit`">