mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
misc: updated docs
This commit is contained in:
@@ -10,143 +10,253 @@ The Infisical LDAP dynamic secret allows you to generate user credentials on dem
|
||||
1. Create a user with the necessary permissions to create users in your LDAP server.
|
||||
2. Ensure your LDAP server is reachable via Infisical instance.
|
||||
|
||||
## Set up Dynamic Secrets with LDAP
|
||||
## Create LDAP Credentials
|
||||
|
||||
<Steps>
|
||||
<Step title="Open Secret Overview Dashboard">
|
||||
Open the Secret Overview dashboard and select the environment in which you would like to add a dynamic secret.
|
||||
</Step>
|
||||
<Step title="Click on the 'Add Dynamic Secret' button">
|
||||

|
||||
</Step>
|
||||
<Step title="Select 'LDAP'">
|
||||

|
||||
</Step>
|
||||
<Tabs>
|
||||
<Tab title="Dynamic">
|
||||
<Steps>
|
||||
<Step title="Open Secret Overview Dashboard">
|
||||
Open the Secret Overview dashboard and select the environment in which you would like to add a dynamic secret.
|
||||
</Step>
|
||||
<Step title="Click on the 'Add Dynamic Secret' button">
|
||||

|
||||
</Step>
|
||||
<Step title="Select 'LDAP'">
|
||||

|
||||
</Step>
|
||||
|
||||
<Step title="Provide the inputs for dynamic secret parameters">
|
||||
<ParamField path="Secret Name" type="string" required>
|
||||
Name by which you want the secret to be referenced
|
||||
</ParamField>
|
||||
<Step title="Provide the inputs for dynamic secret parameters">
|
||||
<ParamField path="Secret Name" type="string" required>
|
||||
Name by which you want the secret to be referenced
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="Default TTL" type="string" required>
|
||||
Default time-to-live for a generated secret (it is possible to modify this value when a secret is generate)
|
||||
</ParamField>
|
||||
<ParamField path="Default TTL" type="string" required>
|
||||
Default time-to-live for a generated secret (it is possible to modify this value when a secret is generate)
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="Max TTL" type="string" required>
|
||||
Maximum time-to-live for a generated secret.
|
||||
</ParamField>
|
||||
<ParamField path="Max TTL" type="string" required>
|
||||
Maximum time-to-live for a generated secret.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="URL" type="string" required>
|
||||
LDAP url to connect to. _(Example: ldap://your-ldap-ip:389 or ldaps://domain:636)_
|
||||
</ParamField>
|
||||
<ParamField path="URL" type="string" required>
|
||||
LDAP url to connect to. _(Example: ldap://your-ldap-ip:389 or ldaps://domain:636)_
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="BIND DN" type="string" required>
|
||||
DN to bind to. This should have permissions to create a new users.
|
||||
</ParamField>
|
||||
<ParamField path="BIND DN" type="string" required>
|
||||
DN to bind to. This should have permissions to create a new users.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="BIND Password" type="string" required>
|
||||
Password for the given DN.
|
||||
</ParamField>
|
||||
<ParamField path="BIND Password" type="string" required>
|
||||
Password for the given DN.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="CA" type="text">
|
||||
CA certificate to use for TLS in case of a secure connection.
|
||||
</ParamField>
|
||||
<ParamField path="CA" type="text">
|
||||
CA certificate to use for TLS in case of a secure connection.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="Creation LDIF" type="text" required>
|
||||
LDIF to run while creating a user in LDAP. This can include extra steps to assign the user to groups or set permissions.
|
||||
Here `{{Username}}`, `{{Password}}` and `{{EncodedPassword}}` are templatized variables for the username and password generated by the dynamic secret.
|
||||
<ParamField path="Credential Type" type="enum">
|
||||
The type of LDAP credential - select Dynamic.
|
||||
</ParamField>
|
||||
|
||||
`{{EncodedPassword}}` is the encoded password required for the `unicodePwd` field in Active Directory as described [here](https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/change-windows-active-directory-user-password).
|
||||
<ParamField path="Creation LDIF" type="text" required>
|
||||
LDIF to run while creating a user in LDAP. This can include extra steps to assign the user to groups or set permissions.
|
||||
Here `{{Username}}`, `{{Password}}` and `{{EncodedPassword}}` are templatized variables for the username and password generated by the dynamic secret.
|
||||
|
||||
**OpenLDAP** Example:
|
||||
```
|
||||
dn: uid={{Username}},dc=infisical,dc=com
|
||||
changetype: add
|
||||
objectClass: top
|
||||
objectClass: person
|
||||
objectClass: organizationalPerson
|
||||
objectClass: inetOrgPerson
|
||||
cn: John Doe
|
||||
sn: Doe
|
||||
uid: jdoe
|
||||
mail: jdoe@infisical.com
|
||||
userPassword: {{Password}}
|
||||
```
|
||||
`{{EncodedPassword}}` is the encoded password required for the `unicodePwd` field in Active Directory as described [here](https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/change-windows-active-directory-user-password).
|
||||
|
||||
**Active Directory** Example:
|
||||
```
|
||||
dn: CN={{Username}},OU=Test Create,DC=infisical,DC=com
|
||||
changetype: add
|
||||
objectClass: top
|
||||
objectClass: person
|
||||
objectClass: organizationalPerson
|
||||
objectClass: user
|
||||
userPrincipalName: {{Username}}@infisical.com
|
||||
sAMAccountName: {{Username}}
|
||||
unicodePwd::{{EncodedPassword}}
|
||||
userAccountControl: 66048
|
||||
**OpenLDAP** Example:
|
||||
```
|
||||
dn: uid={{Username}},dc=infisical,dc=com
|
||||
changetype: add
|
||||
objectClass: top
|
||||
objectClass: person
|
||||
objectClass: organizationalPerson
|
||||
objectClass: inetOrgPerson
|
||||
cn: John Doe
|
||||
sn: Doe
|
||||
uid: jdoe
|
||||
mail: jdoe@infisical.com
|
||||
userPassword: {{Password}}
|
||||
```
|
||||
|
||||
dn: CN=test-group,OU=Test Create,DC=infisical,DC=com
|
||||
changetype: modify
|
||||
add: member
|
||||
member: CN={{Username}},OU=Test Create,DC=infisical,DC=com
|
||||
-
|
||||
```
|
||||
</ParamField>
|
||||
**Active Directory** Example:
|
||||
```
|
||||
dn: CN={{Username}},OU=Test Create,DC=infisical,DC=com
|
||||
changetype: add
|
||||
objectClass: top
|
||||
objectClass: person
|
||||
objectClass: organizationalPerson
|
||||
objectClass: user
|
||||
userPrincipalName: {{Username}}@infisical.com
|
||||
sAMAccountName: {{Username}}
|
||||
unicodePwd::{{EncodedPassword}}
|
||||
userAccountControl: 66048
|
||||
|
||||
<ParamField path="Revocation LDIF" type="text" required>
|
||||
LDIF to run while revoking a user in LDAP. This can include extra steps to remove the user from groups or set permissions.
|
||||
Here `{{Username}}` is a templatized variable for the username generated by the dynamic secret.
|
||||
dn: CN=test-group,OU=Test Create,DC=infisical,DC=com
|
||||
changetype: modify
|
||||
add: member
|
||||
member: CN={{Username}},OU=Test Create,DC=infisical,DC=com
|
||||
-
|
||||
```
|
||||
</ParamField>
|
||||
|
||||
**OpenLDAP / Active Directory** Example:
|
||||
```
|
||||
dn: CN={{Username}},OU=Test Create,DC=infisical,DC=com
|
||||
changetype: delete
|
||||
```
|
||||
</ParamField>
|
||||
<ParamField path="Revocation LDIF" type="text" required>
|
||||
LDIF to run while revoking a user in LDAP. This can include extra steps to remove the user from groups or set permissions.
|
||||
Here `{{Username}}` is a templatized variable for the username generated by the dynamic secret.
|
||||
|
||||
<ParamField path="Rollback LDIF" type="text">
|
||||
LDIF to run incase Creation LDIF fails midway.
|
||||
**OpenLDAP / Active Directory** Example:
|
||||
```
|
||||
dn: CN={{Username}},OU=Test Create,DC=infisical,DC=com
|
||||
changetype: delete
|
||||
```
|
||||
</ParamField>
|
||||
|
||||
For the creation example shown above, if the user is created successfully but not added to a group, this LDIF can be used to remove the user.
|
||||
Here `{{Username}}`, `{{Password}}` and `{{EncodedPassword}}` are templatized variables for the username generated by the dynamic secret.
|
||||
<ParamField path="Rollback LDIF" type="text">
|
||||
LDIF to run incase Creation LDIF fails midway.
|
||||
|
||||
**OpenLDAP / Active Directory** Example:
|
||||
```
|
||||
dn: CN={{Username}},OU=Test Create,DC=infisical,DC=com
|
||||
changetype: delete
|
||||
```
|
||||
</ParamField>
|
||||
For the creation example shown above, if the user is created successfully but not added to a group, this LDIF can be used to remove the user.
|
||||
Here `{{Username}}`, `{{Password}}` and `{{EncodedPassword}}` are templatized variables for the username generated by the dynamic secret.
|
||||
|
||||
</Step>
|
||||
**OpenLDAP / Active Directory** Example:
|
||||
```
|
||||
dn: CN={{Username}},OU=Test Create,DC=infisical,DC=com
|
||||
changetype: delete
|
||||
```
|
||||
</ParamField>
|
||||
</Step>
|
||||
|
||||
<Step title="Click `Submit`">
|
||||
After submitting the form, you will see a dynamic secret created in the dashboard.
|
||||
</Step>
|
||||
<Step title="Generate dynamic secrets">
|
||||
Once you've successfully configured the dynamic secret, you're ready to generate on-demand credentials.
|
||||
To do this, simply click on the 'Generate' button which appears when hovering over the dynamic secret item.
|
||||
Alternatively, you can initiate the creation of a new lease by selecting 'New Lease' from the dynamic secret lease list section.
|
||||
<Step title="Click `Submit`">
|
||||
After submitting the form, you will see a dynamic secret created in the dashboard.
|
||||
</Step>
|
||||
<Step title="Generate dynamic secrets">
|
||||
Once you've successfully configured the dynamic secret, you're ready to generate on-demand credentials.
|
||||
To do this, simply click on the 'Generate' button which appears when hovering over the dynamic secret item.
|
||||
Alternatively, you can initiate the creation of a new lease by selecting 'New Lease' from the dynamic secret lease list section.
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
When generating these secrets, it's important to specify a Time-to-Live (TTL) duration. This will dictate how long the credentials are valid for.
|
||||
When generating these secrets, it's important to specify a Time-to-Live (TTL) duration. This will dictate how long the credentials are valid for.
|
||||
|
||||

|
||||

|
||||
|
||||
<Tip>
|
||||
Ensure that the TTL for the lease fall within the maximum TTL defined when configuring the dynamic secret.
|
||||
</Tip>
|
||||
<Tip>
|
||||
Ensure that the TTL for the lease fall within the maximum TTL defined when configuring the dynamic secret.
|
||||
</Tip>
|
||||
|
||||
|
||||
Once you click the `Submit` button, a new secret lease will be generated and the credentials from it will be shown to you with an array of DN's altered depending on the Creation LDIF.
|
||||
Once you click the `Submit` button, a new secret lease will be generated and the credentials from it will be shown to you with an array of DN's altered depending on the Creation LDIF.
|
||||
|
||||

|
||||

|
||||
</Step>
|
||||
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
</Steps>
|
||||
</Tab>
|
||||
<Tab title="Static">
|
||||
<Steps>
|
||||
<Step title="Open Secret Overview Dashboard">
|
||||
Open the Secret Overview dashboard and select the environment in which you would like to add a dynamic secret.
|
||||
</Step>
|
||||
<Step title="Click on the 'Add Dynamic Secret' button">
|
||||

|
||||
</Step>
|
||||
<Step title="Select 'LDAP'">
|
||||

|
||||
</Step>
|
||||
|
||||
<Step title="Provide the inputs for dynamic secret parameters">
|
||||
<ParamField path="Secret Name" type="string" required>
|
||||
Name by which you want the secret to be referenced
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="Default TTL" type="string" required>
|
||||
Default time-to-live for a generated secret (it is possible to modify this value when a secret is generate)
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="Max TTL" type="string" required>
|
||||
Maximum time-to-live for a generated secret.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="URL" type="string" required>
|
||||
LDAP url to connect to. _(Example: ldap://your-ldap-ip:389 or ldaps://domain:636)_
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="BIND DN" type="string" required>
|
||||
DN to bind to. This should have permissions to create a new users.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="BIND Password" type="string" required>
|
||||
Password for the given DN.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="CA" type="text">
|
||||
CA certificate to use for TLS in case of a secure connection.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="Credential Type" type="enum">
|
||||
The type of LDAP credential - select Static.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="Rotation LDIF" type="text" required>
|
||||
LDIF to run for rotating the credentals of an LDAP user. This can include extra LDAP steps based on your needs.
|
||||
Here `{{Password}}` and `{{EncodedPassword}}` are templatized variables for the password generated by the dynamic secret.
|
||||
|
||||
Note that the `-` characters and the empty lines found at the end of the examples are necessary based on the LDIF format.
|
||||
|
||||
**OpenLDAP** Example:
|
||||
```
|
||||
dn: cn=sheencaps capadngan,ou=people,dc=acme,dc=com
|
||||
changetype: modify
|
||||
replace: userPassword
|
||||
password: {{Password}}
|
||||
-
|
||||
|
||||
```
|
||||
|
||||
**Active Directory** Example:
|
||||
```
|
||||
dn: cn=sheencaps capadngan,ou=people,dc=acme,dc=com
|
||||
changetype: modify
|
||||
replace: unicodePwd
|
||||
unicodePwd::{{EncodedPassword}}
|
||||
-
|
||||
|
||||
```
|
||||
`{{EncodedPassword}}` is the encoded password required for the `unicodePwd` field in Active Directory as described [here](https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/change-windows-active-directory-user-password).
|
||||
|
||||
</ParamField>
|
||||
</Step>
|
||||
|
||||
<Step title="Click `Submit`">
|
||||
After submitting the form, you will see a dynamic secret created in the dashboard.
|
||||
</Step>
|
||||
<Step title="Generate dynamic secrets">
|
||||
Once you've successfully configured the dynamic secret, you're ready to generate on-demand credentials.
|
||||
To do this, simply click on the 'Generate' button which appears when hovering over the dynamic secret item.
|
||||
Alternatively, you can initiate the creation of a new lease by selecting 'New Lease' from the dynamic secret lease list section.
|
||||
|
||||

|
||||

|
||||
|
||||
When generating these secrets, it's important to specify a Time-to-Live (TTL) duration. This will dictate how long the credentials are valid for.
|
||||
|
||||

|
||||
|
||||
<Tip>
|
||||
Ensure that the TTL for the lease fall within the maximum TTL defined when configuring the dynamic secret.
|
||||
</Tip>
|
||||
|
||||
|
||||
Once you click the `Submit` button, a new secret lease will be generated and the credentials from it will be shown to you with an array of DN's altered depending on the Creation LDIF.
|
||||
|
||||

|
||||
</Step>
|
||||
|
||||
</Steps>
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Active Directory Integration
|
||||
|
||||
|
||||
Reference in New Issue
Block a user