From c6252346639c63189749ce0f1a5a100c43ac07da Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Fri, 14 Nov 2025 13:55:57 -0800 Subject: [PATCH 01/18] push branch --- .../docs/secrets/{ldap.mdx => ldap/index.mdx} | 77 +++++++++++-------- .../content/docs/secrets/ldap/setup.mdx | 25 ++++++ content/vault/v1.21.x/data/docs-nav-data.json | 11 ++- 3 files changed, 79 insertions(+), 34 deletions(-) rename content/vault/v1.21.x/content/docs/secrets/{ldap.mdx => ldap/index.mdx} (96%) create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx similarity index 96% rename from content/vault/v1.21.x/content/docs/secrets/ldap.mdx rename to content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx index 1183d79031..858f16fff5 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx @@ -7,49 +7,60 @@ description: >- # LDAP secrets engine +Hi + + @include 'x509-sha1-deprecation.mdx' +H1 | H2 | H3 +--- | --- | --- + A | B | C + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ABCD
Hi123
Howdy456
Hello789
+ + The LDAP secrets engine provides management of LDAP credentials as well as dynamic creation of credentials. It supports integration with implementations of the LDAP v3 protocol, including OpenLDAP, Active Directory, and IBM Resource Access Control Facility (RACF). -The secrets engine has three primary features: +The LDAP secrets plugin has three primary features: + - [Static Credentials](/vault/docs/secrets/ldap#static-credentials) - [Dynamic Credentials](/vault/docs/secrets/ldap#dynamic-credentials) - [Service Account Check-Out](/vault/docs/secrets/ldap#service-account-check-out) -## Setup - -1. Enable the LDAP secret engine: - - ```sh - $ vault secrets enable ldap - ``` - - By default, the secrets engine will mount at the name of the engine. To - enable the secrets engine at a different path, use the `-path` argument. - -2. Configure the credentials that Vault uses to communicate with LDAP - to generate passwords: - - ```sh - $ vault write ldap/config \ - binddn=$USERNAME \ - bindpass=$PASSWORD \ - url=ldaps://138.91.247.105 - ``` - - Note: it's recommended a dedicated entry management account be created specifically for Vault. - -3. Rotate the root password so only Vault knows the credentials: - - ```sh - $ vault write -f ldap/rotate-root - ``` - Note: it's not possible to retrieve the generated password once rotated by Vault. - It's recommended a dedicated entry management account be created specifically for Vault. ## Schemas @@ -198,7 +209,7 @@ For more details on rotating root credentials in the LDAP plugin, refer to the 1. Configure a static role that maps a name in Vault to an entry in LDAP. Password rotation settings will be managed by this role. - ```sh + ```shell-session $ vault write ldap/static-role/hashicorp \ dn='uid=hashicorp,ou=users,dc=hashicorp,dc=com' \ username='hashicorp' \ @@ -207,7 +218,7 @@ For more details on rotating root credentials in the LDAP plugin, refer to the 2. Request credentials for the "hashicorp" role: - ```sh + ```shell-session $ vault read ldap/static-cred/hashicorp ``` diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx new file mode 100644 index 0000000000..6692c4354d --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx @@ -0,0 +1,25 @@ +--- +layout: docs +page_title: Set up the ldap secrets plugin +description: >- + Enable and configure the ldap secrets plugin to manage static and dynamic + LDAP credentials and integrate with services that support the LDAP v3 protocol. + +--- + +# Set up the LDAP secrets plugin + +Use `vault secrets enable` to enable an instance of the `ldap` plugin. + + +## Before you start + +- **Check your Vault permissions**. You must have permission to enable and + configure plugins in Vault. +- **Create an LDAP account for Vault**. We highly recommend creating a dedicated + entry management account for Vault. + + + +## Step 1: Enable the plugin + diff --git a/content/vault/v1.21.x/data/docs-nav-data.json b/content/vault/v1.21.x/data/docs-nav-data.json index d4fec40110..d814ac495d 100644 --- a/content/vault/v1.21.x/data/docs-nav-data.json +++ b/content/vault/v1.21.x/data/docs-nav-data.json @@ -2311,7 +2311,16 @@ }, { "title": "LDAP", - "path": "secrets/ldap" + "routes": [ + { + "title": "Overview", + "path": "secrets/ldap" + }, + { + "title": "Setup", + "path": "secrets/ldap/setup" + } + ] }, { "title": "PKI (Certificates)", From e9e31d29e6c4bb888743525f321df8a432e6212b Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Fri, 14 Nov 2025 15:45:14 -0800 Subject: [PATCH 02/18] saving progress --- .../content/docs/secrets/ldap/index.mdx | 50 +- .../content/docs/secrets/ldap/index2.mdx | 109 +++ .../content/docs/secrets/ldap/overview.mdx | 632 ++++++++++++++++++ .../content/docs/secrets/ldap/setup.mdx | 174 +++++ content/vault/v1.21.x/data/docs-nav-data.json | 10 +- 5 files changed, 933 insertions(+), 42 deletions(-) create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/overview.mdx diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx index 858f16fff5..9e907521de 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx @@ -2,51 +2,19 @@ layout: docs page_title: LDAP secrets engine description: >- - Dynamically create and manage LDAP entry passwords with the LDAP secret engine plugin. + Dynamically create and manage LDAP entry passwords with the LDAP secret engine + plugin. --- # LDAP secrets engine -Hi - - -@include 'x509-sha1-deprecation.mdx' - -H1 | H2 | H3 ---- | --- | --- - A | B | C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ABCD
Hi123
Howdy456
Hello789
+Latest version | Code source | Runtime +-------------- | ----------- | ------- +1.21.x | Embedded | Built-in + + +## Changelog + The LDAP secrets engine provides management of LDAP credentials as well as dynamic diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx new file mode 100644 index 0000000000..9289ebd1b1 --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx @@ -0,0 +1,109 @@ +--- +layout: docs +page_title: LDAP secrets engine +description: >- + Dynamically create and manage LDAP entry passwords with the LDAP secret engine + plugin. +--- + +# LDAP secrets engine + +Edition | Runtime | Code source +--------- | -------- | ----------- +Community | Built-in | [`hashicorp/vault-plugin-secrets-openldap`](https://github.com/hashicorp/vault-plugin-secrets-openldap) + +The LDAP secrets engine provides management of LDAP credentials as well as dynamic +creation of credentials. It supports integration with implementations of the LDAP +v3 protocol, including OpenLDAP, Active Directory, and IBM Resource Access Control +Facility (RACF). + + + + + + + +Step-by-step instructions: + +- [Set up the `ldap` plugin](/vault/docs/secrets/ldap/setup) + + + + + +Basic examples: + +- [Read data](/vault/docs/secrets/kv/kv-v2/cookbook/read-data) +- [Set max data versions](/vault/docs/secrets/kv/kv-v2/cookbook/max-versions) +- [Write data](/vault/docs/secrets/kv/kv-v2/cookbook/write-data) +- [Patch and update data](/vault/docs/secrets/kv/kv-v2/cookbook/patch-data) +- [Read subkeys](/vault/docs/secrets/kv/kv-v2/cookbook/read-subkey) +- [Soft delete data](/vault/docs/secrets/kv/kv-v2/cookbook/delete-data) +- [Restore soft deleted data](/vault/docs/secrets/kv/kv-v2/cookbook/undelete-data) +- [Destroy data](/vault/docs/secrets/kv/kv-v2/cookbook/destroy-data) +- [Write custom metadata](/vault/docs/secrets/kv/kv-v2/cookbook/custom-metadata) + + + + + +Technical references: + +- [LDAP plugin API docs](/vault/api-docs/secret/ldap) + + + + + +Detailed tutorials: + +- [Manage LDAP credentials with Vault](/vault/tutorials/secrets-management/openldap). +- [Implement identity entities and groups](/vault/tutorials/auth-methods/identity) + + + + + +
+ +--- + +## October 7, 2025 ((#2025-10-07)) + +Version | Vault requirement +------- | ----------------- +0.17.0 | 1.21.x + +Feature upates: + +- [GH-211](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/211): + Add event notification support +- [GH-184](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/184) + Add RACF password phrase management for static roles +- [GH-170](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/170) + Add RACF passphrase support + + +## August 21, 2025 ((#2025-08-21)) + +Version | Vault requirement +------- | ----------------- +0.16.1 | 1.21.x + +Feature upates: + +- [GH-184](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/184): + Support RACF password phrase management for static roles +- Rotations actions log on success and failure + +## June 4, 2025 ((#2025-06-04)) + +Version | Vault requirement +------- | ----------------- +0.16.0 | 1.21.x + +Bug fixes: + +- [GH-156](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/156): + Fix issue where roles created before 0.14.5 had a `nil` `NextVaultRotation` value + diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/overview.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/overview.mdx new file mode 100644 index 0000000000..32f9a8f4e8 --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/overview.mdx @@ -0,0 +1,632 @@ +--- +layout: docs +page_title: LDAP secrets engine +description: >- + Dynamically create and manage LDAP entry passwords with the LDAP secret engine + plugin. +--- + +# LDAP secrets engine overview + + +The LDAP secrets engine provides management of LDAP credentials as well as dynamic +creation of credentials. It supports integration with implementations of the LDAP +v3 protocol, including OpenLDAP, Active Directory, and IBM Resource Access Control +Facility (RACF). + +The LDAP secrets plugin has three primary features: + +- [Static Credentials](/vault/docs/secrets/ldap#static-credentials) +- [Dynamic Credentials](/vault/docs/secrets/ldap#dynamic-credentials) +- [Service Account Check-Out](/vault/docs/secrets/ldap#service-account-check-out) + + + +## Schemas + +The LDAP Secret Engine supports three different schemas: + +- `openldap` (default) +- `racf` +- `ad` + +### OpenLDAP + +By default, the LDAP Secret Engine assumes the entry password is stored in `userPassword`. +There are many object classes that provide `userPassword` including for example: + +- `organization` +- `organizationalUnit` +- `organizationalRole` +- `inetOrgPerson` +- `person` +- `posixAccount` + +### Resource access control facility (RACF) + +To manage credentials for an IBM Resource Access Control Facility (RACF), +configure the LDAP secrets engine with the `racf` schema to enable the +behaviors required for RACF compatibility. + +#### Password vs. password phrase credentials + +The LDAP plugin supports traditional 8-character passwords and modern, +longer password phrases through th +[`credential_type`](/vault/api-docs/secret/ldap#credential_type) parameter: + +- `password` (Default): Configure the plugin to generate and manage standard RACF passwords. +- `phrase`: Configure the plugin to generate and manage case-sensitive password phrases. + + +#### Configure password rules + +The RACF schema does not control the credential complexity rules directly. +To enforce site-specific complexity requirements, define and link a +standard Vault [password policy](/vault/docs/concepts/password-policies) +to your RACF schema. + + +#### Example configuration + +The following example configures the LDAP engine for RACF, sets it to manage +password phrases, and links a password policy to enforce length and +complexity. + +```shell-session +$ cat > /tmp/password_policy.hcl <<-EOF +length = 20 +rule "charset" { + charset = "abcdefghijklmnopqrstuvwxyz" + min-chars = 1 +} +EOF +$ vault write sys/policies/password/racf_password_policy policy=@/tmp/password_policy.hcl +$ vault write ldap/config \ + binddn="$USERNAME" \ + bindpass="$PASSWORD" \ + url="ldaps://138.91.247.105" \ + schema="racf" \ + credential_type="phrase" \ + password_policy="racf_password_policy" +``` + +### Active directory (AD) + +For managing Active Directory instances, the secret engine must be configured to use the +schema `ad`. + +```bash +$ vault write ldap/config \ + binddn=$USERNAME \ + bindpass=$PASSWORD \ + url=ldaps://138.91.247.105 \ + schema=ad +``` + +## Root credential rotation + +Mounts can rotate root credential keys configured directly within the mount. +Rotating to a Vault-generated key makes the key value inaccessible to the +operator and ensures only Vault can operate as a root user to manipulate dynamic +and static credentials. + +```shell-session +vault write -f ldap/rotate-root +``` + +### Schedule-based root credential rotation + +@include 'alerts/enterprise-only.mdx' + +Use the [`rotation_schedule`](/vault/api-docs/secret/ldap#rotation_schedule) field +to configure schedule-based, automatic credential rotation for root credentials in +the LDAP secrets engine. For example, the following command set the rotation to +occur every Saturday at midnight (00:00): + +```shell-session +$ vault write ldap/config \ + ... + rotation_schedule="0 * * * SAT" + ... +``` + +This configuration will set the role's credential rotation to occur on Saturday +at 00:00. + +Scheduled root credential rotation can also set a +[rotation_window](/vault/api-docs/secret/ldap#rotation_window) during which the +scheduled rotation is allowed to occur. Vault will stop trying to rotate the +credential once the window expires. For example, the following command tells +Vault to rotate the credential on Saturday at midnight, but only within the span +of an hour. If Vault cannot rotate the credential by 1:00, due to a failure +or otherwise, Vault will stop trying to rotate the credential until the next +scheduled rotation. + +```shell-session +$ vault write ldap/config \ + ... + rotation_window="1h" \ + rotation_schedule="0 * * * SAT" + ... +``` + +You can temporarily disable root rotation by setting +[`disable_automated_rotation`](/vault/api-docs/secret/ldap#disable_automated_rotation) +to `true`. Setting the `disable_automated_rotation` field prevent any rotation +of the root credential until the field is reset to `false`. If you use +`rotation_period`, setting `disable_automated_rotation` also resets the credential +TTL. + +For more details on rotating root credentials in the LDAP plugin, refer to the +[Root credential rotation](/vault/api-docs/secret/ldap#rotate-root) API docs. + +@include 'rotation-manager-logging.mdx' + +## Static credentials + +### Setup + +1. Configure a static role that maps a name in Vault to an entry in LDAP. + Password rotation settings will be managed by this role. + + ```shell-session + $ vault write ldap/static-role/hashicorp \ + dn='uid=hashicorp,ou=users,dc=hashicorp,dc=com' \ + username='hashicorp' \ + rotation_period="24h" + ``` + +2. Request credentials for the "hashicorp" role: + + ```shell-session + $ vault read ldap/static-cred/hashicorp + ``` + +### Password rotation + +Passwords can be managed in two ways: + +- automatic time based rotation +- manual rotation + +### TTL-based static role rotation + +Passwords will automatically be rotated based on the `rotation_period` configured +in the static role (minimum of 5 seconds). When requesting credentials for a static +role, the response will include the time before the next rotation (`ttl`). + +The `binddn` account used by Vault should be rotated using the `rotate-root` endpoint to generate a password +only Vault will know. + +As with the rotation manager, Vault logs rotations with reference to the +`name` of the role and `error` if the rotation failed. The logs also indicate +if the rotation was part of a `periodic function`. + +### Manual rotation + +Static roles can be manually rotated using the `rotate-role` endpoint. When manually +rotated the rotation period will start over. + +Logging for manual rotation records the same information as other rotation +logging with an additional reference that the rotation happened `on user request`. + +### Deleting static roles + +Passwords are not rotated upon deletion of a static role. The password should be manually +rotated prior to deleting the role or revoking access to the static role. + +## Dynamic credentials + +### Setup + +Dynamic credentials can be configured by calling the `/role/:role_name` endpoint: + +```bash +$ vault write ldap/role/dynamic-role \ + creation_ldif=@/path/to/creation.ldif \ + deletion_ldif=@/path/to/deletion.ldif \ + rollback_ldif=@/path/to/rollback.ldif \ + default_ttl=1h \ + max_ttl=24h +``` + +-> Note: The `rollback_ldif` argument is optional, but recommended. The statements within `rollback_ldif` will be +executed if the creation fails for any reason. This ensures any entities are removed in the event of a failure. + +To generate credentials: + +```bash +$ vault read ldap/creds/dynamic-role +Key Value +--- ----- +lease_id ldap/creds/dynamic-role/HFgd6uKaDomVMvJpYbn9q4q5 +lease_duration 1h +lease_renewable true +distinguished_names [cn=v_token_dynamic-role_FfH2i1c4dO_1611952635,ou=users,dc=learn,dc=example] +password xWMjkIFMerYttEbzfnBVZvhRQGmhpAA0yeTya8fdmDB3LXDzGrjNEPV2bCPE9CW6 +username v_token_testrole_FfH2i1c4dO_1611952635 +``` + +The `distinguished_names` field is an array of DNs that are created from the `creation_ldif` statements. If more than +one LDIF entry is included, the DN from each statement will be included in this field. Each entry in this field +corresponds to a single LDIF statement. No de-duplication occurs and order is maintained. + +### LDIF entries + +User account management is provided through LDIF entries. The LDIF entries may be a base64-encoded version of the +LDIF string. The string will be parsed and validated to ensure that it adheres to LDIF syntax. A good reference +for proper LDIF syntax can be found [here](https://ldap.com/ldif-the-ldap-data-interchange-format/). + +Some important things to remember when crafting your LDIF entries: + +- There should not be any trailing spaces on any line, including empty lines +- Each `modify` block needs to be preceded with an empty line +- Multiple modifications for a `dn` can be defined in a single `modify` block. Each modification needs to close + with a single dash (`-`) + +### Active directory (AD) + + + + Windows Servers hosting Active Directory include a + `lifetime period of an old password` configuration setting that lets clients + authenticate with old passwords for a specified amount of time. + + For more information, refer to the + [NTLM network authentication behavior](https://learn.microsoft.com/en-us/troubleshoot/windows-server/windows-security new-setting-modifies-ntlm-network-authentication) + guide by Microsoft. + + + +For Active Directory, there are a few additional details that are important to remember: + +To create a user programmatically in AD, you first `add` a user object and then `modify` that user to provide a +password and enable the account. + +- Passwords in AD are set using the `unicodePwd` field. This must be proceeded by two (2) colons (`::`). +- When setting a password programmatically in AD, the following criteria must be met: + + - The password must be enclosed in double quotes (`" "`) + - The password must be in [`UTF16LE` format](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/6e803168-f140-4d23-b2d3-c3a8ab5917d2) + - The password must be `base64`-encoded + - Additional details can be found [here](https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/set-user-password-with-ldifde) + +- Once a user's password has been set, it can be enabled. AD uses the `userAccountControl` field for this purpose: + - To enable the account, set `userAccountControl` to `512` + - You will likely also want to disable AD's password expiration for this dynamic user account. The + `userAccountControl` value for this is: `65536` + - `userAccountControl` flags are cumulative, so to set both of the above two flags, add up the two values + (`512 + 65536 = 66048`): set `userAccountControl` to `66048` + - See [here](https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties#property-flag-descriptions) + for details on `userAccountControl` flags + +`sAMAccountName` is a common field when working with AD users. It is used to provide compatibility with legacy +Windows NT systems and has a limit of 20 characters. Keep this in mind when defining your `username_template`. +See [here](https://docs.microsoft.com/en-us/windows/win32/adschema/a-samaccountname) for additional details. + +Since the default `username_template` is longer than 20 characters which follows the template of `v_{{.DisplayName}}_{{.RoleName}}_{{random 10}}_{{unix_time}}`, we recommend customising the `username_template` on the role configuration to generate accounts with names less than 20 characters. Please refer to the [username templating document](/vault/docs/concepts/username-templating) for more information. + +With regard to adding dynamic users to groups, AD doesn't let you directly modify a user's `memberOf` attribute. +The `member` attribute of a group and `memberOf` attribute of a user are +[linked attributes](https://docs.microsoft.com/en-us/windows/win32/ad/linked-attributes). Linked attributes are +forward link/back link pairs, with the forward link able to be modified. In the case of AD group membership, the +group's `member` attribute is the forward link. In order to add a newly-created dynamic user to a group, we also +need to issue a `modify` request to the desired group and update the group membership with the new user. + +#### Active directory LDIF example + +The various `*_ldif` parameters are templates that use the [go template](https://golang.org/pkg/text/template/) +language. A complete LDIF example for creating an Active Directory user account is provided here for reference: + +```ldif +dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab +changetype: add +objectClass: top +objectClass: person +objectClass: organizationalPerson +objectClass: user +userPrincipalName: {{.Username}}@adtesting.lab +sAMAccountName: {{.Username}} + +dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab +changetype: modify +replace: unicodePwd +unicodePwd::{{ printf "%q" .Password | utf16le | base64 }} +- +replace: userAccountControl +userAccountControl: 66048 +- + +dn: CN=test-group,OU=HashiVault,DC=adtesting,DC=lab +changetype: modify +add: member +member: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab +- +``` + +## Service account Check-Out + +Service account check-out provides a library of service accounts that can be checked out +by a person or by machines. Vault will automatically rotate the password each time a +service account is checked in. Service accounts can be voluntarily checked in, or Vault +will check them in when their lending period (or, "ttl", in Vault's language) ends. + +The service account check-out functionality works with various [schemas](/vault/api-docs/secret/ldap#schema), +including OpenLDAP, Active Directory, and RACF. In the following usage example, the secrets +engine is configured to manage a library of service accounts in an Active Directory instance. + +First we'll need to enable the LDAP secrets engine and tell it how to securely connect +to an AD server. + +```shell-session +$ vault secrets enable ldap +Success! Enabled the ad secrets engine at: ldap/ + +$ vault write ldap/config \ + binddn=$USERNAME \ + bindpass=$PASSWORD \ + url=ldaps://138.91.247.105 \ + userdn='dc=example,dc=com' +``` + +Our next step is to designate a set of service accounts for check-out. + +```shell-session +$ vault write ldap/library/accounting-team \ + service_account_names=fizz@example.com,buzz@example.com \ + ttl=10h \ + max_ttl=20h \ + disable_check_in_enforcement=false +``` + +In this example, the service account names of `fizz@example.com` and `buzz@example.com` have +already been created on the remote AD server. They've been set aside solely for Vault to handle. +The `ttl` is how long each check-out will last before Vault checks in a service account, +rotating its password during check-in. The `max_ttl` is the maximum amount of time it can live +if it's renewed. These default to `24h`, and both use [duration format strings](/vault/docs/concepts/duration-format). +Also by default, a service account must be checked in by the same Vault entity or client token that +checked it out. However, if this behavior causes problems, set `disable_check_in_enforcement=true`. + +When a library of service accounts has been created, view their status at any time to see if they're +available or checked out. + +```shell-session +$ vault read ldap/library/accounting-team/status +Key Value +--- ----- +buzz@example.com map[available:true] +fizz@example.com map[available:true] +``` + +To check out any service account that's available, simply execute: + +```shell-session +$ vault write -f ldap/library/accounting-team/check-out +Key Value +--- ----- +lease_id ldap/library/accounting-team/check-out/EpuS8cX7uEsDzOwW9kkKOyGW +lease_duration 10h +lease_renewable true +password ?@09AZKh03hBORZPJcTDgLfntlHqxLy29tcQjPVThzuwWAx/Twx4a2ZcRQRqrZ1w +service_account_name fizz@example.com +``` + +If the default `ttl` for the check-out is higher than needed, set the check-out to last +for a shorter time by using: + +```shell-session +$ vault write ldap/library/accounting-team/check-out ttl=30m +Key Value +--- ----- +lease_id ldap/library/accounting-team/check-out/gMonJ2jB6kYs6d3Vw37WFDCY +lease_duration 30m +lease_renewable true +password ?@09AZerLLuJfEMbRqP+3yfQYDSq6laP48TCJRBJaJu/kDKLsq9WxL9szVAvL/E1 +service_account_name buzz@example.com +``` + +This can be a nice way to say, "Although I _can_ have a check-out for 24 hours, if I +haven't checked it in after 30 minutes, I forgot or I'm a dead instance, so you can just +check it back in." + +If no service accounts are available for check-out, Vault will return a 400 Bad Request. + +```shell-session +$ vault write -f ldap/library/accounting-team/check-out +Error writing data to ldap/library/accounting-team/check-out: Error making API request. + +URL: POST http://localhost:8200/v1/ldap/library/accounting-team/check-out +Code: 400. Errors: + +* No service accounts available for check-out. +``` + +To extend a check-out, renew its lease. + +```shell-session +$ vault lease renew ldap/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq +Key Value +--- ----- +lease_id ldap/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq +lease_duration 10h +lease_renewable true +``` + +Renewing a check-out means its current password will live longer, since passwords are rotated +anytime a password is _checked in_ either by a caller, or by Vault because the check-out `ttl` +ends. + +To check a service account back in for others to use, call: + +```shell-session +$ vault write -f ldap/library/accounting-team/check-in +Key Value +--- ----- +check_ins [fizz@example.com] +``` + +Most of the time this will just work, but if multiple service accounts are checked out by the same +caller, Vault will need to know which one(s) to check in. + +```shell-session +$ vault write ldap/library/accounting-team/check-in service_account_names=fizz@example.com +Key Value +--- ----- +check_ins [fizz@example.com] +``` + +To perform a check-in, Vault verifies that the caller _should_ be able to check in a given service account. +To do this, Vault looks for either the same [entity ID](/vault/tutorials/auth-methods/identity) +used to check out the service account, or the same client token. + +If a caller is unable to check in a service account, or simply doesn't try, +Vault will check it back in automatically when the `ttl` expires. However, if that is too long, +service accounts can be forcibly checked in by a highly privileged user through: + +```shell-session +$ vault write -f ldap/library/manage/accounting-team/check-in +Key Value +--- ----- +check_ins [fizz@example.com] +``` + +Or, alternatively, revoking the secret's lease has the same effect. + +```shell-session +$ vault lease revoke ldap/library/accounting-team/check-out/PvBVG0m7pEg2940Cb3Jw3KpJ +All revocation operations queued successfully! +``` + +## Password generation + +This engine previously allowed configuration of the length of the password that is generated +when rotating credentials. This mechanism was deprecated in Vault 1.5 in favor of +[password policies](/vault/docs/concepts/password-policies). This means the `length` field should +no longer be used. The following password policy can be used to mirror the same behavior +that the `length` field provides: + +```hcl +length= +rule "charset" { + charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +} +``` + +## LDAP password policy + +The LDAP secret engine does not hash or encrypt passwords prior to modifying +values in LDAP. This behavior can cause plaintext passwords to be stored in LDAP. + +To avoid having plaintext passwords stored, the LDAP server should be configured +with an LDAP password policy (ppolicy, not to be confused with a Vault password +policy). A ppolicy can enforce rules such as hashing plaintext passwords by default. + +The following is an example of an LDAP password policy to enforce hashing on the +data information tree (DIT) `dc=hashicorp,dc=com`: + +``` +dn: cn=module{0},cn=config +changetype: modify +add: olcModuleLoad +olcModuleLoad: ppolicy + +dn: olcOverlay={2}ppolicy,olcDatabase={1}mdb,cn=config +changetype: add +objectClass: olcPPolicyConfig +objectClass: olcOverlayConfig +olcOverlay: {2}ppolicy +olcPPolicyDefault: cn=default,ou=pwpolicies,dc=hashicorp,dc=com +olcPPolicyForwardUpdates: FALSE +olcPPolicyHashCleartext: TRUE +olcPPolicyUseLockout: TRUE +``` + +## Hierarchical paths + +The LDAP secrets engine lets you define role and set names that contain an +arbitrary number of forward slashes. Names with forward slashes define +hierarchical path structures. + +For example, you can configure two static roles with the names `org/secure` and `org/platform/dev`: + +```shell-session +$ vault write ldap/static-role/org/secure \ + username="user1" \ + rotation_period="1h" +Success! Data written to: ldap/static-role/org/secure + +$ vault write ldap/static-role/org/platform/dev \ + username="user2" \ + rotation_period="1h" +Success! Data written to: ldap/static-role/org/platform/dev +``` + +Names with hierarchical paths let you use the Vault API to query the available +roles at a specific path with arbitrary depth. Names that end with a forward +slash indicate that sub-paths reside under that path. + +For example, to list all direct children under the `org/` path: + +```shell-session +$ vault list ldap/static-role/org/ +Keys +---- +platform/ +secure +``` + +The `platform/` key also ends in a forward slash. To list the `platform` sub-keys: + +```shell-session +$ vault list ldap/static-role/org/platform +Keys +---- +dev +``` + +You can read and rotate credentials using the same role name and the respective +APIs. For example, + +```shell-session +$ vault read ldap/static-cred/org/platform/dev +Key Value +--- ----- +dn n/a +last_password a3sQ6OkmXKt2dtx22kAt36YLkkxLsg4RmhMZCLYCBCbvvv67ILROaOokdCaGPEAE +last_vault_rotation 2024-05-03T16:39:27.174164-05:00 +password ECf7ZoxfDxGuJEYZrzgzTffSIDI4tx5TojBR9wuEGp8bqUXbl4Kr9eAgPjmizcvg +rotation_period 5m +ttl 4m58s +username user2 +``` + +```shell-session +$ vault write -f ldap/rotate-role/org/platform/dev +``` + +Since [Vault policies](/vault/docs/concepts/policies) are also path-based, +hierarchical names also let you define policies that map 1-1 to LDAP secrets +engine roles and set paths. + +The following Vault API endpoints support hierarchical path handling: + +- [Static roles](/vault/api-docs/secret/ldap#static-roles) +- [Static role passwords](/vault/api-docs/secret/ldap#static-role-passwords) +- [Manually rotate static role password](/vault/api-docs/secret/ldap#manually-rotate-static-role-password) +- [Dynamic roles](/vault/api-docs/secret/ldap#dynamic-roles) +- [Dynamic role passwords](/vault/api-docs/secret/ldap#dynamic-role-passwords) +- [Library set management](/vault/api-docs/secret/ldap#library-set-management) +- [Library set status check](/vault/api-docs/secret/ldap#library-set-status-check) +- [Check-Out management](/vault/api-docs/secret/ldap#check-out-management) +- [Check-In management](/vault/api-docs/secret/ldap#check-in-management) + +## Tutorial + +Refer to the [LDAP Secrets Engine](/vault/tutorials/secrets-management/openldap) +tutorial to learn how to configure and use the LDAP secrets engine. + + +## API + +The LDAP secrets engine has a full HTTP API. Please see the [LDAP secrets engine API docs](/vault/api-docs/secret/ldap) +for more details. diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx index 6692c4354d..c7d8e8d4dc 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx @@ -23,3 +23,177 @@ Use `vault secrets enable` to enable an instance of the `ldap` plugin. ## Step 1: Enable the plugin + + + + +Use `vault secrets enable` to establish a new instance of the `ldap` plugin. By +default, Vault uses the plugin name as the mount path. To configure a custom +mount path, use the `-path` flag: + +```shell-session +$ vault secrets enable -path ldap +``` + +For example: + +```shell-session +$ vault secrets enable -path devcreds ldap +``` + + + + + +@include 'gui-instructions/enable-secrets-plugin.mdx' + +- Select the "LDAP" plugin. + +- Enter a unique path for the plugin and provide the relevant configuration + data. + + + + + +Make a `POST` call to +[`/sys/mounts/{mount_path}`](/vault/api-docs/system/mounts#enable-secrets-engine): + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data '{"type": "ldap"}' \ + ${VAULT_ADDR}/v1/sys/mounts/ +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data '{"type": "ldap"}' \ + ${VAULT_ADDR}/v1/sys/mounts/devcreds | jq +``` + + + +`/sys/mounts/{mount_path}` does not return data on success. + + + + + + + +## Step 2: Connect Vault and your LDAP server + +Configure the bind the DN and password for your `ldap` plugin so that Vault can +communicate with your LDAP server to generate passwords. + + + + + +```shell-session +$ vault write dev/config \ + binddn= \ + bindpass= \ + url= +``` + +For example: + + + +```shell-session +$ vault write devcreds/config \ + binddn="cn=admin,dc=abc,dc=com" \ + bindpass="iamabadpassword" \ + url=ldaps://138.91.247.105 +``` + + + + + + + +TBD + + + + + + + +## Step 3: Rotate the root password + +Once you connect Vault and your LDAP server, rotate the root password so only +Vault knows the credentials. + + + + + +Use `vault write` with the `rotate-root` endpoint to rotate the credential: + +```shell-session +$ vault write -f /rotate-root +``` + +For example: + + + +```shell-session +$ vault write -f devcreds/rotate-root +``` + + + + + + + +Make a `POST` call to +[`/{mount_path}/rotate-root`](/vault/api-docs/secret/ldap#rotate-root-password) +to rotate the credential:: + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/sys//rotate-root +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/sys/devcreds/rotate-root +``` + + + + + + + + + +Once you rotate the root credential you cannot retrieve the newly generated +password. + + \ No newline at end of file diff --git a/content/vault/v1.21.x/data/docs-nav-data.json b/content/vault/v1.21.x/data/docs-nav-data.json index d814ac495d..86342cebcb 100644 --- a/content/vault/v1.21.x/data/docs-nav-data.json +++ b/content/vault/v1.21.x/data/docs-nav-data.json @@ -2313,9 +2313,17 @@ "title": "LDAP", "routes": [ { - "title": "Overview", + "title": "Boo", "path": "secrets/ldap" }, + { + "title": "Status", + "path": "secrets/ldap/index2" + }, + { + "title": "Overview", + "path": "secrets/ldap/overview" + }, { "title": "Setup", "path": "secrets/ldap/setup" From ee12851b0403a74ebaf366c1b314a6e7caf89e70 Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Mon, 17 Nov 2025 13:12:24 -0800 Subject: [PATCH 03/18] saving because of crashes --- .../ldap/cookbook/basic-racf-config.mdx | 99 +++ .../ldap/cookbook/create-static-roles.mdx | 98 +++ .../ldap/cookbook/rotate-root-creds.mdx | 75 +++ .../content/docs/secrets/ldap/index.mdx | 2 +- .../content/docs/secrets/ldap/index2.mdx | 619 +++++++++++++++-- .../content/docs/secrets/ldap/overview.mdx | 632 ------------------ .../content/docs/secrets/ldap/setup.mdx | 2 + .../content/docs/secrets/ldap/updates.mdx | 27 + content/vault/v1.21.x/data/docs-nav-data.json | 19 +- 9 files changed, 873 insertions(+), 700 deletions(-) create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/basic-racf-config.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/create-static-roles.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-root-creds.mdx delete mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/overview.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/updates.mdx diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/basic-racf-config.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/basic-racf-config.mdx new file mode 100644 index 0000000000..1adfd96844 --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/basic-racf-config.mdx @@ -0,0 +1,99 @@ +--- +layout: docs +page_title: Configure LDAP for Resource access control facility (RACF) +description: >- + TBD +--- + +# Configure LDAP for Resource access control facility (RACF) + +configures the LDAP +secrets engine plugin to: + +- Use the RACF schema (`racf`). +- Automatically manage password phrases. +- Refer to a Vault password policy to enforce password length and complexity. + + + +- You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). +- You have a Vault [password policy](/vault/docs/concepts/password-policies) + defined for your RACF schema. + + + + + + + +1. Create a JSON file called `racf-config.json` with the basic configuration + settings: + +1. Use `vault write` with the `/config` path to configure the plugin: + + ```shell-session + $ vault write /config \ + binddn= \ + bindpass= \ + url= \ + schema="racf" \ + credential_type="phrase" \ + password_policy="" + ``` + + For example: + + + + ```shell-session + $ vault write devcreds/config \ + binddn="cn=admin,dc=abc,dc=com" \ + bindpass="iamabadpassword" \ + url=ldaps://138.91.247.105 \ + schema="racf" \ + credential_type="phrase" \ + password_policy="racf_password_policy" + ``` + + + + + + + +1. Create a JSON file called `racf-config.json` with the basic configuration + settings: + + +Make a `POST` call to +[`/{mount_path}/config`](/vault/api-docs/secret/ldap#configuration-management) +to configure the plugin: + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/sys//config +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/sys/devcreds/rotate-root +``` + + + + + + + + + diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/create-static-roles.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/create-static-roles.mdx new file mode 100644 index 0000000000..c02c18de18 --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/create-static-roles.mdx @@ -0,0 +1,98 @@ +--- +layout: docs +page_title: Create static roles +description: >- + TBD +--- + +# Create static LDAP roles + +TBD + + + +- You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). +- TBD + + + + + + + +-------------------------------------------------------------------------------- + +Setup : + +1. Configure a static role that maps a name in Vault to an entry in LDAP. + Password rotation settings will be managed by this role. + + ```shell-session + $ vault write ldap/static-role/hashicorp \ + dn='uid=hashicorp,ou=users,dc=hashicorp,dc=com' \ + username='hashicorp' \ + rotation_period="24h" + ``` + +2. Request credentials for the "hashicorp" role: + + ```shell-session + $ vault read ldap/static-cred/hashicorp + ``` + + + +-------------------------------------------------------------------------------- + + + +Use `vault read` with the `/subkeys` path to retrieve a list of secret data +subkeys at the given path. + +```shell-session +$ vault write -f /rotate-root +``` + +For example: + + + +```shell-session +$ vault write -f devcreds/rotate-root +``` + + + + + + + +Make a `POST` call to +[`/{mount_path}/rotate-root`](/vault/api-docs/secret/ldap#rotate-root-password) +to rotate the credential:: + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/sys//rotate-root +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/sys/devcreds/rotate-root +``` + + + + + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-root-creds.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-root-creds.mdx new file mode 100644 index 0000000000..7c2b77ea4b --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-root-creds.mdx @@ -0,0 +1,75 @@ +--- +layout: docs +page_title: Rotate root LDAP credentials +description: >- + TBD +--- + +# Rotate root LDAP credentials + +Mounts can rotate root credential keys configured directly within the mount. +Rotating to a Vault-generated key makes the key value inaccessible to the +operator and ensures only Vault can operate as a root user to manipulate dynamic +and static credentials. + + + +- You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). +- TBD + + + + + + + +Use `vault read` with the `/subkeys` path to retrieve a list of secret data +subkeys at the given path. + +```shell-session +$ vault write -f /rotate-root +``` + +For example: + + + +```shell-session +$ vault write -f devcreds/rotate-root +``` + + + + + + + +Make a `POST` call to +[`/{mount_path}/rotate-root`](/vault/api-docs/secret/ldap#rotate-root-password) +to rotate the credential:: + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/sys//rotate-root +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/sys/devcreds/rotate-root +``` + + + + + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx index 9e907521de..59709cb61f 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx @@ -15,7 +15,7 @@ Latest version | Code source | Runtime ## Changelog - +hello, I'm an index page The LDAP secrets engine provides management of LDAP credentials as well as dynamic creation of credentials. It supports integration with implementations of the LDAP diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx index 9289ebd1b1..ee7cb375c4 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx @@ -2,20 +2,563 @@ layout: docs page_title: LDAP secrets engine description: >- - Dynamically create and manage LDAP entry passwords with the LDAP secret engine - plugin. + Create and manage LDAP credentials with the LDAP secret engine plugin. --- -# LDAP secrets engine +# LDAP secrets engine overview -Edition | Runtime | Code source ---------- | -------- | ----------- -Community | Built-in | [`hashicorp/vault-plugin-secrets-openldap`](https://github.com/hashicorp/vault-plugin-secrets-openldap) +Manage static and dynamic LDAP credentials and integrate with services that +implement the LDAP v3 protocol, including OpenLDAP, Active Directory, and IBM +Resource Access Control Facility (RACF). + +Current version | Edition | Runtime | Code source +--------------- | --------- | -------- | ----------- +0.17.0 | Community | Built-in | [`hashicorp/vault-plugin-secrets-openldap`](https://github.com/hashicorp/vault-plugin-secrets-openldap) + + +## Feature summary + +- Use OpenLDAP, RACF, and Active Directory schemas. +- Map static Vault roles to LDAP credentials. +- Manually rotate LDAP passwords. +- Automatically rotate LDAP passwords. +- Manage LDAP user accounts through LDIF. +- Check-out service accounts with automatic password rotation. + + + +## Static credentials + +### Password rotation + +Passwords can be managed in two ways: + +- automatic time based rotation +- manual rotation + +### TTL-based static role rotation + +Passwords will automatically be rotated based on the `rotation_period` configured +in the static role (minimum of 5 seconds). When requesting credentials for a static +role, the response will include the time before the next rotation (`ttl`). + +The `binddn` account used by Vault should be rotated using the `rotate-root` endpoint to generate a password +only Vault will know. + +As with the rotation manager, Vault logs rotations with reference to the +`name` of the role and `error` if the rotation failed. The logs also indicate +if the rotation was part of a `periodic function`. + +### Manual rotation + +Static roles can be manually rotated using the `rotate-role` endpoint. When manually +rotated the rotation period will start over. + +Logging for manual rotation records the same information as other rotation +logging with an additional reference that the rotation happened `on user request`. + +### Deleting static roles + +Passwords are not rotated upon deletion of a static role. The password should be manually +rotated prior to deleting the role or revoking access to the static role. + +--------------------------------------------------------------------------------- + +### OpenLDAP + +- `openldap` (default) + +By default, the LDAP Secret Engine assumes the entry password is stored in `userPassword`. +There are many object classes that provide `userPassword` including for example: + +- `organization` +- `organizationalUnit` +- `organizationalRole` +- `inetOrgPerson` +- `person` +- `posixAccount` + +### Password vs. password phrase credentials + +The LDAP plugin supports traditional 8-character passwords and modern, +longer password phrases through th +[`credential_type`](/vault/api-docs/secret/ldap#credential_type) parameter: + +- `password` (Default): Configure the plugin to generate and manage standard RACF passwords. +- `phrase`: Configure the plugin to generate and manage case-sensitive password phrases. + + +### Active directory (AD) + +- `ad` + +For managing Active Directory instances, the secret engine must be configured to use the +schema `ad`. + +```bash +$ vault write ldap/config \ + binddn=$USERNAME \ + bindpass=$PASSWORD \ + url=ldaps://138.91.247.105 \ + schema=ad +``` + + +### Schedule-based root credential rotation + +@include 'alerts/enterprise-only.mdx' + +Use the [`rotation_schedule`](/vault/api-docs/secret/ldap#rotation_schedule) field +to configure schedule-based, automatic credential rotation for root credentials in +the LDAP secrets engine. For example, the following command set the rotation to +occur every Saturday at midnight (00:00): + +```shell-session +$ vault write ldap/config \ + ... + rotation_schedule="0 * * * SAT" + ... +``` + +This configuration will set the role's credential rotation to occur on Saturday +at 00:00. + +Scheduled root credential rotation can also set a +[rotation_window](/vault/api-docs/secret/ldap#rotation_window) during which the +scheduled rotation is allowed to occur. Vault will stop trying to rotate the +credential once the window expires. For example, the following command tells +Vault to rotate the credential on Saturday at midnight, but only within the span +of an hour. If Vault cannot rotate the credential by 1:00, due to a failure +or otherwise, Vault will stop trying to rotate the credential until the next +scheduled rotation. + +```shell-session +$ vault write ldap/config \ + ... + rotation_window="1h" \ + rotation_schedule="0 * * * SAT" + ... +``` + +You can temporarily disable root rotation by setting +[`disable_automated_rotation`](/vault/api-docs/secret/ldap#disable_automated_rotation) +to `true`. Setting the `disable_automated_rotation` field prevent any rotation +of the root credential until the field is reset to `false`. If you use +`rotation_period`, setting `disable_automated_rotation` also resets the credential +TTL. + +For more details on rotating root credentials in the LDAP plugin, refer to the +[Root credential rotation](/vault/api-docs/secret/ldap#rotate-root) API docs. + +@include 'rotation-manager-logging.mdx' + + + +## Dynamic credentials + +### Setup + +Dynamic credentials can be configured by calling the `/role/:role_name` endpoint: + +```bash +$ vault write ldap/role/dynamic-role \ + creation_ldif=@/path/to/creation.ldif \ + deletion_ldif=@/path/to/deletion.ldif \ + rollback_ldif=@/path/to/rollback.ldif \ + default_ttl=1h \ + max_ttl=24h +``` + +-> Note: The `rollback_ldif` argument is optional, but recommended. The statements within `rollback_ldif` will be +executed if the creation fails for any reason. This ensures any entities are removed in the event of a failure. + +To generate credentials: + +```bash +$ vault read ldap/creds/dynamic-role +Key Value +--- ----- +lease_id ldap/creds/dynamic-role/HFgd6uKaDomVMvJpYbn9q4q5 +lease_duration 1h +lease_renewable true +distinguished_names [cn=v_token_dynamic-role_FfH2i1c4dO_1611952635,ou=users,dc=learn,dc=example] +password xWMjkIFMerYttEbzfnBVZvhRQGmhpAA0yeTya8fdmDB3LXDzGrjNEPV2bCPE9CW6 +username v_token_testrole_FfH2i1c4dO_1611952635 +``` + +The `distinguished_names` field is an array of DNs that are created from the `creation_ldif` statements. If more than +one LDIF entry is included, the DN from each statement will be included in this field. Each entry in this field +corresponds to a single LDIF statement. No de-duplication occurs and order is maintained. + +### LDIF entries + +User account management is provided through LDIF entries. The LDIF entries may be a base64-encoded version of the +LDIF string. The string will be parsed and validated to ensure that it adheres to LDIF syntax. A good reference +for proper LDIF syntax can be found [here](https://ldap.com/ldif-the-ldap-data-interchange-format/). + +Some important things to remember when crafting your LDIF entries: + +- There should not be any trailing spaces on any line, including empty lines +- Each `modify` block needs to be preceded with an empty line +- Multiple modifications for a `dn` can be defined in a single `modify` block. Each modification needs to close + with a single dash (`-`) + +### Active directory (AD) + + + + Windows Servers hosting Active Directory include a + `lifetime period of an old password` configuration setting that lets clients + authenticate with old passwords for a specified amount of time. + + For more information, refer to the + [NTLM network authentication behavior](https://learn.microsoft.com/en-us/troubleshoot/windows-server/windows-security new-setting-modifies-ntlm-network-authentication) + guide by Microsoft. + + + +For Active Directory, there are a few additional details that are important to remember: + +To create a user programmatically in AD, you first `add` a user object and then `modify` that user to provide a +password and enable the account. + +- Passwords in AD are set using the `unicodePwd` field. This must be proceeded by two (2) colons (`::`). +- When setting a password programmatically in AD, the following criteria must be met: + + - The password must be enclosed in double quotes (`" "`) + - The password must be in [`UTF16LE` format](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/6e803168-f140-4d23-b2d3-c3a8ab5917d2) + - The password must be `base64`-encoded + - Additional details can be found [here](https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/set-user-password-with-ldifde) + +- Once a user's password has been set, it can be enabled. AD uses the `userAccountControl` field for this purpose: + - To enable the account, set `userAccountControl` to `512` + - You will likely also want to disable AD's password expiration for this dynamic user account. The + `userAccountControl` value for this is: `65536` + - `userAccountControl` flags are cumulative, so to set both of the above two flags, add up the two values + (`512 + 65536 = 66048`): set `userAccountControl` to `66048` + - See [here](https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties#property-flag-descriptions) + for details on `userAccountControl` flags + +`sAMAccountName` is a common field when working with AD users. It is used to provide compatibility with legacy +Windows NT systems and has a limit of 20 characters. Keep this in mind when defining your `username_template`. +See [here](https://docs.microsoft.com/en-us/windows/win32/adschema/a-samaccountname) for additional details. + +Since the default `username_template` is longer than 20 characters which follows the template of `v_{{.DisplayName}}_{{.RoleName}}_{{random 10}}_{{unix_time}}`, we recommend customising the `username_template` on the role configuration to generate accounts with names less than 20 characters. Please refer to the [username templating document](/vault/docs/concepts/username-templating) for more information. + +With regard to adding dynamic users to groups, AD doesn't let you directly modify a user's `memberOf` attribute. +The `member` attribute of a group and `memberOf` attribute of a user are +[linked attributes](https://docs.microsoft.com/en-us/windows/win32/ad/linked-attributes). Linked attributes are +forward link/back link pairs, with the forward link able to be modified. In the case of AD group membership, the +group's `member` attribute is the forward link. In order to add a newly-created dynamic user to a group, we also +need to issue a `modify` request to the desired group and update the group membership with the new user. + +#### Active directory LDIF example + +The various `*_ldif` parameters are templates that use the [go template](https://golang.org/pkg/text/template/) +language. A complete LDIF example for creating an Active Directory user account is provided here for reference: + +```ldif +dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab +changetype: add +objectClass: top +objectClass: person +objectClass: organizationalPerson +objectClass: user +userPrincipalName: {{.Username}}@adtesting.lab +sAMAccountName: {{.Username}} + +dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab +changetype: modify +replace: unicodePwd +unicodePwd::{{ printf "%q" .Password | utf16le | base64 }} +- +replace: userAccountControl +userAccountControl: 66048 +- + +dn: CN=test-group,OU=HashiVault,DC=adtesting,DC=lab +changetype: modify +add: member +member: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab +- +``` + +## Service account Check-Out + +Service account check-out provides a library of service accounts that can be checked out +by a person or by machines. Vault will automatically rotate the password each time a +service account is checked in. Service accounts can be voluntarily checked in, or Vault +will check them in when their lending period (or, "ttl", in Vault's language) ends. + +The service account check-out functionality works with various [schemas](/vault/api-docs/secret/ldap#schema), +including OpenLDAP, Active Directory, and RACF. In the following usage example, the secrets +engine is configured to manage a library of service accounts in an Active Directory instance. + +First we'll need to enable the LDAP secrets engine and tell it how to securely connect +to an AD server. + +```shell-session +$ vault secrets enable ldap +Success! Enabled the ad secrets engine at: ldap/ + +$ vault write ldap/config \ + binddn=$USERNAME \ + bindpass=$PASSWORD \ + url=ldaps://138.91.247.105 \ + userdn='dc=example,dc=com' +``` + +Our next step is to designate a set of service accounts for check-out. + +```shell-session +$ vault write ldap/library/accounting-team \ + service_account_names=fizz@example.com,buzz@example.com \ + ttl=10h \ + max_ttl=20h \ + disable_check_in_enforcement=false +``` + +In this example, the service account names of `fizz@example.com` and `buzz@example.com` have +already been created on the remote AD server. They've been set aside solely for Vault to handle. +The `ttl` is how long each check-out will last before Vault checks in a service account, +rotating its password during check-in. The `max_ttl` is the maximum amount of time it can live +if it's renewed. These default to `24h`, and both use [duration format strings](/vault/docs/concepts/duration-format). +Also by default, a service account must be checked in by the same Vault entity or client token that +checked it out. However, if this behavior causes problems, set `disable_check_in_enforcement=true`. + +When a library of service accounts has been created, view their status at any time to see if they're +available or checked out. + +```shell-session +$ vault read ldap/library/accounting-team/status +Key Value +--- ----- +buzz@example.com map[available:true] +fizz@example.com map[available:true] +``` + +To check out any service account that's available, simply execute: + +```shell-session +$ vault write -f ldap/library/accounting-team/check-out +Key Value +--- ----- +lease_id ldap/library/accounting-team/check-out/EpuS8cX7uEsDzOwW9kkKOyGW +lease_duration 10h +lease_renewable true +password ?@09AZKh03hBORZPJcTDgLfntlHqxLy29tcQjPVThzuwWAx/Twx4a2ZcRQRqrZ1w +service_account_name fizz@example.com +``` + +If the default `ttl` for the check-out is higher than needed, set the check-out to last +for a shorter time by using: + +```shell-session +$ vault write ldap/library/accounting-team/check-out ttl=30m +Key Value +--- ----- +lease_id ldap/library/accounting-team/check-out/gMonJ2jB6kYs6d3Vw37WFDCY +lease_duration 30m +lease_renewable true +password ?@09AZerLLuJfEMbRqP+3yfQYDSq6laP48TCJRBJaJu/kDKLsq9WxL9szVAvL/E1 +service_account_name buzz@example.com +``` + +This can be a nice way to say, "Although I _can_ have a check-out for 24 hours, if I +haven't checked it in after 30 minutes, I forgot or I'm a dead instance, so you can just +check it back in." + +If no service accounts are available for check-out, Vault will return a 400 Bad Request. + +```shell-session +$ vault write -f ldap/library/accounting-team/check-out +Error writing data to ldap/library/accounting-team/check-out: Error making API request. + +URL: POST http://localhost:8200/v1/ldap/library/accounting-team/check-out +Code: 400. Errors: + +* No service accounts available for check-out. +``` + +To extend a check-out, renew its lease. + +```shell-session +$ vault lease renew ldap/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq +Key Value +--- ----- +lease_id ldap/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq +lease_duration 10h +lease_renewable true +``` + +Renewing a check-out means its current password will live longer, since passwords are rotated +anytime a password is _checked in_ either by a caller, or by Vault because the check-out `ttl` +ends. + +To check a service account back in for others to use, call: + +```shell-session +$ vault write -f ldap/library/accounting-team/check-in +Key Value +--- ----- +check_ins [fizz@example.com] +``` + +Most of the time this will just work, but if multiple service accounts are checked out by the same +caller, Vault will need to know which one(s) to check in. + +```shell-session +$ vault write ldap/library/accounting-team/check-in service_account_names=fizz@example.com +Key Value +--- ----- +check_ins [fizz@example.com] +``` + +To perform a check-in, Vault verifies that the caller _should_ be able to check in a given service account. +To do this, Vault looks for either the same [entity ID](/vault/tutorials/auth-methods/identity) +used to check out the service account, or the same client token. + +If a caller is unable to check in a service account, or simply doesn't try, +Vault will check it back in automatically when the `ttl` expires. However, if that is too long, +service accounts can be forcibly checked in by a highly privileged user through: + +```shell-session +$ vault write -f ldap/library/manage/accounting-team/check-in +Key Value +--- ----- +check_ins [fizz@example.com] +``` + +Or, alternatively, revoking the secret's lease has the same effect. + +```shell-session +$ vault lease revoke ldap/library/accounting-team/check-out/PvBVG0m7pEg2940Cb3Jw3KpJ +All revocation operations queued successfully! +``` + +## Password generation + +This engine previously allowed configuration of the length of the password that is generated +when rotating credentials. This mechanism was deprecated in Vault 1.5 in favor of +[password policies](/vault/docs/concepts/password-policies). This means the `length` field should +no longer be used. The following password policy can be used to mirror the same behavior +that the `length` field provides: + +```hcl +length= +rule "charset" { + charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +} +``` + +## LDAP password policy + +The LDAP secret engine does not hash or encrypt passwords prior to modifying +values in LDAP. This behavior can cause plaintext passwords to be stored in LDAP. + +To avoid having plaintext passwords stored, the LDAP server should be configured +with an LDAP password policy (ppolicy, not to be confused with a Vault password +policy). A ppolicy can enforce rules such as hashing plaintext passwords by default. + +The following is an example of an LDAP password policy to enforce hashing on the +data information tree (DIT) `dc=hashicorp,dc=com`: + +``` +dn: cn=module{0},cn=config +changetype: modify +add: olcModuleLoad +olcModuleLoad: ppolicy + +dn: olcOverlay={2}ppolicy,olcDatabase={1}mdb,cn=config +changetype: add +objectClass: olcPPolicyConfig +objectClass: olcOverlayConfig +olcOverlay: {2}ppolicy +olcPPolicyDefault: cn=default,ou=pwpolicies,dc=hashicorp,dc=com +olcPPolicyForwardUpdates: FALSE +olcPPolicyHashCleartext: TRUE +olcPPolicyUseLockout: TRUE +``` + +## Hierarchical paths + +The LDAP secrets engine lets you define role and set names that contain an +arbitrary number of forward slashes. Names with forward slashes define +hierarchical path structures. + +For example, you can configure two static roles with the names `org/secure` and `org/platform/dev`: + +```shell-session +$ vault write ldap/static-role/org/secure \ + username="user1" \ + rotation_period="1h" +Success! Data written to: ldap/static-role/org/secure + +$ vault write ldap/static-role/org/platform/dev \ + username="user2" \ + rotation_period="1h" +Success! Data written to: ldap/static-role/org/platform/dev +``` + +Names with hierarchical paths let you use the Vault API to query the available +roles at a specific path with arbitrary depth. Names that end with a forward +slash indicate that sub-paths reside under that path. + +For example, to list all direct children under the `org/` path: + +```shell-session +$ vault list ldap/static-role/org/ +Keys +---- +platform/ +secure +``` + +The `platform/` key also ends in a forward slash. To list the `platform` sub-keys: + +```shell-session +$ vault list ldap/static-role/org/platform +Keys +---- +dev +``` + +You can read and rotate credentials using the same role name and the respective +APIs. For example, + +```shell-session +$ vault read ldap/static-cred/org/platform/dev +Key Value +--- ----- +dn n/a +last_password a3sQ6OkmXKt2dtx22kAt36YLkkxLsg4RmhMZCLYCBCbvvv67ILROaOokdCaGPEAE +last_vault_rotation 2024-05-03T16:39:27.174164-05:00 +password ECf7ZoxfDxGuJEYZrzgzTffSIDI4tx5TojBR9wuEGp8bqUXbl4Kr9eAgPjmizcvg +rotation_period 5m +ttl 4m58s +username user2 +``` + +```shell-session +$ vault write -f ldap/rotate-role/org/platform/dev +``` + +Since [Vault policies](/vault/docs/concepts/policies) are also path-based, +hierarchical names also let you define policies that map 1-1 to LDAP secrets +engine roles and set paths. + +The following Vault API endpoints support hierarchical path handling: + +- [Static roles](/vault/api-docs/secret/ldap#static-roles) +- [Static role passwords](/vault/api-docs/secret/ldap#static-role-passwords) +- [Manually rotate static role password](/vault/api-docs/secret/ldap#manually-rotate-static-role-password) +- [Dynamic roles](/vault/api-docs/secret/ldap#dynamic-roles) +- [Dynamic role passwords](/vault/api-docs/secret/ldap#dynamic-role-passwords) +- [Library set management](/vault/api-docs/secret/ldap#library-set-management) +- [Library set status check](/vault/api-docs/secret/ldap#library-set-status-check) +- [Check-Out management](/vault/api-docs/secret/ldap#check-out-management) +- [Check-In management](/vault/api-docs/secret/ldap#check-in-management) -The LDAP secrets engine provides management of LDAP credentials as well as dynamic -creation of credentials. It supports integration with implementations of the LDAP -v3 protocol, including OpenLDAP, Active Directory, and IBM Resource Access Control -Facility (RACF). @@ -33,15 +576,7 @@ Step-by-step instructions: Basic examples: -- [Read data](/vault/docs/secrets/kv/kv-v2/cookbook/read-data) -- [Set max data versions](/vault/docs/secrets/kv/kv-v2/cookbook/max-versions) -- [Write data](/vault/docs/secrets/kv/kv-v2/cookbook/write-data) -- [Patch and update data](/vault/docs/secrets/kv/kv-v2/cookbook/patch-data) -- [Read subkeys](/vault/docs/secrets/kv/kv-v2/cookbook/read-subkey) -- [Soft delete data](/vault/docs/secrets/kv/kv-v2/cookbook/delete-data) -- [Restore soft deleted data](/vault/docs/secrets/kv/kv-v2/cookbook/undelete-data) -- [Destroy data](/vault/docs/secrets/kv/kv-v2/cookbook/destroy-data) -- [Write custom metadata](/vault/docs/secrets/kv/kv-v2/cookbook/custom-metadata) +- [Rotate root credentials](/vault/docs/secrets/ldap/cookbook/rotate-root-cred) @@ -62,48 +597,4 @@ Detailed tutorials: - - -
- ---- - -## October 7, 2025 ((#2025-10-07)) - -Version | Vault requirement -------- | ----------------- -0.17.0 | 1.21.x - -Feature upates: - -- [GH-211](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/211): - Add event notification support -- [GH-184](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/184) - Add RACF password phrase management for static roles -- [GH-170](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/170) - Add RACF passphrase support - - -## August 21, 2025 ((#2025-08-21)) - -Version | Vault requirement -------- | ----------------- -0.16.1 | 1.21.x - -Feature upates: - -- [GH-184](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/184): - Support RACF password phrase management for static roles -- Rotations actions log on success and failure - -## June 4, 2025 ((#2025-06-04)) - -Version | Vault requirement -------- | ----------------- -0.16.0 | 1.21.x - -Bug fixes: - -- [GH-156](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/156): - Fix issue where roles created before 0.14.5 had a `nil` `NextVaultRotation` value - + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/overview.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/overview.mdx deleted file mode 100644 index 32f9a8f4e8..0000000000 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/overview.mdx +++ /dev/null @@ -1,632 +0,0 @@ ---- -layout: docs -page_title: LDAP secrets engine -description: >- - Dynamically create and manage LDAP entry passwords with the LDAP secret engine - plugin. ---- - -# LDAP secrets engine overview - - -The LDAP secrets engine provides management of LDAP credentials as well as dynamic -creation of credentials. It supports integration with implementations of the LDAP -v3 protocol, including OpenLDAP, Active Directory, and IBM Resource Access Control -Facility (RACF). - -The LDAP secrets plugin has three primary features: - -- [Static Credentials](/vault/docs/secrets/ldap#static-credentials) -- [Dynamic Credentials](/vault/docs/secrets/ldap#dynamic-credentials) -- [Service Account Check-Out](/vault/docs/secrets/ldap#service-account-check-out) - - - -## Schemas - -The LDAP Secret Engine supports three different schemas: - -- `openldap` (default) -- `racf` -- `ad` - -### OpenLDAP - -By default, the LDAP Secret Engine assumes the entry password is stored in `userPassword`. -There are many object classes that provide `userPassword` including for example: - -- `organization` -- `organizationalUnit` -- `organizationalRole` -- `inetOrgPerson` -- `person` -- `posixAccount` - -### Resource access control facility (RACF) - -To manage credentials for an IBM Resource Access Control Facility (RACF), -configure the LDAP secrets engine with the `racf` schema to enable the -behaviors required for RACF compatibility. - -#### Password vs. password phrase credentials - -The LDAP plugin supports traditional 8-character passwords and modern, -longer password phrases through th -[`credential_type`](/vault/api-docs/secret/ldap#credential_type) parameter: - -- `password` (Default): Configure the plugin to generate and manage standard RACF passwords. -- `phrase`: Configure the plugin to generate and manage case-sensitive password phrases. - - -#### Configure password rules - -The RACF schema does not control the credential complexity rules directly. -To enforce site-specific complexity requirements, define and link a -standard Vault [password policy](/vault/docs/concepts/password-policies) -to your RACF schema. - - -#### Example configuration - -The following example configures the LDAP engine for RACF, sets it to manage -password phrases, and links a password policy to enforce length and -complexity. - -```shell-session -$ cat > /tmp/password_policy.hcl <<-EOF -length = 20 -rule "charset" { - charset = "abcdefghijklmnopqrstuvwxyz" - min-chars = 1 -} -EOF -$ vault write sys/policies/password/racf_password_policy policy=@/tmp/password_policy.hcl -$ vault write ldap/config \ - binddn="$USERNAME" \ - bindpass="$PASSWORD" \ - url="ldaps://138.91.247.105" \ - schema="racf" \ - credential_type="phrase" \ - password_policy="racf_password_policy" -``` - -### Active directory (AD) - -For managing Active Directory instances, the secret engine must be configured to use the -schema `ad`. - -```bash -$ vault write ldap/config \ - binddn=$USERNAME \ - bindpass=$PASSWORD \ - url=ldaps://138.91.247.105 \ - schema=ad -``` - -## Root credential rotation - -Mounts can rotate root credential keys configured directly within the mount. -Rotating to a Vault-generated key makes the key value inaccessible to the -operator and ensures only Vault can operate as a root user to manipulate dynamic -and static credentials. - -```shell-session -vault write -f ldap/rotate-root -``` - -### Schedule-based root credential rotation - -@include 'alerts/enterprise-only.mdx' - -Use the [`rotation_schedule`](/vault/api-docs/secret/ldap#rotation_schedule) field -to configure schedule-based, automatic credential rotation for root credentials in -the LDAP secrets engine. For example, the following command set the rotation to -occur every Saturday at midnight (00:00): - -```shell-session -$ vault write ldap/config \ - ... - rotation_schedule="0 * * * SAT" - ... -``` - -This configuration will set the role's credential rotation to occur on Saturday -at 00:00. - -Scheduled root credential rotation can also set a -[rotation_window](/vault/api-docs/secret/ldap#rotation_window) during which the -scheduled rotation is allowed to occur. Vault will stop trying to rotate the -credential once the window expires. For example, the following command tells -Vault to rotate the credential on Saturday at midnight, but only within the span -of an hour. If Vault cannot rotate the credential by 1:00, due to a failure -or otherwise, Vault will stop trying to rotate the credential until the next -scheduled rotation. - -```shell-session -$ vault write ldap/config \ - ... - rotation_window="1h" \ - rotation_schedule="0 * * * SAT" - ... -``` - -You can temporarily disable root rotation by setting -[`disable_automated_rotation`](/vault/api-docs/secret/ldap#disable_automated_rotation) -to `true`. Setting the `disable_automated_rotation` field prevent any rotation -of the root credential until the field is reset to `false`. If you use -`rotation_period`, setting `disable_automated_rotation` also resets the credential -TTL. - -For more details on rotating root credentials in the LDAP plugin, refer to the -[Root credential rotation](/vault/api-docs/secret/ldap#rotate-root) API docs. - -@include 'rotation-manager-logging.mdx' - -## Static credentials - -### Setup - -1. Configure a static role that maps a name in Vault to an entry in LDAP. - Password rotation settings will be managed by this role. - - ```shell-session - $ vault write ldap/static-role/hashicorp \ - dn='uid=hashicorp,ou=users,dc=hashicorp,dc=com' \ - username='hashicorp' \ - rotation_period="24h" - ``` - -2. Request credentials for the "hashicorp" role: - - ```shell-session - $ vault read ldap/static-cred/hashicorp - ``` - -### Password rotation - -Passwords can be managed in two ways: - -- automatic time based rotation -- manual rotation - -### TTL-based static role rotation - -Passwords will automatically be rotated based on the `rotation_period` configured -in the static role (minimum of 5 seconds). When requesting credentials for a static -role, the response will include the time before the next rotation (`ttl`). - -The `binddn` account used by Vault should be rotated using the `rotate-root` endpoint to generate a password -only Vault will know. - -As with the rotation manager, Vault logs rotations with reference to the -`name` of the role and `error` if the rotation failed. The logs also indicate -if the rotation was part of a `periodic function`. - -### Manual rotation - -Static roles can be manually rotated using the `rotate-role` endpoint. When manually -rotated the rotation period will start over. - -Logging for manual rotation records the same information as other rotation -logging with an additional reference that the rotation happened `on user request`. - -### Deleting static roles - -Passwords are not rotated upon deletion of a static role. The password should be manually -rotated prior to deleting the role or revoking access to the static role. - -## Dynamic credentials - -### Setup - -Dynamic credentials can be configured by calling the `/role/:role_name` endpoint: - -```bash -$ vault write ldap/role/dynamic-role \ - creation_ldif=@/path/to/creation.ldif \ - deletion_ldif=@/path/to/deletion.ldif \ - rollback_ldif=@/path/to/rollback.ldif \ - default_ttl=1h \ - max_ttl=24h -``` - --> Note: The `rollback_ldif` argument is optional, but recommended. The statements within `rollback_ldif` will be -executed if the creation fails for any reason. This ensures any entities are removed in the event of a failure. - -To generate credentials: - -```bash -$ vault read ldap/creds/dynamic-role -Key Value ---- ----- -lease_id ldap/creds/dynamic-role/HFgd6uKaDomVMvJpYbn9q4q5 -lease_duration 1h -lease_renewable true -distinguished_names [cn=v_token_dynamic-role_FfH2i1c4dO_1611952635,ou=users,dc=learn,dc=example] -password xWMjkIFMerYttEbzfnBVZvhRQGmhpAA0yeTya8fdmDB3LXDzGrjNEPV2bCPE9CW6 -username v_token_testrole_FfH2i1c4dO_1611952635 -``` - -The `distinguished_names` field is an array of DNs that are created from the `creation_ldif` statements. If more than -one LDIF entry is included, the DN from each statement will be included in this field. Each entry in this field -corresponds to a single LDIF statement. No de-duplication occurs and order is maintained. - -### LDIF entries - -User account management is provided through LDIF entries. The LDIF entries may be a base64-encoded version of the -LDIF string. The string will be parsed and validated to ensure that it adheres to LDIF syntax. A good reference -for proper LDIF syntax can be found [here](https://ldap.com/ldif-the-ldap-data-interchange-format/). - -Some important things to remember when crafting your LDIF entries: - -- There should not be any trailing spaces on any line, including empty lines -- Each `modify` block needs to be preceded with an empty line -- Multiple modifications for a `dn` can be defined in a single `modify` block. Each modification needs to close - with a single dash (`-`) - -### Active directory (AD) - - - - Windows Servers hosting Active Directory include a - `lifetime period of an old password` configuration setting that lets clients - authenticate with old passwords for a specified amount of time. - - For more information, refer to the - [NTLM network authentication behavior](https://learn.microsoft.com/en-us/troubleshoot/windows-server/windows-security new-setting-modifies-ntlm-network-authentication) - guide by Microsoft. - - - -For Active Directory, there are a few additional details that are important to remember: - -To create a user programmatically in AD, you first `add` a user object and then `modify` that user to provide a -password and enable the account. - -- Passwords in AD are set using the `unicodePwd` field. This must be proceeded by two (2) colons (`::`). -- When setting a password programmatically in AD, the following criteria must be met: - - - The password must be enclosed in double quotes (`" "`) - - The password must be in [`UTF16LE` format](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/6e803168-f140-4d23-b2d3-c3a8ab5917d2) - - The password must be `base64`-encoded - - Additional details can be found [here](https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/set-user-password-with-ldifde) - -- Once a user's password has been set, it can be enabled. AD uses the `userAccountControl` field for this purpose: - - To enable the account, set `userAccountControl` to `512` - - You will likely also want to disable AD's password expiration for this dynamic user account. The - `userAccountControl` value for this is: `65536` - - `userAccountControl` flags are cumulative, so to set both of the above two flags, add up the two values - (`512 + 65536 = 66048`): set `userAccountControl` to `66048` - - See [here](https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties#property-flag-descriptions) - for details on `userAccountControl` flags - -`sAMAccountName` is a common field when working with AD users. It is used to provide compatibility with legacy -Windows NT systems and has a limit of 20 characters. Keep this in mind when defining your `username_template`. -See [here](https://docs.microsoft.com/en-us/windows/win32/adschema/a-samaccountname) for additional details. - -Since the default `username_template` is longer than 20 characters which follows the template of `v_{{.DisplayName}}_{{.RoleName}}_{{random 10}}_{{unix_time}}`, we recommend customising the `username_template` on the role configuration to generate accounts with names less than 20 characters. Please refer to the [username templating document](/vault/docs/concepts/username-templating) for more information. - -With regard to adding dynamic users to groups, AD doesn't let you directly modify a user's `memberOf` attribute. -The `member` attribute of a group and `memberOf` attribute of a user are -[linked attributes](https://docs.microsoft.com/en-us/windows/win32/ad/linked-attributes). Linked attributes are -forward link/back link pairs, with the forward link able to be modified. In the case of AD group membership, the -group's `member` attribute is the forward link. In order to add a newly-created dynamic user to a group, we also -need to issue a `modify` request to the desired group and update the group membership with the new user. - -#### Active directory LDIF example - -The various `*_ldif` parameters are templates that use the [go template](https://golang.org/pkg/text/template/) -language. A complete LDIF example for creating an Active Directory user account is provided here for reference: - -```ldif -dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab -changetype: add -objectClass: top -objectClass: person -objectClass: organizationalPerson -objectClass: user -userPrincipalName: {{.Username}}@adtesting.lab -sAMAccountName: {{.Username}} - -dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab -changetype: modify -replace: unicodePwd -unicodePwd::{{ printf "%q" .Password | utf16le | base64 }} -- -replace: userAccountControl -userAccountControl: 66048 -- - -dn: CN=test-group,OU=HashiVault,DC=adtesting,DC=lab -changetype: modify -add: member -member: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab -- -``` - -## Service account Check-Out - -Service account check-out provides a library of service accounts that can be checked out -by a person or by machines. Vault will automatically rotate the password each time a -service account is checked in. Service accounts can be voluntarily checked in, or Vault -will check them in when their lending period (or, "ttl", in Vault's language) ends. - -The service account check-out functionality works with various [schemas](/vault/api-docs/secret/ldap#schema), -including OpenLDAP, Active Directory, and RACF. In the following usage example, the secrets -engine is configured to manage a library of service accounts in an Active Directory instance. - -First we'll need to enable the LDAP secrets engine and tell it how to securely connect -to an AD server. - -```shell-session -$ vault secrets enable ldap -Success! Enabled the ad secrets engine at: ldap/ - -$ vault write ldap/config \ - binddn=$USERNAME \ - bindpass=$PASSWORD \ - url=ldaps://138.91.247.105 \ - userdn='dc=example,dc=com' -``` - -Our next step is to designate a set of service accounts for check-out. - -```shell-session -$ vault write ldap/library/accounting-team \ - service_account_names=fizz@example.com,buzz@example.com \ - ttl=10h \ - max_ttl=20h \ - disable_check_in_enforcement=false -``` - -In this example, the service account names of `fizz@example.com` and `buzz@example.com` have -already been created on the remote AD server. They've been set aside solely for Vault to handle. -The `ttl` is how long each check-out will last before Vault checks in a service account, -rotating its password during check-in. The `max_ttl` is the maximum amount of time it can live -if it's renewed. These default to `24h`, and both use [duration format strings](/vault/docs/concepts/duration-format). -Also by default, a service account must be checked in by the same Vault entity or client token that -checked it out. However, if this behavior causes problems, set `disable_check_in_enforcement=true`. - -When a library of service accounts has been created, view their status at any time to see if they're -available or checked out. - -```shell-session -$ vault read ldap/library/accounting-team/status -Key Value ---- ----- -buzz@example.com map[available:true] -fizz@example.com map[available:true] -``` - -To check out any service account that's available, simply execute: - -```shell-session -$ vault write -f ldap/library/accounting-team/check-out -Key Value ---- ----- -lease_id ldap/library/accounting-team/check-out/EpuS8cX7uEsDzOwW9kkKOyGW -lease_duration 10h -lease_renewable true -password ?@09AZKh03hBORZPJcTDgLfntlHqxLy29tcQjPVThzuwWAx/Twx4a2ZcRQRqrZ1w -service_account_name fizz@example.com -``` - -If the default `ttl` for the check-out is higher than needed, set the check-out to last -for a shorter time by using: - -```shell-session -$ vault write ldap/library/accounting-team/check-out ttl=30m -Key Value ---- ----- -lease_id ldap/library/accounting-team/check-out/gMonJ2jB6kYs6d3Vw37WFDCY -lease_duration 30m -lease_renewable true -password ?@09AZerLLuJfEMbRqP+3yfQYDSq6laP48TCJRBJaJu/kDKLsq9WxL9szVAvL/E1 -service_account_name buzz@example.com -``` - -This can be a nice way to say, "Although I _can_ have a check-out for 24 hours, if I -haven't checked it in after 30 minutes, I forgot or I'm a dead instance, so you can just -check it back in." - -If no service accounts are available for check-out, Vault will return a 400 Bad Request. - -```shell-session -$ vault write -f ldap/library/accounting-team/check-out -Error writing data to ldap/library/accounting-team/check-out: Error making API request. - -URL: POST http://localhost:8200/v1/ldap/library/accounting-team/check-out -Code: 400. Errors: - -* No service accounts available for check-out. -``` - -To extend a check-out, renew its lease. - -```shell-session -$ vault lease renew ldap/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq -Key Value ---- ----- -lease_id ldap/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq -lease_duration 10h -lease_renewable true -``` - -Renewing a check-out means its current password will live longer, since passwords are rotated -anytime a password is _checked in_ either by a caller, or by Vault because the check-out `ttl` -ends. - -To check a service account back in for others to use, call: - -```shell-session -$ vault write -f ldap/library/accounting-team/check-in -Key Value ---- ----- -check_ins [fizz@example.com] -``` - -Most of the time this will just work, but if multiple service accounts are checked out by the same -caller, Vault will need to know which one(s) to check in. - -```shell-session -$ vault write ldap/library/accounting-team/check-in service_account_names=fizz@example.com -Key Value ---- ----- -check_ins [fizz@example.com] -``` - -To perform a check-in, Vault verifies that the caller _should_ be able to check in a given service account. -To do this, Vault looks for either the same [entity ID](/vault/tutorials/auth-methods/identity) -used to check out the service account, or the same client token. - -If a caller is unable to check in a service account, or simply doesn't try, -Vault will check it back in automatically when the `ttl` expires. However, if that is too long, -service accounts can be forcibly checked in by a highly privileged user through: - -```shell-session -$ vault write -f ldap/library/manage/accounting-team/check-in -Key Value ---- ----- -check_ins [fizz@example.com] -``` - -Or, alternatively, revoking the secret's lease has the same effect. - -```shell-session -$ vault lease revoke ldap/library/accounting-team/check-out/PvBVG0m7pEg2940Cb3Jw3KpJ -All revocation operations queued successfully! -``` - -## Password generation - -This engine previously allowed configuration of the length of the password that is generated -when rotating credentials. This mechanism was deprecated in Vault 1.5 in favor of -[password policies](/vault/docs/concepts/password-policies). This means the `length` field should -no longer be used. The following password policy can be used to mirror the same behavior -that the `length` field provides: - -```hcl -length= -rule "charset" { - charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -} -``` - -## LDAP password policy - -The LDAP secret engine does not hash or encrypt passwords prior to modifying -values in LDAP. This behavior can cause plaintext passwords to be stored in LDAP. - -To avoid having plaintext passwords stored, the LDAP server should be configured -with an LDAP password policy (ppolicy, not to be confused with a Vault password -policy). A ppolicy can enforce rules such as hashing plaintext passwords by default. - -The following is an example of an LDAP password policy to enforce hashing on the -data information tree (DIT) `dc=hashicorp,dc=com`: - -``` -dn: cn=module{0},cn=config -changetype: modify -add: olcModuleLoad -olcModuleLoad: ppolicy - -dn: olcOverlay={2}ppolicy,olcDatabase={1}mdb,cn=config -changetype: add -objectClass: olcPPolicyConfig -objectClass: olcOverlayConfig -olcOverlay: {2}ppolicy -olcPPolicyDefault: cn=default,ou=pwpolicies,dc=hashicorp,dc=com -olcPPolicyForwardUpdates: FALSE -olcPPolicyHashCleartext: TRUE -olcPPolicyUseLockout: TRUE -``` - -## Hierarchical paths - -The LDAP secrets engine lets you define role and set names that contain an -arbitrary number of forward slashes. Names with forward slashes define -hierarchical path structures. - -For example, you can configure two static roles with the names `org/secure` and `org/platform/dev`: - -```shell-session -$ vault write ldap/static-role/org/secure \ - username="user1" \ - rotation_period="1h" -Success! Data written to: ldap/static-role/org/secure - -$ vault write ldap/static-role/org/platform/dev \ - username="user2" \ - rotation_period="1h" -Success! Data written to: ldap/static-role/org/platform/dev -``` - -Names with hierarchical paths let you use the Vault API to query the available -roles at a specific path with arbitrary depth. Names that end with a forward -slash indicate that sub-paths reside under that path. - -For example, to list all direct children under the `org/` path: - -```shell-session -$ vault list ldap/static-role/org/ -Keys ----- -platform/ -secure -``` - -The `platform/` key also ends in a forward slash. To list the `platform` sub-keys: - -```shell-session -$ vault list ldap/static-role/org/platform -Keys ----- -dev -``` - -You can read and rotate credentials using the same role name and the respective -APIs. For example, - -```shell-session -$ vault read ldap/static-cred/org/platform/dev -Key Value ---- ----- -dn n/a -last_password a3sQ6OkmXKt2dtx22kAt36YLkkxLsg4RmhMZCLYCBCbvvv67ILROaOokdCaGPEAE -last_vault_rotation 2024-05-03T16:39:27.174164-05:00 -password ECf7ZoxfDxGuJEYZrzgzTffSIDI4tx5TojBR9wuEGp8bqUXbl4Kr9eAgPjmizcvg -rotation_period 5m -ttl 4m58s -username user2 -``` - -```shell-session -$ vault write -f ldap/rotate-role/org/platform/dev -``` - -Since [Vault policies](/vault/docs/concepts/policies) are also path-based, -hierarchical names also let you define policies that map 1-1 to LDAP secrets -engine roles and set paths. - -The following Vault API endpoints support hierarchical path handling: - -- [Static roles](/vault/api-docs/secret/ldap#static-roles) -- [Static role passwords](/vault/api-docs/secret/ldap#static-role-passwords) -- [Manually rotate static role password](/vault/api-docs/secret/ldap#manually-rotate-static-role-password) -- [Dynamic roles](/vault/api-docs/secret/ldap#dynamic-roles) -- [Dynamic role passwords](/vault/api-docs/secret/ldap#dynamic-role-passwords) -- [Library set management](/vault/api-docs/secret/ldap#library-set-management) -- [Library set status check](/vault/api-docs/secret/ldap#library-set-status-check) -- [Check-Out management](/vault/api-docs/secret/ldap#check-out-management) -- [Check-In management](/vault/api-docs/secret/ldap#check-in-management) - -## Tutorial - -Refer to the [LDAP Secrets Engine](/vault/tutorials/secrets-management/openldap) -tutorial to learn how to configure and use the LDAP secrets engine. - - -## API - -The LDAP secrets engine has a full HTTP API. Please see the [LDAP secrets engine API docs](/vault/api-docs/secret/ldap) -for more details. diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx index c7d8e8d4dc..6835700de6 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx @@ -90,6 +90,8 @@ $ curl \ +## Step 2: Create a configuration file + ## Step 2: Connect Vault and your LDAP server diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/updates.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/updates.mdx new file mode 100644 index 0000000000..36ff097575 --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/updates.mdx @@ -0,0 +1,27 @@ +--- +layout: docs +page_title: LDAP secrets engine release notes +description: >- + Release notes for the LDAP secrets engine plugin +--- + +# LDAP secrets engine updates + +Refer to the +[Github changelog](https://github.com/hashicorp/vault-plugin-secrets-openldap/blob/main/CHANGELOG.md) +for a full history of changes. + +## October 8, 2025 ((#2025-10-08)) + +Version | Vault requirement +------- | ----------------- +0.17.0 | 1.21.0+ + +Feature updates: + +- [GH-211](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/211): + Add event notification support +- [GH-183](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/183): + Log static and root rotations +- [GH-170](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/170): + Add RACF passphrase support diff --git a/content/vault/v1.21.x/data/docs-nav-data.json b/content/vault/v1.21.x/data/docs-nav-data.json index 86342cebcb..bff3419910 100644 --- a/content/vault/v1.21.x/data/docs-nav-data.json +++ b/content/vault/v1.21.x/data/docs-nav-data.json @@ -2317,16 +2317,29 @@ "path": "secrets/ldap" }, { - "title": "Status", + "title": "Overview", "path": "secrets/ldap/index2" }, { - "title": "Overview", - "path": "secrets/ldap/overview" + "title": "Recent updates", + "path": "secrets/ldap/updates" }, { "title": "Setup", "path": "secrets/ldap/setup" + }, + { + "title": "Cookbook", + "routes": [ + { + "title": "Rotate root credentials", + "path": "secrets/ldap/cookbook/rotate-root-creds" + }, + { + "title": "Create static roles", + "path": "secrets/ldap/cookbook/creatae-static-roles" + } + ] } ] }, From e9fc62045fec1d5838f73e3a6e6ad3974a3c0cfd Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Mon, 17 Nov 2025 13:48:09 -0800 Subject: [PATCH 04/18] machine is crashing again --- .../content/docs/secrets/ldap/setup.mdx | 175 +++++++++++++++--- .../configure-secrets-plugin copy.mdx | 13 ++ .../v1.21.x/img/gui/ldap/schema-selection.png | Bin 0 -> 39586 bytes 3 files changed, 164 insertions(+), 24 deletions(-) create mode 100644 content/vault/v1.21.x/content/partials/gui-instructions/configure-secrets-plugin copy.mdx create mode 100644 content/vault/v1.21.x/img/gui/ldap/schema-selection.png diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx index 6835700de6..3d85070fb7 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx @@ -18,7 +18,8 @@ Use `vault secrets enable` to enable an instance of the `ldap` plugin. configure plugins in Vault. - **Create an LDAP account for Vault**. We highly recommend creating a dedicated entry management account for Vault. - +- **Create a password policy**. To configure password rules for RACF, you must + have a Vault [password policy](/vault/docs/concepts/password-policies) defined. ## Step 1: Enable the plugin @@ -43,17 +44,6 @@ $ vault secrets enable -path devcreds ldap - - -@include 'gui-instructions/enable-secrets-plugin.mdx' - -- Select the "LDAP" plugin. - -- Enter a unique path for the plugin and provide the relevant configuration - data. - - - Make a `POST` call to @@ -87,26 +77,151 @@ $ curl \ + + +@include 'gui-instructions/enable-secrets-plugin.mdx' + +- Select the "LDAP" plugin. + +- Enter a unique path for the plugin and provide the relevant configuration + data. + + + ## Step 2: Create a configuration file +The LDAP secrets engine plugin supports the following LDAP schemas: -## Step 2: Connect Vault and your LDAP server +- OpenLDAP (**default**) +- Active Directory +- Resource access control facility (RACF) -Configure the bind the DN and password for your `ldap` plugin so that Vault can -communicate with your LDAP server to generate passwords. +For easier maintenance and reuse, create a JSON file with your preferred +configuration details. + + + + + +Use the schema enum `openldap` to create a basic configuration file called +`ldap.json`: + +```json +{ + "schema": "openldap", + "binddn": "", + "bindpass": "", + "url": "", + "credential_type": "" +} +``` + +For example: + + + +```json +{ + "schema": "openldap", + "binddn": "cn=admin,dc=abc,dc=com", + "bindpass": "iamabadpassword", + "url": "ldaps://138.91.247.105", + "credential_type": "password" +} +``` + + + + + + + +Use the schema enum `ad` to create a basic configuration file called +`ldap.json`: + +```json +{ + "schema": "ad", + "binddn": "", + "bindpass": "", + "url": "", + "credential_type": "" +} +``` + +For example: + + + +```json +{ + "schema": "ad", + "binddn": "cn=admin,dc=abc,dc=com", + "bindpass": "iamabadpassword", + "url": "ldaps://138.91.247.105", + "credential_type": "password" +} +``` + + + + + + + +Use the schema enum `racf` and the name of your password policy to create a +basic configuration file called `ldap.json`: + +```json +{ + "schema": "racf", + "binddn": "", + "bindpass": "", + "url": "", + "credential_type": "", + "password_policy": "" +} +``` + +For example: + + + +```json +{ + "schema": "racf", + "binddn": "cn=admin,dc=abc,dc=com", + "bindpass": "iamabadpassword", + "url": "ldaps://138.91.247.105", + "credential_type": "phrase", + "password_policy": "racf_password_policy" +} +``` + + + + + + + + +## Step 3: Connect Vault and your LDAP server + +Save the plugin configuration so that Vault can communicate with your LDAP +server to generate passwords. +Use `vault write` with the `{mount_path}/config` endpoint to apply your +configuration file: + ```shell-session -$ vault write dev/config \ - binddn= \ - bindpass= \ - url= +$ vault write /config @ldap.json ``` For example: @@ -114,10 +229,7 @@ For example: ```shell-session -$ vault write devcreds/config \ - binddn="cn=admin,dc=abc,dc=com" \ - bindpass="iamabadpassword" \ - url=ldaps://138.91.247.105 +$ vault write devcreds/config @ldap.json ``` @@ -130,11 +242,26 @@ TBD + + + +![Screenshot of the schema selection screen in the Vault GUI](/img/gui/schema-selection.png) + + +@include 'gui-instructions/configure-secrets-plugin.mdx' + +- Select your LDAP schema. +- Provide the required information according to your configuration file. +- Click *Save*. + + + + -## Step 3: Rotate the root password +## Step 4: Rotate the root password Once you connect Vault and your LDAP server, rotate the root password so only Vault knows the credentials. diff --git a/content/vault/v1.21.x/content/partials/gui-instructions/configure-secrets-plugin copy.mdx b/content/vault/v1.21.x/content/partials/gui-instructions/configure-secrets-plugin copy.mdx new file mode 100644 index 0000000000..1edee56d75 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/gui-instructions/configure-secrets-plugin copy.mdx @@ -0,0 +1,13 @@ +- If you just enabled a plugin, click "Configure ". Otherwise, open + the **Configure** page for the plugin: + + 1. Open the GUI for your Vault instance. + + 1. Log in under the namespace for the plugin or select the namespace from + the selector at the bottom of the left-hand menu and re-authenticate. + + 1. Select **Secrets Engines** from the left-hand menu. + + 1. Click the plugin mount you want to configure. + + 1. Click "Configure ". \ No newline at end of file diff --git a/content/vault/v1.21.x/img/gui/ldap/schema-selection.png b/content/vault/v1.21.x/img/gui/ldap/schema-selection.png new file mode 100644 index 0000000000000000000000000000000000000000..f3a1d76c34ffe0a40d4249191ffc1934c08a1411 GIT binary patch literal 39586 zcmd42cT|(z*ESd{k4jNcq@&UVDN2zVib|K>yHcbCh;&FOc0`(V0SQQN2~t82Q7NH^ z-U12IJ46UA1Sa_WzHi=H@2vN)Su>NhSlsuWeV?<>-uqm8pX;1N=fSE9S)3A|DEwMRDT3O^l~gyZ_Ycb=%@ey<*`?eo?oEeUwWxw z;R68BH=q8U!GH@L0f01V%_l0xfwpT?LBS@&s68T>@yCNKwemA`*AiW>y;MeNf49aPNR0T^FdZCqA*EyetBa^=XdRU0}QK`=u>3?CZr0d0yXlX|AHd;B~{8I-KiUQuZ#}p&oqN>y< zZztU#T$YTvo^7H(zoXGRN1A?&S= zfEPE6lh3Og~;9HrO={g+*X<*P2M$&9Gl z9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40 -0800 Subject: [PATCH 05/18] save --- content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx | 8 +++----- ...crets-plugin copy.mdx => configure-secrets-plugin.mdx} | 0 2 files changed, 3 insertions(+), 5 deletions(-) rename content/vault/v1.21.x/content/partials/gui-instructions/{configure-secrets-plugin copy.mdx => configure-secrets-plugin.mdx} (100%) diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx index 3d85070fb7..d967d7a723 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx @@ -208,10 +208,9 @@ For example: -## Step 3: Connect Vault and your LDAP server +## Step 3: Configure the LDAP plugin -Save the plugin configuration so that Vault can communicate with your LDAP -server to generate passwords. +Apply your configuration details so Vault can communicate with your LDAP server. @@ -252,7 +251,7 @@ TBD - Select your LDAP schema. - Provide the required information according to your configuration file. -- Click *Save*. +- Click **Save**. @@ -260,7 +259,6 @@ TBD - ## Step 4: Rotate the root password Once you connect Vault and your LDAP server, rotate the root password so only diff --git a/content/vault/v1.21.x/content/partials/gui-instructions/configure-secrets-plugin copy.mdx b/content/vault/v1.21.x/content/partials/gui-instructions/configure-secrets-plugin.mdx similarity index 100% rename from content/vault/v1.21.x/content/partials/gui-instructions/configure-secrets-plugin copy.mdx rename to content/vault/v1.21.x/content/partials/gui-instructions/configure-secrets-plugin.mdx From e18d19970059bb556bb4c8e51ca9635697a67b54 Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Tue, 18 Nov 2025 13:58:50 -0800 Subject: [PATCH 06/18] save --- .../ldap/cookbook/basic-racf-config.mdx | 74 ++---------------- .../content/docs/secrets/ldap/setup.mdx | 75 +------------------ .../partials/examples/ldap/ad-config.mdx | 24 ++++++ .../examples/ldap/openldap-config.mdx | 25 +++++++ .../partials/examples/ldap/racf-config.mdx | 26 +++++++ .../password-policies/default-password.mdx | 31 ++++++++ .../examples/password-policies/passphrase.mdx | 31 ++++++++ 7 files changed, 146 insertions(+), 140 deletions(-) create mode 100644 content/vault/v1.21.x/content/partials/examples/ldap/ad-config.mdx create mode 100644 content/vault/v1.21.x/content/partials/examples/ldap/openldap-config.mdx create mode 100644 content/vault/v1.21.x/content/partials/examples/ldap/racf-config.mdx create mode 100644 content/vault/v1.21.x/content/partials/examples/password-policies/default-password.mdx create mode 100644 content/vault/v1.21.x/content/partials/examples/password-policies/passphrase.mdx diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/basic-racf-config.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/basic-racf-config.mdx index 1adfd96844..465e9d45d4 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/basic-racf-config.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/basic-racf-config.mdx @@ -7,12 +7,8 @@ description: >- # Configure LDAP for Resource access control facility (RACF) -configures the LDAP -secrets engine plugin to: - -- Use the RACF schema (`racf`). -- Automatically manage password phrases. -- Refer to a Vault password policy to enforce password length and complexity. +A basic RACF configuration for LDAP automatically manages password phrases and +uses a Vault password policy to enforce password length and complexity. @@ -24,76 +20,18 @@ secrets engine plugin to: - - -1. Create a JSON file called `racf-config.json` with the basic configuration - settings: - -1. Use `vault write` with the `/config` path to configure the plugin: - - ```shell-session - $ vault write /config \ - binddn= \ - bindpass= \ - url= \ - schema="racf" \ - credential_type="phrase" \ - password_policy="" - ``` + - For example: - - - - ```shell-session - $ vault write devcreds/config \ - binddn="cn=admin,dc=abc,dc=com" \ - bindpass="iamabadpassword" \ - url=ldaps://138.91.247.105 \ - schema="racf" \ - credential_type="phrase" \ - password_policy="racf_password_policy" - ``` - - +@include '/examples/password-policies/passphrase.mdx' - - -1. Create a JSON file called `racf-config.json` with the basic configuration - settings: + - -Make a `POST` call to -[`/{mount_path}/config`](/vault/api-docs/secret/ldap#configuration-management) -to configure the plugin: - -```shell-session -$ curl \ - --request POST \ - --header "X-Vault-Token: ${VAULT_TOKEN}" \ - --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ - ${VAULT_ADDR}/v1/sys//config -``` - -For example: - - - -```shell-session -$ curl \ - --request POST \ - --header "X-Vault-Token: ${VAULT_TOKEN}" \ - --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ - ${VAULT_ADDR}/v1/sys/devcreds/rotate-root -``` - - +@include '/examples/ldap/racf-config.mdx' - diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx index d967d7a723..702a7e963d 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx @@ -109,31 +109,7 @@ configuration details. Use the schema enum `openldap` to create a basic configuration file called `ldap.json`: -```json -{ - "schema": "openldap", - "binddn": "", - "bindpass": "", - "url": "", - "credential_type": "" -} -``` - -For example: - - - -```json -{ - "schema": "openldap", - "binddn": "cn=admin,dc=abc,dc=com", - "bindpass": "iamabadpassword", - "url": "ldaps://138.91.247.105", - "credential_type": "password" -} -``` - - +@include '/examples/ldap/openldap-config.mdx' @@ -142,29 +118,8 @@ For example: Use the schema enum `ad` to create a basic configuration file called `ldap.json`: -```json -{ - "schema": "ad", - "binddn": "", - "bindpass": "", - "url": "", - "credential_type": "" -} -``` - -For example: - - +@include '/examples/ldap/ad-config.mdx' -```json -{ - "schema": "ad", - "binddn": "cn=admin,dc=abc,dc=com", - "bindpass": "iamabadpassword", - "url": "ldaps://138.91.247.105", - "credential_type": "password" -} -``` @@ -175,31 +130,7 @@ For example: Use the schema enum `racf` and the name of your password policy to create a basic configuration file called `ldap.json`: -```json -{ - "schema": "racf", - "binddn": "", - "bindpass": "", - "url": "", - "credential_type": "", - "password_policy": "" -} -``` - -For example: - - - -```json -{ - "schema": "racf", - "binddn": "cn=admin,dc=abc,dc=com", - "bindpass": "iamabadpassword", - "url": "ldaps://138.91.247.105", - "credential_type": "phrase", - "password_policy": "racf_password_policy" -} -``` +@include '/examples/ldap/racf-config.mdx' diff --git a/content/vault/v1.21.x/content/partials/examples/ldap/ad-config.mdx b/content/vault/v1.21.x/content/partials/examples/ldap/ad-config.mdx new file mode 100644 index 0000000000..edd8ccd72f --- /dev/null +++ b/content/vault/v1.21.x/content/partials/examples/ldap/ad-config.mdx @@ -0,0 +1,24 @@ +```json +{ + "schema": "ad", + "binddn": "", + "bindpass": "", + "url": "", + "credential_type": "" +} +``` + +For example: + + + +```json +{ + "schema": "ad", + "binddn": "cn=admin,dc=abc,dc=com", + "bindpass": "iamabadpassword", + "url": "ldaps://138.91.247.105", + "credential_type": "password" +} +``` + diff --git a/content/vault/v1.21.x/content/partials/examples/ldap/openldap-config.mdx b/content/vault/v1.21.x/content/partials/examples/ldap/openldap-config.mdx new file mode 100644 index 0000000000..c0da77e628 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/examples/ldap/openldap-config.mdx @@ -0,0 +1,25 @@ +```json +{ + "schema": "openldap", + "binddn": "", + "bindpass": "", + "url": "", + "credential_type": "" +} +``` + +For example: + + + +```json +{ + "schema": "openldap", + "binddn": "cn=admin,dc=abc,dc=com", + "bindpass": "iamabadpassword", + "url": "ldaps://138.91.247.105", + "credential_type": "password" +} +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/examples/ldap/racf-config.mdx b/content/vault/v1.21.x/content/partials/examples/ldap/racf-config.mdx new file mode 100644 index 0000000000..349473ebec --- /dev/null +++ b/content/vault/v1.21.x/content/partials/examples/ldap/racf-config.mdx @@ -0,0 +1,26 @@ +```json +{ + "schema": "racf", + "binddn": "", + "bindpass": "", + "url": "", + "credential_type": "", + "password_policy": "" +} +``` + +For example: + + + +```json +{ + "schema": "racf", + "binddn": "cn=admin,dc=abc,dc=com", + "bindpass": "iamabadpassword", + "url": "ldaps://138.91.247.105", + "credential_type": "phrase", + "password_policy": "racf_password_policy" +} +``` + diff --git a/content/vault/v1.21.x/content/partials/examples/password-policies/default-password.mdx b/content/vault/v1.21.x/content/partials/examples/password-policies/default-password.mdx new file mode 100644 index 0000000000..48caf69180 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/examples/password-policies/default-password.mdx @@ -0,0 +1,31 @@ +The following password policy requires password strings to have: + +- 20 characters. +- at least one lowercase character. +- at least one uppercase character. +- at least one number. +- at least two special characters. + +```hcl +length=20 + +rule "charset" { + charset = "abcdefghijklmnopqrstuvwxyz" + min-chars = 1 +} + +rule "charset" { + charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + min-chars = 1 +} + +rule "charset" { + charset = "0123456789" + min-chars = 1 +} + +rule "charset" { + charset = "!@#$%^&*" + min-chars = 2 +} +``` \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/examples/password-policies/passphrase.mdx b/content/vault/v1.21.x/content/partials/examples/password-policies/passphrase.mdx new file mode 100644 index 0000000000..2cd6aa958e --- /dev/null +++ b/content/vault/v1.21.x/content/partials/examples/password-policies/passphrase.mdx @@ -0,0 +1,31 @@ +The following password policy requires password strings to have: + +- 20 characters. +- at least 2 spaces (to encourage three-word phrases). +- at least one lowercase character. +- at least one uppercase character. +- any number of basic punctuation marks. + +```hcl +length=20 + +rule "charset" { + charset = " " + min-chars = 2 +} + +rule "charset" { + charset = "abcdefghijklmnopqrstuvwxyz" + min-chars = 1 +} + +rule "charset" { + charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + min-chars = 1 +} + +rule "charset" { + charset = "!.,?" + min-chars = 0 +} +``` \ No newline at end of file From feb1df343bd62870b68e4dd0ba540d1524bdb093 Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Thu, 20 Nov 2025 16:17:37 -0800 Subject: [PATCH 07/18] save progress --- .../ldap/cookbook/basic-racf-config.mdx | 37 -- .../ldap/cookbook/create-static-roles.mdx | 92 +--- .../ldap/cookbook/delete-static-roles.mdx | 61 +++ .../ldap/cookbook/disable-root-rotation.mdx | 71 +++ .../ldap/cookbook/rotate-root-creds.mdx | 53 +- .../ldap/cookbook/rotate-static-roles.mdx | 34 ++ .../ldap/cookbook/schedule-based-rotation.mdx | 76 +++ .../docs/secrets/ldap/dynamic-credentials.mdx | 130 +++++ .../ldap/examples/basic-racf-config.mdx | 39 ++ .../secrets/ldap/examples/hash-passwords.mdx | 65 +++ .../content/docs/secrets/ldap/ibm-racf.mdx | 316 ++++++++++++ .../content/docs/secrets/ldap/index2.mdx | 455 ++---------------- .../secrets/ldap/service-account-checkout.mdx | 159 ++++++ .../content/docs/secrets/ldap/setup.mdx | 87 +--- .../configure-secrets-plugin.mdx | 6 +- .../partials/ldap/apply-config/api.mdx | 27 ++ .../partials/ldap/apply-config/cli.mdx | 17 + .../partials/ldap/apply-config/gui.mdx | 5 + .../partials/ldap/create-static-role/api.mdx | 28 ++ .../partials/ldap/create-static-role/cli.mdx | 18 + .../partials/ldap/delete-static-role/api.mdx | 28 ++ .../partials/ldap/delete-static-role/cli.mdx | 18 + .../content/partials/ldap/enable/api.mdx | 28 ++ .../content/partials/ldap/enable/cli.mdx | 13 + .../content/partials/ldap/enable/gui.mdx | 5 + .../example-config/ad/basic.mdx} | 3 +- .../example-config/ad/disable-rotation.mdx | 25 + .../example-config/ad/period-rotation.mdx | 29 ++ .../example-config/ad/scheduled-rotation.mdx | 31 ++ .../example-config/openldap/basic.mdx} | 2 +- .../openldap/disable-rotation.mdx | 25 + .../openldap/period-rotation.mdx | 29 ++ .../openldap/scheduled-rotation.mdx | 31 ++ .../example-config/racf/basic.mdx} | 5 +- .../example-config/racf/disable-rotation.mdx | 25 + .../ldap/example-config/racf/ibm-setup.mdx | 27 ++ .../example-config/racf/period-rotation.mdx | 31 ++ .../racf/scheduled-rotation.mdx | 33 ++ .../ldap/example-config/static-role/basic.mdx | 23 + .../example-config/static-role/ibm-racf.mdx | 23 + .../example-config/static-role/minimal.mdx | 21 + .../partials/ldap/get-role-creds/api.mdx | 25 + .../partials/ldap/get-role-creds/cli.mdx | 17 + .../partials/ldap/rotate-creds/api.mdx | 25 + .../partials/ldap/rotate-creds/cli.mdx | 19 + .../content/partials/ldap/rotate-root/api.mdx | 25 + .../content/partials/ldap/rotate-root/cli.mdx | 17 + .../example-config}/default-password.mdx | 0 .../example-config/ibm-racf-passphrase.mdx | 32 ++ .../example-config/ibm-racf-password.mdx | 26 + .../example-config}/passphrase.mdx | 0 .../example-config/traditional-ldap.mdx | 10 + .../password-policies/read-policy/api.mdx | 25 + .../password-policies/read-policy/cli.mdx | 17 + .../password-policies/save-policy/api.mdx | 27 ++ .../password-policies/save-policy/cli.mdx | 19 + content/vault/v1.21.x/data/docs-nav-data.json | 47 +- 57 files changed, 1909 insertions(+), 653 deletions(-) delete mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/basic-racf-config.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/delete-static-roles.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/disable-root-rotation.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-static-roles.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/schedule-based-rotation.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/examples/basic-racf-config.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/examples/hash-passwords.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/service-account-checkout.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/apply-config/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/apply-config/cli.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/apply-config/gui.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/create-static-role/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/create-static-role/cli.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/delete-static-role/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/delete-static-role/cli.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/enable/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/enable/cli.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/enable/gui.mdx rename content/vault/v1.21.x/content/partials/{examples/ldap/ad-config.mdx => ldap/example-config/ad/basic.mdx} (89%) create mode 100644 content/vault/v1.21.x/content/partials/ldap/example-config/ad/disable-rotation.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/example-config/ad/period-rotation.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/example-config/ad/scheduled-rotation.mdx rename content/vault/v1.21.x/content/partials/{examples/ldap/openldap-config.mdx => ldap/example-config/openldap/basic.mdx} (92%) create mode 100644 content/vault/v1.21.x/content/partials/ldap/example-config/openldap/disable-rotation.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/example-config/openldap/period-rotation.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/example-config/openldap/scheduled-rotation.mdx rename content/vault/v1.21.x/content/partials/{examples/ldap/racf-config.mdx => ldap/example-config/racf/basic.mdx} (84%) create mode 100644 content/vault/v1.21.x/content/partials/ldap/example-config/racf/disable-rotation.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/example-config/racf/ibm-setup.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/example-config/racf/period-rotation.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/example-config/racf/scheduled-rotation.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/example-config/static-role/basic.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/example-config/static-role/ibm-racf.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/example-config/static-role/minimal.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/get-role-creds/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/get-role-creds/cli.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/rotate-creds/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/rotate-creds/cli.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/rotate-root/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/rotate-root/cli.mdx rename content/vault/v1.21.x/content/partials/{examples/password-policies => password-policies/example-config}/default-password.mdx (100%) create mode 100644 content/vault/v1.21.x/content/partials/password-policies/example-config/ibm-racf-passphrase.mdx create mode 100644 content/vault/v1.21.x/content/partials/password-policies/example-config/ibm-racf-password.mdx rename content/vault/v1.21.x/content/partials/{examples/password-policies => password-policies/example-config}/passphrase.mdx (100%) create mode 100644 content/vault/v1.21.x/content/partials/password-policies/example-config/traditional-ldap.mdx create mode 100644 content/vault/v1.21.x/content/partials/password-policies/read-policy/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/password-policies/read-policy/cli.mdx create mode 100644 content/vault/v1.21.x/content/partials/password-policies/save-policy/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/password-policies/save-policy/cli.mdx diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/basic-racf-config.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/basic-racf-config.mdx deleted file mode 100644 index 465e9d45d4..0000000000 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/basic-racf-config.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: docs -page_title: Configure LDAP for Resource access control facility (RACF) -description: >- - TBD ---- - -# Configure LDAP for Resource access control facility (RACF) - -A basic RACF configuration for LDAP automatically manages password phrases and -uses a Vault password policy to enforce password length and complexity. - - - -- You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). -- You have a Vault [password policy](/vault/docs/concepts/password-policies) - defined for your RACF schema. - - - - - - - -@include '/examples/password-policies/passphrase.mdx' - - - - - -@include '/examples/ldap/racf-config.mdx' - - - - - - diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/create-static-roles.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/create-static-roles.mdx index c02c18de18..1c7987a64f 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/create-static-roles.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/create-static-roles.mdx @@ -1,98 +1,58 @@ --- layout: docs -page_title: Create static roles +page_title: Create static LDAP roles description: >- - TBD + Map a named Vault role to an entry in your LDAP server. --- # Create static LDAP roles -TBD +Configure static roles to map names in Vault to LDAP entries and use the +rotation settings to manage credentials automatically with the role. - You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). -- TBD +- You have permission to update roles in Vault. +- You have permission to make `POST` calls to the `ldap` plugin. - +1. Create a configuration file, `ldap-role.json` with your role settings: + @include 'ldap/example-config/static-role/basic.mdx' +1. Save the new role. + --------------------------------------------------------------------------------- + -Setup : + @include 'ldap/create-static-role/cli.mdx' -1. Configure a static role that maps a name in Vault to an entry in LDAP. - Password rotation settings will be managed by this role. + - ```shell-session - $ vault write ldap/static-role/hashicorp \ - dn='uid=hashicorp,ou=users,dc=hashicorp,dc=com' \ - username='hashicorp' \ - rotation_period="24h" - ``` + -2. Request credentials for the "hashicorp" role: + @include 'ldap/create-static-role/api.mdx' - ```shell-session - $ vault read ldap/static-cred/hashicorp - ``` + + +1. Confirm the role settings by requesting credentials from the plugin: --------------------------------------------------------------------------------- + - + -Use `vault read` with the `/subkeys` path to retrieve a list of secret data -subkeys at the given path. + @include 'ldap/get-role-creds/cli.mdx' -```shell-session -$ vault write -f /rotate-root -``` + -For example: + - + @include 'ldap/get-role-creds/api.mdx' -```shell-session -$ vault write -f devcreds/rotate-root -``` + - - - - - - -Make a `POST` call to -[`/{mount_path}/rotate-root`](/vault/api-docs/secret/ldap#rotate-root-password) -to rotate the credential:: - -```shell-session -$ curl \ - --request POST \ - --header "X-Vault-Token: ${VAULT_TOKEN}" \ - --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ - ${VAULT_ADDR}/v1/sys//rotate-root -``` - -For example: - - - -```shell-session -$ curl \ - --request POST \ - --header "X-Vault-Token: ${VAULT_TOKEN}" \ - --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ - ${VAULT_ADDR}/v1/sys/devcreds/rotate-root -``` - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/delete-static-roles.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/delete-static-roles.mdx new file mode 100644 index 0000000000..2538b2f74c --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/delete-static-roles.mdx @@ -0,0 +1,61 @@ +--- +layout: docs +page_title: Delete static LDAP roles +description: >- + Delete a named Vault role currently mapped to an entry in your LDAP server. +--- + +# Delete static LDAP roles + +Vault does not rotate passwords when you delete a static role. We recommend +manually rotating the mapped credentials before deleting the role or revoking +access to the static role. + + + +- You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). +- You have permission to update roles in Vault. +- You have permission to make `POST` calls to the `ldap` plugin. + + + +1. Even for delete requests, the plugin expects all required parameters. You + can use the existing configuration file (if you created one) or create a + minimal version for the delete request. + + @include 'ldap/example-config/static-role/minimal.mdx' + +1. Update the role. + + + + + @include 'ldap/delete-static-role/cli.mdx' + + + + + + @include 'ldap/delete-static-role/api.mdx' + + + + + +1. Confirm the role deletion by requesting credentials from the plugin: + + + + + + @include 'ldap/get-role-creds/cli.mdx' + + + + + + @include 'ldap/get-role-creds/api.mdx' + + + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/disable-root-rotation.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/disable-root-rotation.mdx new file mode 100644 index 0000000000..ae22b15601 --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/disable-root-rotation.mdx @@ -0,0 +1,71 @@ +--- +layout: docs +page_title: Disable LDAP root credential rotation +description: >- + temporarily disable root credential rotation in the LDAP secrets plugin. +--- + +# Disable LDAP root credential rotation + +You can temporarily disable root rotation with the +[`disable_automated_rotation`](/vault/api-docs/secret/ldap#disable_automated_rotation) +paramter in your plugin configuration. + +If you use `rotation_period`, disabling rotation also resets the credential +TTL. + + + +- You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). +- You have permission to update the plugin configuration. + + + +1. Update your configuration to disable rotation: + + + + + + @include 'ldap/example-config/ad/disable-rotation.mdx' + + + + + + @include 'ldap/example-config/openldap/disable-rotation.mdx' + + + + + + @include 'ldap/example-config/racf/disable-rotation.mdx' + + + + + + +1. Apply the changes. + + + + + + @include 'ldap/apply-config/cli.mdx' + + + + + + @include 'ldap/apply-config/api.mdx' + + + + + + @include 'ldap/apply-config/gui.mdx' + + + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-root-creds.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-root-creds.mdx index 7c2b77ea4b..9d65c675af 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-root-creds.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-root-creds.mdx @@ -1,13 +1,13 @@ --- layout: docs -page_title: Rotate root LDAP credentials +page_title: Manually rotate root LDAP credentials description: >- - TBD + Manually rotate root credentials in the LDAP secrets plugin. --- -# Rotate root LDAP credentials +# Manually rotate root LDAP credentials -Mounts can rotate root credential keys configured directly within the mount. +You can rotate root credential keys configured directly within the plugin. Rotating to a Vault-generated key makes the key value inaccessible to the operator and ensures only Vault can operate as a root user to manipulate dynamic and static credentials. @@ -15,7 +15,7 @@ and static credentials. - You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). -- TBD +- You have permission to update LDAP credentials in Vault. @@ -23,52 +23,13 @@ and static credentials. -Use `vault read` with the `/subkeys` path to retrieve a list of secret data -subkeys at the given path. - -```shell-session -$ vault write -f /rotate-root -``` - -For example: - - - -```shell-session -$ vault write -f devcreds/rotate-root -``` - - +@include 'ldap/rotate-root/cli.mdx' -Make a `POST` call to -[`/{mount_path}/rotate-root`](/vault/api-docs/secret/ldap#rotate-root-password) -to rotate the credential:: - -```shell-session -$ curl \ - --request POST \ - --header "X-Vault-Token: ${VAULT_TOKEN}" \ - --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ - ${VAULT_ADDR}/v1/sys//rotate-root -``` - -For example: - - - -```shell-session -$ curl \ - --request POST \ - --header "X-Vault-Token: ${VAULT_TOKEN}" \ - --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ - ${VAULT_ADDR}/v1/sys/devcreds/rotate-root -``` - - +@include 'ldap/rotate-root/api.mdx' diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-static-roles.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-static-roles.mdx new file mode 100644 index 0000000000..10c5e5c0cf --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-static-roles.mdx @@ -0,0 +1,34 @@ +--- +layout: docs +page_title: Manually rotate static role credentials +description: >- + Manually rotate credentials for static roles using the LDAP secrets plugin. +--- + +# Manually rotate static role credentials + +The LDAP secrets plugin can rotate LDAP credential for static roles configured +the plugin. + + + +- You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). +- You have permission to update LDAP credentials in Vault. + + + + + + + +@include 'ldap/rotate-creds/cli.mdx' + + + + + +@include 'ldap/rotate-creds/api.mdx' + + + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/schedule-based-rotation.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/schedule-based-rotation.mdx new file mode 100644 index 0000000000..7bea1cb92b --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/schedule-based-rotation.mdx @@ -0,0 +1,76 @@ +--- +layout: docs +page_title: Rotate root LDAP credentials on a schedule +description: >- + Configure schedule-based, automatic credential rotation for root credentials + in the LDAP secrets plugin. +--- + +# Rotate root LDAP credentials on a schedule + +@include 'alerts/enterprise-only.mdx' + +You can set the `rotation_schedule` parameter with an optional rotation window +in your LDAP configuration to rotate root credentials on a fixed schedule. + +If you set the rotation window, Vault stops trying to rotate the credential once +the window expires. If Vault cannot rotate the credential within the defined +window (e.g., due to a network failure) it waits until the next scheduled +rotation to try again. + + + +- You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). +- You have permission to update the LDAP plugin configuration. + + + +1. You cannot set `rotation_period` and `rotation_schedule` for the same plugin. + If you previously set a rotation period, you must disable period rotation in + your configuration: + + + + + + @include 'ldap/example-config/ad/scheduled-rotation.mdx' + + + + + + @include 'ldap/example-config/openldap/scheduled-rotation.mdx' + + + + + + @include 'ldap/example-config/racf/scheduled-rotation.mdx' + + + + + +1. Apply the changes. + + + + + + @include 'ldap/apply-config/cli.mdx' + + + + + + @include 'ldap/apply-config/api.mdx' + + + + + + @include 'ldap/apply-config/gui.mdx' + + + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx new file mode 100644 index 0000000000..342ebe8232 --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx @@ -0,0 +1,130 @@ +## Dynamic credentials + +### Setup + +Dynamic credentials can be configured by calling the `/role/:role_name` endpoint: + +```bash +$ vault write ldap/role/dynamic-role \ + creation_ldif=@/path/to/creation.ldif \ + deletion_ldif=@/path/to/deletion.ldif \ + rollback_ldif=@/path/to/rollback.ldif \ + default_ttl=1h \ + max_ttl=24h +``` + +-> Note: The `rollback_ldif` argument is optional, but recommended. The statements within `rollback_ldif` will be +executed if the creation fails for any reason. This ensures any entities are removed in the event of a failure. + +To generate credentials: + +```bash +$ vault read ldap/creds/dynamic-role +Key Value +--- ----- +lease_id ldap/creds/dynamic-role/HFgd6uKaDomVMvJpYbn9q4q5 +lease_duration 1h +lease_renewable true +distinguished_names [cn=v_token_dynamic-role_FfH2i1c4dO_1611952635,ou=users,dc=learn,dc=example] +password xWMjkIFMerYttEbzfnBVZvhRQGmhpAA0yeTya8fdmDB3LXDzGrjNEPV2bCPE9CW6 +username v_token_testrole_FfH2i1c4dO_1611952635 +``` + +The `distinguished_names` field is an array of DNs that are created from the `creation_ldif` statements. If more than +one LDIF entry is included, the DN from each statement will be included in this field. Each entry in this field +corresponds to a single LDIF statement. No de-duplication occurs and order is maintained. + +### LDIF entries + +User account management is provided through LDIF entries. The LDIF entries may be a base64-encoded version of the +LDIF string. The string will be parsed and validated to ensure that it adheres to LDIF syntax. A good reference +for proper LDIF syntax can be found [here](https://ldap.com/ldif-the-ldap-data-interchange-format/). + +Some important things to remember when crafting your LDIF entries: + +- There should not be any trailing spaces on any line, including empty lines +- Each `modify` block needs to be preceded with an empty line +- Multiple modifications for a `dn` can be defined in a single `modify` block. Each modification needs to close + with a single dash (`-`) + +### Active directory (AD) + + + + Windows Servers hosting Active Directory include a + `lifetime period of an old password` configuration setting that lets clients + authenticate with old passwords for a specified amount of time. + + For more information, refer to the + [NTLM network authentication behavior](https://learn.microsoft.com/en-us/troubleshoot/windows-server/windows-security new-setting-modifies-ntlm-network-authentication) + guide by Microsoft. + + + +For Active Directory, there are a few additional details that are important to remember: + +To create a user programmatically in AD, you first `add` a user object and then `modify` that user to provide a +password and enable the account. + +- Passwords in AD are set using the `unicodePwd` field. This must be proceeded by two (2) colons (`::`). +- When setting a password programmatically in AD, the following criteria must be met: + + - The password must be enclosed in double quotes (`" "`) + - The password must be in [`UTF16LE` format](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/6e803168-f140-4d23-b2d3-c3a8ab5917d2) + - The password must be `base64`-encoded + - Additional details can be found [here](https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/set-user-password-with-ldifde) + +- Once a user's password has been set, it can be enabled. AD uses the `userAccountControl` field for this purpose: + - To enable the account, set `userAccountControl` to `512` + - You will likely also want to disable AD's password expiration for this dynamic user account. The + `userAccountControl` value for this is: `65536` + - `userAccountControl` flags are cumulative, so to set both of the above two flags, add up the two values + (`512 + 65536 = 66048`): set `userAccountControl` to `66048` + - See [here](https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties#property-flag-descriptions) + for details on `userAccountControl` flags + +`sAMAccountName` is a common field when working with AD users. It is used to provide compatibility with legacy +Windows NT systems and has a limit of 20 characters. Keep this in mind when defining your `username_template`. +See [here](https://docs.microsoft.com/en-us/windows/win32/adschema/a-samaccountname) for additional details. + +Since the default `username_template` is longer than 20 characters which follows the template of `v_{{.DisplayName}}_{{.RoleName}}_{{random 10}}_{{unix_time}}`, we recommend customising the `username_template` on the role configuration to generate accounts with names less than 20 characters. Please refer to the [username templating document](/vault/docs/concepts/username-templating) for more information. + +With regard to adding dynamic users to groups, AD doesn't let you directly modify a user's `memberOf` attribute. +The `member` attribute of a group and `memberOf` attribute of a user are +[linked attributes](https://docs.microsoft.com/en-us/windows/win32/ad/linked-attributes). Linked attributes are +forward link/back link pairs, with the forward link able to be modified. In the case of AD group membership, the +group's `member` attribute is the forward link. In order to add a newly-created dynamic user to a group, we also +need to issue a `modify` request to the desired group and update the group membership with the new user. + +#### Active directory LDIF example + +The various `*_ldif` parameters are templates that use the [go template](https://golang.org/pkg/text/template/) +language. A complete LDIF example for creating an Active Directory user account is provided here for reference: + +```ldif +dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab +changetype: add +objectClass: top +objectClass: person +objectClass: organizationalPerson +objectClass: user +userPrincipalName: {{.Username}}@adtesting.lab +sAMAccountName: {{.Username}} + +dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab +changetype: modify +replace: unicodePwd +unicodePwd::{{ printf "%q" .Password | utf16le | base64 }} +- +replace: userAccountControl +userAccountControl: 66048 +- + +dn: CN=test-group,OU=HashiVault,DC=adtesting,DC=lab +changetype: modify +add: member +member: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab +- +``` + + diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/examples/basic-racf-config.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/examples/basic-racf-config.mdx new file mode 100644 index 0000000000..b4c7379066 --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/examples/basic-racf-config.mdx @@ -0,0 +1,39 @@ +--- +layout: docs +page_title: Example LDAP config for RACF +description: >- + Basic RACF configuration for the LDAP secrets plugin +--- + +# Example LDAP configuration for RACF + +You can use the following Resource access control facility (RACF) configuration +for the LDAP secrets plugin and password policy configuration as a starting +point for connecting Vault with your RACF deployment to automatically manage +password phrases with Vault. + + + +- You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). +- You have permission to create Vault + [password policy](/vault/docs/concepts/password-policies) passwords. + + + + + + + +@include 'password-policies/example-config/passphrase.mdx' + + + + + +@include 'ldap/example-config/racf/basic.mdx' + + + + + + diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/examples/hash-passwords.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/examples/hash-passwords.mdx new file mode 100644 index 0000000000..cc65a26913 --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/examples/hash-passwords.mdx @@ -0,0 +1,65 @@ +--- +layout: docs +page_title: Hash LDAP passwords +description: >- + Hash LDAP passwords +--- + +# Hash LDAP passwords + +The LDAP secret engine does not hash or encrypt passwords before modifying +values in LDAP, which can lead to plaintext passwords on your LDAP server. + + + +- You have permission to update your LDAP server. +- You know the data information tree (DIT) assocaited with your `ldap` plugin. + + + +We recommend configuring your LDAP server with an LDAP password policy that +hashes passwords by default on the DIT used by your plugin: + + + +``` +dn: cn=module{0},cn=config +changetype: modify +add: olcModuleLoad +olcModuleLoad: ppolicy + +dn: olcOverlay={2}ppolicy,olcDatabase={1}mdb,cn=config +changetype: add +objectClass: olcPPolicyConfig +objectClass: olcOverlayConfig +olcOverlay: {2}ppolicy +olcPPolicyDefault: cn=default,ou=pwpolicies, +olcPPolicyForwardUpdates: FALSE +olcPPolicyHashCleartext: TRUE +olcPPolicyUseLockout: TRUE +``` + + + +For example, to hash data on the `dc=hashicorp,dc=com` DIT: + + + +``` +dn: cn=module{0},cn=config +changetype: modify +add: olcModuleLoad +olcModuleLoad: ppolicy + +dn: olcOverlay={2}ppolicy,olcDatabase={1}mdb,cn=config +changetype: add +objectClass: olcPPolicyConfig +objectClass: olcOverlayConfig +olcOverlay: {2}ppolicy +olcPPolicyDefault: cn=default,ou=pwpolicies,dc=hashicorp,dc=com +olcPPolicyForwardUpdates: FALSE +olcPPolicyHashCleartext: TRUE +olcPPolicyUseLockout: TRUE +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx new file mode 100644 index 0000000000..244cb8551a --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx @@ -0,0 +1,316 @@ +--- +layout: docs +page_title: Manage IBM RACF LDAP credentials +description: >- + Automatically manage Manage IBM RACF LDAP credentials with the LDAP secrets + plugin. + +--- + +# Manage IBM RACF LDAP credentials + +IBM RACF is a widely used mainframe security system for managing authentication and access control in enterprise environments. + +The LDAP secrets engine in HashiCorp Vault provides a secure and automated workflow for managing IBM RACF LDAP credentials. +It enables centralized storage and controlled access to credentials while offering automatic password rotation to enhance security and reduce operational overhead. + + +Password Policy in IBM RACF is defined as 1 - 8 characters length. +A password is a traditional one to eight character alphanumeric valu + +A RACF password phrase is a secure alternative to a traditional password in IBM's Resource Access Control Facility (RACF). +Unlike standard passwords, which are short and limited in complexity, a password phrase is a longer character string that may include +mixed-case letters, numbers, spaces, and special characters. +Due to its length and complexity, it provides stronger protection against unauthorized access and brute-force attacks. +When the new-password-phrase exit (ICHPWX11) is present and allows it, the password phrase can be 9 - 100 characters. +When ICHPWX11 is not present, the password phrase must be 14 - 100 characters. + +A password phrase is a character string that consists of mixed-case letters, numbers, and special characters including blanks. +Password phrases have security advantages over passwords as they are long enough to withstand most hacking attempts and are unlikely to be written down because they are easy to remember. +A user can be assigned a password, a password phrase, both, or neither. + +You can now define a more complex password policy by including special characters to enhance security and meet RACF compliance requirements + + +For more details refer to [RACF password-phrase policy](https://www.ibm.com/docs/en/zos/2.4.0?topic=syntax-password-phrase-specify-user-password-password-phrase) + + + + + +## Before you start + +- **Check your Vault permissions**. You must have permission to enable and + configure plugins in Vault. +- **Create a RACF-enabled LDAP user account for Vault**. You must have a + RACF-enabled LDAP user account with sufficient privileges to manage user + credentials. +- **Decide on a password policy**. We recommend using passphrases over passwords + for better security, but z/OS supports both. + + +## Step 1: Create a Vault password policy + +To securely manage z/OS LDAP credentials in Vault you must create a password +policy in Vault to control how the plugin rotates LDAP credentials. You can use +traditional passwords or a passphrase, but we strongly recommend using +passphrases. + + +1. Create a policy configuration file `racf-policy.hcl`. + + + + + + @include 'password-policies/example-config/ibm-racf-passphrase.mdx' + + + + + + @include 'password-policies/example-config/ibm-racf-password.mdx' + + + + + +1. Save the policy to Vault. + + + + + + @include 'password-policies/save-policy/cli.mdx' + + + + + + @include 'password-policies/save-policy/api.mdx' + + + + + +1. Verify the password policy saved correctly. + + + + + + @include 'password-policies/read-policy/cli.mdx' + + + + + + @include 'password-policies/read-policy/api.mdx' + + + + + + +## Step 2: Enable the LDAP secrets plugin + + + + + +@include 'ldap/enable/cli.mdx' + + + + + +@include 'ldap/enable/api.mdx' + + + + + +@include 'ldap/enable/gui.mdx' + + + + + + + +## Step 3: Create your plugin configuration file + +For easier maintenance and reuse, create a JSON file with your preferred +configuration details. Use the schema enum `racf` and the name of your Vault +password policy to create a basic configuration file called `ldap.json`: + + +@include 'ldap/example-config/racf/ibm-setup.mdx' + + +## Step 4: Configure the LDAP plugin + +Configure the LDAP plugin with your RACF-enabled LDAP user and connect Vault to +your IBM RACF LDAP server. + + + + + +@include 'ldap/apply-config/cli.mdx' + + + + + +@include 'ldap/apply-config/api.mdx' + + + + + +![Screenshot of the schema selection screen in the Vault GUI](/img/gui/ldap/schema-selection.png) + +@include 'ldap/apply-config/gui.mdx' + + + + + + + +## Step 5: Rotate the root password + +Once you connect Vault and your LDAP server, rotate the root password for the +`binddn` account so that only Vault knows the credential. + + + + + +@include 'ldap/rotate-root/cli.mdx' + + + + + +@include 'ldap/rotate-root/api.mdx' + + + + + + + +Once you rotate the root credential you cannot retrieve the newly generated +password. + + + + + +## Step 6: Create a static role + + +1. Create a configuration file, `ldap-role.json` with your role settings: + + @include 'ldap/example-config/static-role/ibm-racf.mdx' + +1. Save the new role. + + + + + @include 'ldap/create-static-role/cli.mdx' + + + + + + @include 'ldap/create-static-role/api.mdx' + + + + + +1. Confirm the role settings by requesting credentials from the plugin: + + + + + + @include 'ldap/get-role-creds/cli.mdx' + + + + + + @include 'ldap/get-role-creds/api.mdx' + + + + + + + +## Step 7: Test the static role + +Vault automatically rotates passwords based on the rotation period you set in +the static role configured. + +1. Fetch credentials for the static role. The response includes the time before + the next rotation (ttl) in addition to the current credential. + + + + + + @include 'ldap/get-role-creds/cli.mdx' + + + + + + @include 'ldap/get-role-creds/api.mdx' + + + + + + +1. Use the provided credential to SSH into your mainframe z/OS system: + + ```shell-session + $ ssh @ + ``` + + For example: + + + + ```shell-session + $ ssh vault@pksthc4.pok.stglabs.ibm.com + ``` + + + +## Additional resources + + + + + +- [Full LDAP plugin API reference](/vault/api-docs/secret/ldap) +- [Use dynamic credentials](/vault/docs/secrets/ldap/dynamic-credentials) +- [Let clients check out service accounts](/vault/docs/secrets/ldap/service-account-checkout) + + + + + +- [Passwords and password phrases overview](https://www.ibm.com/docs/en/zos/2.5.0?topic=users-passwords-password-phrases) +- [Resource access control facility overview](https://www.ibm.com/docs/en/zos-basic-skills?topic=zos-what-is-racf + + + + diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx index ee7cb375c4..82baed4a8d 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx @@ -19,12 +19,17 @@ Current version | Edition | Runtime | Code source ## Feature summary - Use OpenLDAP, RACF, and Active Directory schemas. -- Map static Vault roles to LDAP credentials. -- Manually rotate LDAP passwords. -- Automatically rotate LDAP passwords. -- Manage LDAP user accounts through LDIF. +- Use traditional 8-character passwords and modern, longer password phrases. +- Use dynamic LDAP credentials and manage LDAP user accounts through LDIF. - Check-out service accounts with automatic password rotation. +- Map static Vault roles to LDAP credentials. +- Manually rotate LDAP passwords and root credentials. +- Automatically rotate LDAP passwords for static credentials. + + +## Overview +@include 'rotation-manager-logging.mdx' ## Static credentials @@ -42,9 +47,6 @@ Passwords will automatically be rotated based on the `rotation_period` configure in the static role (minimum of 5 seconds). When requesting credentials for a static role, the response will include the time before the next rotation (`ttl`). -The `binddn` account used by Vault should be rotated using the `rotate-root` endpoint to generate a password -only Vault will know. - As with the rotation manager, Vault logs rotations with reference to the `name` of the role and `error` if the rotation failed. The logs also indicate if the rotation was part of a `periodic function`. @@ -56,12 +58,7 @@ rotated the rotation period will start over. Logging for manual rotation records the same information as other rotation logging with an additional reference that the rotation happened `on user request`. - -### Deleting static roles - -Passwords are not rotated upon deletion of a static role. The password should be manually -rotated prior to deleting the role or revoking access to the static role. - +\ --------------------------------------------------------------------------------- ### OpenLDAP @@ -78,407 +75,19 @@ There are many object classes that provide `userPassword` including for example: - `person` - `posixAccount` -### Password vs. password phrase credentials - -The LDAP plugin supports traditional 8-character passwords and modern, -longer password phrases through th -[`credential_type`](/vault/api-docs/secret/ldap#credential_type) parameter: - -- `password` (Default): Configure the plugin to generate and manage standard RACF passwords. -- `phrase`: Configure the plugin to generate and manage case-sensitive password phrases. - -### Active directory (AD) +## Root credential rotation -- `ad` - -For managing Active Directory instances, the secret engine must be configured to use the -schema `ad`. - -```bash -$ vault write ldap/config \ - binddn=$USERNAME \ - bindpass=$PASSWORD \ - url=ldaps://138.91.247.105 \ - schema=ad -``` +Mounts can rotate root credential keys configured directly within the mount. +Rotating to a Vault-generated key makes the key value inaccessible to the +operator and ensures only Vault can operate as a root user to manipulate dynamic +and static credentials. +- Schedule-based root credential rotation -### Schedule-based root credential rotation - -@include 'alerts/enterprise-only.mdx' - -Use the [`rotation_schedule`](/vault/api-docs/secret/ldap#rotation_schedule) field -to configure schedule-based, automatic credential rotation for root credentials in -the LDAP secrets engine. For example, the following command set the rotation to -occur every Saturday at midnight (00:00): - -```shell-session -$ vault write ldap/config \ - ... - rotation_schedule="0 * * * SAT" - ... -``` - -This configuration will set the role's credential rotation to occur on Saturday -at 00:00. - -Scheduled root credential rotation can also set a -[rotation_window](/vault/api-docs/secret/ldap#rotation_window) during which the -scheduled rotation is allowed to occur. Vault will stop trying to rotate the -credential once the window expires. For example, the following command tells -Vault to rotate the credential on Saturday at midnight, but only within the span -of an hour. If Vault cannot rotate the credential by 1:00, due to a failure -or otherwise, Vault will stop trying to rotate the credential until the next -scheduled rotation. - -```shell-session -$ vault write ldap/config \ - ... - rotation_window="1h" \ - rotation_schedule="0 * * * SAT" - ... -``` - -You can temporarily disable root rotation by setting -[`disable_automated_rotation`](/vault/api-docs/secret/ldap#disable_automated_rotation) -to `true`. Setting the `disable_automated_rotation` field prevent any rotation -of the root credential until the field is reset to `false`. If you use -`rotation_period`, setting `disable_automated_rotation` also resets the credential -TTL. - -For more details on rotating root credentials in the LDAP plugin, refer to the -[Root credential rotation](/vault/api-docs/secret/ldap#rotate-root) API docs. - -@include 'rotation-manager-logging.mdx' -## Dynamic credentials - -### Setup - -Dynamic credentials can be configured by calling the `/role/:role_name` endpoint: - -```bash -$ vault write ldap/role/dynamic-role \ - creation_ldif=@/path/to/creation.ldif \ - deletion_ldif=@/path/to/deletion.ldif \ - rollback_ldif=@/path/to/rollback.ldif \ - default_ttl=1h \ - max_ttl=24h -``` - --> Note: The `rollback_ldif` argument is optional, but recommended. The statements within `rollback_ldif` will be -executed if the creation fails for any reason. This ensures any entities are removed in the event of a failure. - -To generate credentials: - -```bash -$ vault read ldap/creds/dynamic-role -Key Value ---- ----- -lease_id ldap/creds/dynamic-role/HFgd6uKaDomVMvJpYbn9q4q5 -lease_duration 1h -lease_renewable true -distinguished_names [cn=v_token_dynamic-role_FfH2i1c4dO_1611952635,ou=users,dc=learn,dc=example] -password xWMjkIFMerYttEbzfnBVZvhRQGmhpAA0yeTya8fdmDB3LXDzGrjNEPV2bCPE9CW6 -username v_token_testrole_FfH2i1c4dO_1611952635 -``` - -The `distinguished_names` field is an array of DNs that are created from the `creation_ldif` statements. If more than -one LDIF entry is included, the DN from each statement will be included in this field. Each entry in this field -corresponds to a single LDIF statement. No de-duplication occurs and order is maintained. - -### LDIF entries - -User account management is provided through LDIF entries. The LDIF entries may be a base64-encoded version of the -LDIF string. The string will be parsed and validated to ensure that it adheres to LDIF syntax. A good reference -for proper LDIF syntax can be found [here](https://ldap.com/ldif-the-ldap-data-interchange-format/). - -Some important things to remember when crafting your LDIF entries: - -- There should not be any trailing spaces on any line, including empty lines -- Each `modify` block needs to be preceded with an empty line -- Multiple modifications for a `dn` can be defined in a single `modify` block. Each modification needs to close - with a single dash (`-`) - -### Active directory (AD) - - - - Windows Servers hosting Active Directory include a - `lifetime period of an old password` configuration setting that lets clients - authenticate with old passwords for a specified amount of time. - - For more information, refer to the - [NTLM network authentication behavior](https://learn.microsoft.com/en-us/troubleshoot/windows-server/windows-security new-setting-modifies-ntlm-network-authentication) - guide by Microsoft. - - - -For Active Directory, there are a few additional details that are important to remember: - -To create a user programmatically in AD, you first `add` a user object and then `modify` that user to provide a -password and enable the account. - -- Passwords in AD are set using the `unicodePwd` field. This must be proceeded by two (2) colons (`::`). -- When setting a password programmatically in AD, the following criteria must be met: - - - The password must be enclosed in double quotes (`" "`) - - The password must be in [`UTF16LE` format](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/6e803168-f140-4d23-b2d3-c3a8ab5917d2) - - The password must be `base64`-encoded - - Additional details can be found [here](https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/set-user-password-with-ldifde) - -- Once a user's password has been set, it can be enabled. AD uses the `userAccountControl` field for this purpose: - - To enable the account, set `userAccountControl` to `512` - - You will likely also want to disable AD's password expiration for this dynamic user account. The - `userAccountControl` value for this is: `65536` - - `userAccountControl` flags are cumulative, so to set both of the above two flags, add up the two values - (`512 + 65536 = 66048`): set `userAccountControl` to `66048` - - See [here](https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties#property-flag-descriptions) - for details on `userAccountControl` flags - -`sAMAccountName` is a common field when working with AD users. It is used to provide compatibility with legacy -Windows NT systems and has a limit of 20 characters. Keep this in mind when defining your `username_template`. -See [here](https://docs.microsoft.com/en-us/windows/win32/adschema/a-samaccountname) for additional details. - -Since the default `username_template` is longer than 20 characters which follows the template of `v_{{.DisplayName}}_{{.RoleName}}_{{random 10}}_{{unix_time}}`, we recommend customising the `username_template` on the role configuration to generate accounts with names less than 20 characters. Please refer to the [username templating document](/vault/docs/concepts/username-templating) for more information. - -With regard to adding dynamic users to groups, AD doesn't let you directly modify a user's `memberOf` attribute. -The `member` attribute of a group and `memberOf` attribute of a user are -[linked attributes](https://docs.microsoft.com/en-us/windows/win32/ad/linked-attributes). Linked attributes are -forward link/back link pairs, with the forward link able to be modified. In the case of AD group membership, the -group's `member` attribute is the forward link. In order to add a newly-created dynamic user to a group, we also -need to issue a `modify` request to the desired group and update the group membership with the new user. - -#### Active directory LDIF example - -The various `*_ldif` parameters are templates that use the [go template](https://golang.org/pkg/text/template/) -language. A complete LDIF example for creating an Active Directory user account is provided here for reference: - -```ldif -dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab -changetype: add -objectClass: top -objectClass: person -objectClass: organizationalPerson -objectClass: user -userPrincipalName: {{.Username}}@adtesting.lab -sAMAccountName: {{.Username}} - -dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab -changetype: modify -replace: unicodePwd -unicodePwd::{{ printf "%q" .Password | utf16le | base64 }} -- -replace: userAccountControl -userAccountControl: 66048 -- - -dn: CN=test-group,OU=HashiVault,DC=adtesting,DC=lab -changetype: modify -add: member -member: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab -- -``` - -## Service account Check-Out - -Service account check-out provides a library of service accounts that can be checked out -by a person or by machines. Vault will automatically rotate the password each time a -service account is checked in. Service accounts can be voluntarily checked in, or Vault -will check them in when their lending period (or, "ttl", in Vault's language) ends. - -The service account check-out functionality works with various [schemas](/vault/api-docs/secret/ldap#schema), -including OpenLDAP, Active Directory, and RACF. In the following usage example, the secrets -engine is configured to manage a library of service accounts in an Active Directory instance. - -First we'll need to enable the LDAP secrets engine and tell it how to securely connect -to an AD server. - -```shell-session -$ vault secrets enable ldap -Success! Enabled the ad secrets engine at: ldap/ - -$ vault write ldap/config \ - binddn=$USERNAME \ - bindpass=$PASSWORD \ - url=ldaps://138.91.247.105 \ - userdn='dc=example,dc=com' -``` - -Our next step is to designate a set of service accounts for check-out. - -```shell-session -$ vault write ldap/library/accounting-team \ - service_account_names=fizz@example.com,buzz@example.com \ - ttl=10h \ - max_ttl=20h \ - disable_check_in_enforcement=false -``` - -In this example, the service account names of `fizz@example.com` and `buzz@example.com` have -already been created on the remote AD server. They've been set aside solely for Vault to handle. -The `ttl` is how long each check-out will last before Vault checks in a service account, -rotating its password during check-in. The `max_ttl` is the maximum amount of time it can live -if it's renewed. These default to `24h`, and both use [duration format strings](/vault/docs/concepts/duration-format). -Also by default, a service account must be checked in by the same Vault entity or client token that -checked it out. However, if this behavior causes problems, set `disable_check_in_enforcement=true`. - -When a library of service accounts has been created, view their status at any time to see if they're -available or checked out. - -```shell-session -$ vault read ldap/library/accounting-team/status -Key Value ---- ----- -buzz@example.com map[available:true] -fizz@example.com map[available:true] -``` - -To check out any service account that's available, simply execute: - -```shell-session -$ vault write -f ldap/library/accounting-team/check-out -Key Value ---- ----- -lease_id ldap/library/accounting-team/check-out/EpuS8cX7uEsDzOwW9kkKOyGW -lease_duration 10h -lease_renewable true -password ?@09AZKh03hBORZPJcTDgLfntlHqxLy29tcQjPVThzuwWAx/Twx4a2ZcRQRqrZ1w -service_account_name fizz@example.com -``` - -If the default `ttl` for the check-out is higher than needed, set the check-out to last -for a shorter time by using: - -```shell-session -$ vault write ldap/library/accounting-team/check-out ttl=30m -Key Value ---- ----- -lease_id ldap/library/accounting-team/check-out/gMonJ2jB6kYs6d3Vw37WFDCY -lease_duration 30m -lease_renewable true -password ?@09AZerLLuJfEMbRqP+3yfQYDSq6laP48TCJRBJaJu/kDKLsq9WxL9szVAvL/E1 -service_account_name buzz@example.com -``` - -This can be a nice way to say, "Although I _can_ have a check-out for 24 hours, if I -haven't checked it in after 30 minutes, I forgot or I'm a dead instance, so you can just -check it back in." - -If no service accounts are available for check-out, Vault will return a 400 Bad Request. - -```shell-session -$ vault write -f ldap/library/accounting-team/check-out -Error writing data to ldap/library/accounting-team/check-out: Error making API request. - -URL: POST http://localhost:8200/v1/ldap/library/accounting-team/check-out -Code: 400. Errors: - -* No service accounts available for check-out. -``` - -To extend a check-out, renew its lease. - -```shell-session -$ vault lease renew ldap/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq -Key Value ---- ----- -lease_id ldap/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq -lease_duration 10h -lease_renewable true -``` - -Renewing a check-out means its current password will live longer, since passwords are rotated -anytime a password is _checked in_ either by a caller, or by Vault because the check-out `ttl` -ends. - -To check a service account back in for others to use, call: - -```shell-session -$ vault write -f ldap/library/accounting-team/check-in -Key Value ---- ----- -check_ins [fizz@example.com] -``` - -Most of the time this will just work, but if multiple service accounts are checked out by the same -caller, Vault will need to know which one(s) to check in. - -```shell-session -$ vault write ldap/library/accounting-team/check-in service_account_names=fizz@example.com -Key Value ---- ----- -check_ins [fizz@example.com] -``` - -To perform a check-in, Vault verifies that the caller _should_ be able to check in a given service account. -To do this, Vault looks for either the same [entity ID](/vault/tutorials/auth-methods/identity) -used to check out the service account, or the same client token. - -If a caller is unable to check in a service account, or simply doesn't try, -Vault will check it back in automatically when the `ttl` expires. However, if that is too long, -service accounts can be forcibly checked in by a highly privileged user through: - -```shell-session -$ vault write -f ldap/library/manage/accounting-team/check-in -Key Value ---- ----- -check_ins [fizz@example.com] -``` - -Or, alternatively, revoking the secret's lease has the same effect. - -```shell-session -$ vault lease revoke ldap/library/accounting-team/check-out/PvBVG0m7pEg2940Cb3Jw3KpJ -All revocation operations queued successfully! -``` - -## Password generation - -This engine previously allowed configuration of the length of the password that is generated -when rotating credentials. This mechanism was deprecated in Vault 1.5 in favor of -[password policies](/vault/docs/concepts/password-policies). This means the `length` field should -no longer be used. The following password policy can be used to mirror the same behavior -that the `length` field provides: - -```hcl -length= -rule "charset" { - charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -} -``` - -## LDAP password policy - -The LDAP secret engine does not hash or encrypt passwords prior to modifying -values in LDAP. This behavior can cause plaintext passwords to be stored in LDAP. - -To avoid having plaintext passwords stored, the LDAP server should be configured -with an LDAP password policy (ppolicy, not to be confused with a Vault password -policy). A ppolicy can enforce rules such as hashing plaintext passwords by default. - -The following is an example of an LDAP password policy to enforce hashing on the -data information tree (DIT) `dc=hashicorp,dc=com`: - -``` -dn: cn=module{0},cn=config -changetype: modify -add: olcModuleLoad -olcModuleLoad: ppolicy - -dn: olcOverlay={2}ppolicy,olcDatabase={1}mdb,cn=config -changetype: add -objectClass: olcPPolicyConfig -objectClass: olcOverlayConfig -olcOverlay: {2}ppolicy -olcPPolicyDefault: cn=default,ou=pwpolicies,dc=hashicorp,dc=com -olcPPolicyForwardUpdates: FALSE -olcPPolicyHashCleartext: TRUE -olcPPolicyUseLockout: TRUE -``` ## Hierarchical paths @@ -547,20 +156,9 @@ Since [Vault policies](/vault/docs/concepts/policies) are also path-based, hierarchical names also let you define policies that map 1-1 to LDAP secrets engine roles and set paths. -The following Vault API endpoints support hierarchical path handling: - -- [Static roles](/vault/api-docs/secret/ldap#static-roles) -- [Static role passwords](/vault/api-docs/secret/ldap#static-role-passwords) -- [Manually rotate static role password](/vault/api-docs/secret/ldap#manually-rotate-static-role-password) -- [Dynamic roles](/vault/api-docs/secret/ldap#dynamic-roles) -- [Dynamic role passwords](/vault/api-docs/secret/ldap#dynamic-role-passwords) -- [Library set management](/vault/api-docs/secret/ldap#library-set-management) -- [Library set status check](/vault/api-docs/secret/ldap#library-set-status-check) -- [Check-Out management](/vault/api-docs/secret/ldap#check-out-management) -- [Check-In management](/vault/api-docs/secret/ldap#check-in-management) - +--------------------------------------------------------------------------- @@ -569,17 +167,32 @@ The following Vault API endpoints support hierarchical path handling: Step-by-step instructions: - [Set up the `ldap` plugin](/vault/docs/secrets/ldap/setup) +- [Use dynamic credentials](/vault/docs/secrets/ldap/dynamic-credentials) +- [Check out service accounts](/vault/docs/secrets/ldap/service-account-checkout) -Basic examples: +Short explanations for common problems: -- [Rotate root credentials](/vault/docs/secrets/ldap/cookbook/rotate-root-cred) +- [Manually rotate root credentials](/vault/docs/secrets/ldap/cookbook/rotate-root-cred) +- [Schedule root credential rotation](/vault/docs/secrets/ldap/cookbook/schedule-based-rotation) +- [Disable root credential rotation](/vault/docs/secrets/ldap/cookbook/disable-root-rotation) +- [Create static roles](/vault/docs/secrets/ldap/cookbook/create-static-roles) + + +Configuration and code templates: + +- [Basic RACF configuration](/vault/docs/secrets/ldap/examples/basic-racf-config) +- [Hash policy for LDAP passwords](/vault/docs/secrets/ldap/examples/hash-passwords) + + + + Technical references: diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/service-account-checkout.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/service-account-checkout.mdx new file mode 100644 index 0000000000..d6893beeea --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/service-account-checkout.mdx @@ -0,0 +1,159 @@ +## Service account Check-Out + +Service account check-out provides a library of service accounts that can be checked out +by a person or by machines. Vault will automatically rotate the password each time a +service account is checked in. Service accounts can be voluntarily checked in, or Vault +will check them in when their lending period (or, "ttl", in Vault's language) ends. + +The service account check-out functionality works with various [schemas](/vault/api-docs/secret/ldap#schema), +including OpenLDAP, Active Directory, and RACF. In the following usage example, the secrets +engine is configured to manage a library of service accounts in an Active Directory instance. + +First we'll need to enable the LDAP secrets engine and tell it how to securely connect +to an AD server. + +```shell-session +$ vault secrets enable ldap +Success! Enabled the ad secrets engine at: ldap/ + +$ vault write ldap/config \ + binddn=$USERNAME \ + bindpass=$PASSWORD \ + url=ldaps://138.91.247.105 \ + userdn='dc=example,dc=com' +``` + +Our next step is to designate a set of service accounts for check-out. + +```shell-session +$ vault write ldap/library/accounting-team \ + service_account_names=fizz@example.com,buzz@example.com \ + ttl=10h \ + max_ttl=20h \ + disable_check_in_enforcement=false +``` + +In this example, the service account names of `fizz@example.com` and `buzz@example.com` have +already been created on the remote AD server. They've been set aside solely for Vault to handle. +The `ttl` is how long each check-out will last before Vault checks in a service account, +rotating its password during check-in. The `max_ttl` is the maximum amount of time it can live +if it's renewed. These default to `24h`, and both use [duration format strings](/vault/docs/concepts/duration-format). +Also by default, a service account must be checked in by the same Vault entity or client token that +checked it out. However, if this behavior causes problems, set `disable_check_in_enforcement=true`. + +When a library of service accounts has been created, view their status at any time to see if they're +available or checked out. + +```shell-session +$ vault read ldap/library/accounting-team/status +Key Value +--- ----- +buzz@example.com map[available:true] +fizz@example.com map[available:true] +``` + +To check out any service account that's available, simply execute: + +```shell-session +$ vault write -f ldap/library/accounting-team/check-out +Key Value +--- ----- +lease_id ldap/library/accounting-team/check-out/EpuS8cX7uEsDzOwW9kkKOyGW +lease_duration 10h +lease_renewable true +password ?@09AZKh03hBORZPJcTDgLfntlHqxLy29tcQjPVThzuwWAx/Twx4a2ZcRQRqrZ1w +service_account_name fizz@example.com +``` + +If the default `ttl` for the check-out is higher than needed, set the check-out to last +for a shorter time by using: + +```shell-session +$ vault write ldap/library/accounting-team/check-out ttl=30m +Key Value +--- ----- +lease_id ldap/library/accounting-team/check-out/gMonJ2jB6kYs6d3Vw37WFDCY +lease_duration 30m +lease_renewable true +password ?@09AZerLLuJfEMbRqP+3yfQYDSq6laP48TCJRBJaJu/kDKLsq9WxL9szVAvL/E1 +service_account_name buzz@example.com +``` + +This can be a nice way to say, "Although I _can_ have a check-out for 24 hours, if I +haven't checked it in after 30 minutes, I forgot or I'm a dead instance, so you can just +check it back in." + +If no service accounts are available for check-out, Vault will return a 400 Bad Request. + +```shell-session +$ vault write -f ldap/library/accounting-team/check-out +Error writing data to ldap/library/accounting-team/check-out: Error making API request. + +URL: POST http://localhost:8200/v1/ldap/library/accounting-team/check-out +Code: 400. Errors: + +* No service accounts available for check-out. +``` + +To extend a check-out, renew its lease. + +```shell-session +$ vault lease renew ldap/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq +Key Value +--- ----- +lease_id ldap/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq +lease_duration 10h +lease_renewable true +``` + +Renewing a check-out means its current password will live longer, since passwords are rotated +anytime a password is _checked in_ either by a caller, or by Vault because the check-out `ttl` +ends. + +To check a service account back in for others to use, call: + +```shell-session +$ vault write -f ldap/library/accounting-team/check-in +Key Value +--- ----- +check_ins [fizz@example.com] +``` + +Most of the time this will just work, but if multiple service accounts are checked out by the same +caller, Vault will need to know which one(s) to check in. + +```shell-session +$ vault write ldap/library/accounting-team/check-in service_account_names=fizz@example.com +Key Value +--- ----- +check_ins [fizz@example.com] +``` + +To perform a check-in, Vault verifies that the caller _should_ be able to check in a given service account. +To do this, Vault looks for either the same [entity ID](/vault/tutorials/auth-methods/identity) +used to check out the service account, or the same client token. + +If a caller is unable to check in a service account, or simply doesn't try, +Vault will check it back in automatically when the `ttl` expires. However, if that is too long, +service accounts can be forcibly checked in by a highly privileged user through: + +```shell-session +$ vault write -f ldap/library/manage/accounting-team/check-in +Key Value +--- ----- +check_ins [fizz@example.com] +``` + +Or, alternatively, revoking the secret's lease has the same effect. + +```shell-session +$ vault lease revoke ldap/library/accounting-team/check-out/PvBVG0m7pEg2940Cb3Jw3KpJ +All revocation operations queued successfully! +``` + + + +- [Library set management](/vault/api-docs/secret/ldap#library-set-management) +- [Library set status check](/vault/api-docs/secret/ldap#library-set-status-check) +- [Check-Out management](/vault/api-docs/secret/ldap#check-out-management) +- [Check-In management](/vault/api-docs/secret/ldap#check-in-management) \ No newline at end of file diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx index 702a7e963d..0e8456c6cd 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx @@ -22,7 +22,7 @@ Use `vault secrets enable` to enable an instance of the `ldap` plugin. have a Vault [password policy](/vault/docs/concepts/password-policies) defined. -## Step 1: Enable the plugin +## Step 1: Enable the LDAP secrets plugin @@ -60,7 +60,7 @@ $ curl \ For example: - + ```shell-session $ curl \ @@ -68,7 +68,7 @@ $ curl \ --header "X-Vault-Token: ${VAULT_TOKEN}" \ --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ --data '{"type": "ldap"}' \ - ${VAULT_ADDR}/v1/sys/mounts/devcreds | jq + ${VAULT_ADDR}/v1/sys/mounts/devcreds ``` @@ -83,8 +83,7 @@ $ curl \ - Select the "LDAP" plugin. -- Enter a unique path for the plugin and provide the relevant configuration - data. +- Enter a unique path for the plugin and set your basic plugin settings. @@ -109,7 +108,7 @@ configuration details. Use the schema enum `openldap` to create a basic configuration file called `ldap.json`: -@include '/examples/ldap/openldap-config.mdx' +@include 'ldap/example-config/openldap/basic.mdx' @@ -118,11 +117,9 @@ Use the schema enum `openldap` to create a basic configuration file called Use the schema enum `ad` to create a basic configuration file called `ldap.json`: -@include '/examples/ldap/ad-config.mdx' +@include 'ldap/example-config/ad/basic.mdx' - - @@ -130,9 +127,7 @@ Use the schema enum `ad` to create a basic configuration file called Use the schema enum `racf` and the name of your password policy to create a basic configuration file called `ldap.json`: -@include '/examples/ldap/racf-config.mdx' - - +@include 'ldap/example-config/racf/basic.mdx' @@ -147,35 +142,19 @@ Apply your configuration details so Vault can communicate with your LDAP server. -Use `vault write` with the `{mount_path}/config` endpoint to apply your -configuration file: - -```shell-session -$ vault write /config @ldap.json -``` - -For example: - - - -```shell-session -$ vault write devcreds/config @ldap.json -``` - - +@include 'ldap/apply-config/cli.mdx' -TBD +@include 'ldap/apply-config/api.mdx' - -![Screenshot of the schema selection screen in the Vault GUI](/img/gui/schema-selection.png) +![Screenshot of the schema selection screen in the Vault GUI](/img/gui/ldap/schema-selection.png) @include 'gui-instructions/configure-secrets-plugin.mdx' @@ -192,58 +171,20 @@ TBD ## Step 4: Rotate the root password -Once you connect Vault and your LDAP server, rotate the root password so only -Vault knows the credentials. +Once you connect Vault and your LDAP server, rotate the root password for the +`binddn` account so that only Vault knows the credentials. -Use `vault write` with the `rotate-root` endpoint to rotate the credential: - -```shell-session -$ vault write -f /rotate-root -``` - -For example: - - - -```shell-session -$ vault write -f devcreds/rotate-root -``` - - +@include 'ldap/rotate-root/cli.mdx' -Make a `POST` call to -[`/{mount_path}/rotate-root`](/vault/api-docs/secret/ldap#rotate-root-password) -to rotate the credential:: - -```shell-session -$ curl \ - --request POST \ - --header "X-Vault-Token: ${VAULT_TOKEN}" \ - --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ - ${VAULT_ADDR}/v1/sys//rotate-root -``` - -For example: - - - -```shell-session -$ curl \ - --request POST \ - --header "X-Vault-Token: ${VAULT_TOKEN}" \ - --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ - ${VAULT_ADDR}/v1/sys/devcreds/rotate-root -``` - - +@include 'ldap/rotate-root/api.mdx' diff --git a/content/vault/v1.21.x/content/partials/gui-instructions/configure-secrets-plugin.mdx b/content/vault/v1.21.x/content/partials/gui-instructions/configure-secrets-plugin.mdx index 1edee56d75..fc7b5e5659 100644 --- a/content/vault/v1.21.x/content/partials/gui-instructions/configure-secrets-plugin.mdx +++ b/content/vault/v1.21.x/content/partials/gui-instructions/configure-secrets-plugin.mdx @@ -1,5 +1,5 @@ -- If you just enabled a plugin, click "Configure ". Otherwise, open - the **Configure** page for the plugin: +- If you have the plugin landing page open, click **Configure {plugin_type} >**. + Otherwise: 1. Open the GUI for your Vault instance. @@ -10,4 +10,4 @@ 1. Click the plugin mount you want to configure. - 1. Click "Configure ". \ No newline at end of file + 1. Click **Configure {plugin_type} >**. \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/apply-config/api.mdx b/content/vault/v1.21.x/content/partials/ldap/apply-config/api.mdx new file mode 100644 index 0000000000..7fa9817c25 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/apply-config/api.mdx @@ -0,0 +1,27 @@ +Make a `POST` call to +[`/{mount_path}/config`](/vault/api-docs/secret/ldap#configuration-management) +to apply your configuration file, `ldap-config.json`: + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data @ldap.json \ + ${VAULT_ADDR}/v1//config +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data @ldap.json \ + ${VAULT_ADDR}/v1/devcreds/config +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/apply-config/cli.mdx b/content/vault/v1.21.x/content/partials/ldap/apply-config/cli.mdx new file mode 100644 index 0000000000..3dec29b59b --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/apply-config/cli.mdx @@ -0,0 +1,17 @@ +Use `vault write` with the +[`{mount_path}/config`](/vault/api-docs/secret/ldap#configuration-management) +path to apply your `ldap.json` configuration file: + +```shell-session +$ vault write /config @ldap.json +``` + +For example: + + + +```shell-session +$ vault write devcreds/config @ldap.json +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/apply-config/gui.mdx b/content/vault/v1.21.x/content/partials/ldap/apply-config/gui.mdx new file mode 100644 index 0000000000..a1d6090995 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/apply-config/gui.mdx @@ -0,0 +1,5 @@ +@include 'gui-instructions/configure-secrets-plugin.mdx' + +- Select your LDAP schema. +- Update the rotation details according to your configuration file. +- Click **Save**. \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/create-static-role/api.mdx b/content/vault/v1.21.x/content/partials/ldap/create-static-role/api.mdx new file mode 100644 index 0000000000..1dd3e428b9 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/create-static-role/api.mdx @@ -0,0 +1,28 @@ +Make a `POST` call to +[`/{mount_path}/static-role`](/vault/api-docs/secret/ldap#static-roles) +with your static role configuration, `ldap-role.json`, to create a new static +role: + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data @ldap-role.json \ + ${VAULT_ADDR}/v1//static-role +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data @ldap-role.json \ + ${VAULT_ADDR}/v1/devcreds/static-role +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/create-static-role/cli.mdx b/content/vault/v1.21.x/content/partials/ldap/create-static-role/cli.mdx new file mode 100644 index 0000000000..4561c5b150 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/create-static-role/cli.mdx @@ -0,0 +1,18 @@ +Use `vault write` with the +[`/{mount_path}/static-role`](/vault/api-docs/secret/ldap#static-roles) +path and your static role configuration, `ldap-role.json`, to create a new +static role: + +```shell-session +$ vault write /static-role @ldap-role.json +``` + +For example: + + + +```shell-session +$ vault write devcreds/static-role @ldap-role.json +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/delete-static-role/api.mdx b/content/vault/v1.21.x/content/partials/ldap/delete-static-role/api.mdx new file mode 100644 index 0000000000..c2f181938d --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/delete-static-role/api.mdx @@ -0,0 +1,28 @@ +Make a `DELETE` call to +[`/{mount_path}/static-role`](/vault/api-docs/secret/ldap#static-roles) +with your static role configuration, `ldap-role.json`, to delete the static +role: + +```shell-session +$ curl \ + --request DELETE \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data @ldap-role.json \ + ${VAULT_ADDR}/v1//static-role +``` + +For example: + + + +```shell-session +$ curl \ + --request DELETE \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data @ldap-role.json \ + ${VAULT_ADDR}/v1/devcreds/static-role +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/delete-static-role/cli.mdx b/content/vault/v1.21.x/content/partials/ldap/delete-static-role/cli.mdx new file mode 100644 index 0000000000..4561c5b150 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/delete-static-role/cli.mdx @@ -0,0 +1,18 @@ +Use `vault write` with the +[`/{mount_path}/static-role`](/vault/api-docs/secret/ldap#static-roles) +path and your static role configuration, `ldap-role.json`, to create a new +static role: + +```shell-session +$ vault write /static-role @ldap-role.json +``` + +For example: + + + +```shell-session +$ vault write devcreds/static-role @ldap-role.json +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/enable/api.mdx b/content/vault/v1.21.x/content/partials/ldap/enable/api.mdx new file mode 100644 index 0000000000..267935dee7 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/enable/api.mdx @@ -0,0 +1,28 @@ +Make a `POST` call to +[`/sys/mounts/{mount_path}`](/vault/api-docs/system/mounts#enable-secrets-engine): + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data '{"type": "ldap"}' \ + ${VAULT_ADDR}/v1/sys/mounts/ +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data '{"type": "ldap"}' \ + ${VAULT_ADDR}/v1/sys/mounts/devcreds +``` + + + +`/sys/mounts/{mount_path}` does not return data on success. \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/enable/cli.mdx b/content/vault/v1.21.x/content/partials/ldap/enable/cli.mdx new file mode 100644 index 0000000000..a635f421b1 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/enable/cli.mdx @@ -0,0 +1,13 @@ +Use `vault secrets enable` to establish a new instance of the `ldap` plugin. By +default, Vault uses the plugin name as the mount path. To configure a custom +mount path, use the `-path` flag: + +```shell-session +$ vault secrets enable -path ldap +``` + +For example: + +```shell-session +$ vault secrets enable -path devcreds ldap +``` \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/enable/gui.mdx b/content/vault/v1.21.x/content/partials/ldap/enable/gui.mdx new file mode 100644 index 0000000000..203ecb3d78 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/enable/gui.mdx @@ -0,0 +1,5 @@ +@include 'gui-instructions/enable-secrets-plugin.mdx' + +- Select the "LDAP" plugin. + +- Enter a unique path for the plugin and set your basic plugin settings. \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/examples/ldap/ad-config.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/ad/basic.mdx similarity index 89% rename from content/vault/v1.21.x/content/partials/examples/ldap/ad-config.mdx rename to content/vault/v1.21.x/content/partials/ldap/example-config/ad/basic.mdx index edd8ccd72f..0be735c4ca 100644 --- a/content/vault/v1.21.x/content/partials/examples/ldap/ad-config.mdx +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/ad/basic.mdx @@ -10,7 +10,7 @@ For example: - + ```json { @@ -22,3 +22,4 @@ For example: } ``` + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/example-config/ad/disable-rotation.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/ad/disable-rotation.mdx new file mode 100644 index 0000000000..daf367a02e --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/ad/disable-rotation.mdx @@ -0,0 +1,25 @@ +```json +{ + "schema": "ad", + "binddn": "", + "bindpass": "", + "url": "", + "disable_automated_rotation": "true" +} +``` + +For example: + + + +```json +{ + "schema": "ad", + "binddn": "cn=admin,dc=abc,dc=com", + "bindpass": "iamabadpassword", + "url": "ldaps://138.91.247.105", + "disable_automated_rotation": "true" +} +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/example-config/ad/period-rotation.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/ad/period-rotation.mdx new file mode 100644 index 0000000000..05c2cef77d --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/ad/period-rotation.mdx @@ -0,0 +1,29 @@ +```json +{ + "schema": "ad", + "binddn": "", + "bindpass": "", + "url": "", + "credential_type": "", + "rotation_schedule": "", + "rotation_period": "" +} +``` + +For example: + + + +```json +{ + "schema": "ad", + "binddn": "cn=admin,dc=abc,dc=com", + "bindpass": "iamabadpassword", + "url": "ldaps://138.91.247.105", + "credential_type": "password", + "rotation_schedule": "", + "rotation_period": "24h" +} +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/example-config/ad/scheduled-rotation.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/ad/scheduled-rotation.mdx new file mode 100644 index 0000000000..078aff5270 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/ad/scheduled-rotation.mdx @@ -0,0 +1,31 @@ +```json +{ + "schema": "ad", + "binddn": "", + "bindpass": "", + "url": "", + "credential_type": "", + "rotation_schedule": "", + "rotation_window": "", + "rotation_period": "0" +} +``` + +For example: + + + +```json +{ + "schema": "ad", + "binddn": "cn=admin,dc=abc,dc=com", + "bindpass": "iamabadpassword", + "url": "ldaps://138.91.247.105", + "credential_type": "password", + "rotation_schedule": "0 0 * * SAT", + "rotation_window": "1hr", + "rotation_period": "0" +} +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/examples/ldap/openldap-config.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/openldap/basic.mdx similarity index 92% rename from content/vault/v1.21.x/content/partials/examples/ldap/openldap-config.mdx rename to content/vault/v1.21.x/content/partials/ldap/example-config/openldap/basic.mdx index c0da77e628..7f36e7ae50 100644 --- a/content/vault/v1.21.x/content/partials/examples/ldap/openldap-config.mdx +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/openldap/basic.mdx @@ -10,7 +10,7 @@ For example: - + ```json { diff --git a/content/vault/v1.21.x/content/partials/ldap/example-config/openldap/disable-rotation.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/openldap/disable-rotation.mdx new file mode 100644 index 0000000000..986a24e3e8 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/openldap/disable-rotation.mdx @@ -0,0 +1,25 @@ +```json +{ + "schema": "openldap", + "binddn": "", + "bindpass": "", + "url": "", + "disable_automated_rotation": "true" +} +``` + +For example: + + + +```json +{ + "schema": "openldap", + "binddn": "cn=admin,dc=abc,dc=com", + "bindpass": "iamabadpassword", + "url": "ldaps://138.91.247.105", + "disable_automated_rotation": "true" +} +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/example-config/openldap/period-rotation.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/openldap/period-rotation.mdx new file mode 100644 index 0000000000..3709c77333 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/openldap/period-rotation.mdx @@ -0,0 +1,29 @@ +```json +{ + "schema": "openldap", + "binddn": "", + "bindpass": "", + "url": "", + "credential_type": "", + "rotation_schedule": "", + "rotation_period": "" +} +``` + +For example: + + + +```json +{ + "schema": "openldap", + "binddn": "cn=admin,dc=abc,dc=com", + "bindpass": "iamabadpassword", + "url": "ldaps://138.91.247.105", + "credential_type": "password", + "rotation_schedule": "", + "rotation_period": "24h" +} +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/example-config/openldap/scheduled-rotation.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/openldap/scheduled-rotation.mdx new file mode 100644 index 0000000000..34d0770e84 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/openldap/scheduled-rotation.mdx @@ -0,0 +1,31 @@ +```json +{ + "schema": "openldap", + "binddn": "", + "bindpass": "", + "url": "", + "credential_type": "", + "rotation_schedule": "", + "rotation_window": "", + "rotation_period": "0" +} +``` + +For example: + + + +```json +{ + "schema": "openldap", + "binddn": "cn=admin,dc=abc,dc=com", + "bindpass": "iamabadpassword", + "url": "ldaps://138.91.247.105", + "credential_type": "password", + "rotation_schedule": "0 0 * * SAT", + "rotation_window": "1hr", + "rotation_period": "0" +} +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/examples/ldap/racf-config.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/racf/basic.mdx similarity index 84% rename from content/vault/v1.21.x/content/partials/examples/ldap/racf-config.mdx rename to content/vault/v1.21.x/content/partials/ldap/example-config/racf/basic.mdx index 349473ebec..47c6cae842 100644 --- a/content/vault/v1.21.x/content/partials/examples/ldap/racf-config.mdx +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/racf/basic.mdx @@ -11,7 +11,7 @@ For example: - + ```json { @@ -20,7 +20,8 @@ For example: "bindpass": "iamabadpassword", "url": "ldaps://138.91.247.105", "credential_type": "phrase", - "password_policy": "racf_password_policy" + "password_policy": "racf-passphrase" } ``` + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/example-config/racf/disable-rotation.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/racf/disable-rotation.mdx new file mode 100644 index 0000000000..3a16d35b19 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/racf/disable-rotation.mdx @@ -0,0 +1,25 @@ +```json +{ + "schema": "racf", + "binddn": "", + "bindpass": "", + "url": "", + "disable_automated_rotation": "true" +} +``` + +For example: + + + +```json +{ + "schema": "racf", + "binddn": "cn=admin,dc=abc,dc=com", + "bindpass": "iamabadpassword", + "url": "ldaps://138.91.247.105", + "disable_automated_rotation": "true" +} +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/example-config/racf/ibm-setup.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/racf/ibm-setup.mdx new file mode 100644 index 0000000000..711cfff941 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/racf/ibm-setup.mdx @@ -0,0 +1,27 @@ +```json +{ + "schema": "racf", + "binddn": "racfid=,profiletype=user,cn=RACF", + "bindpass": "", + "url": "", + "credential_type": "", + "password_policy": "" +} +``` + +For example: + + + +```json +{ + "schema": "racf", + "binddn": "racfid=vault,profiletype=user,cn=RACF", + "bindpass": "iamabadpassword", + "url": "ldaps://9.12.41.127:389", + "credential_type": "phrase", + "password_policy": "racf-passphrase" +} +``` + + diff --git a/content/vault/v1.21.x/content/partials/ldap/example-config/racf/period-rotation.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/racf/period-rotation.mdx new file mode 100644 index 0000000000..ef2918ea5d --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/racf/period-rotation.mdx @@ -0,0 +1,31 @@ +```json +{ + "schema": "racf", + "binddn": "", + "bindpass": "", + "url": "", + "credential_type": "", + "password_policy": "", + "rotation_schedule": "", + "rotation_period": "" +} +``` + +For example: + + + +```json +{ + "schema": "racf", + "binddn": "cn=admin,dc=abc,dc=com", + "bindpass": "iamabadpassword", + "url": "ldaps://138.91.247.105", + "credential_type": "phrase", + "password_policy": "racf_password_policy", + "rotation_schedule": "", + "rotation_period": "24h" +} +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/example-config/racf/scheduled-rotation.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/racf/scheduled-rotation.mdx new file mode 100644 index 0000000000..dcdd48ffc3 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/racf/scheduled-rotation.mdx @@ -0,0 +1,33 @@ +```json +{ + "schema": "racf", + "binddn": "", + "bindpass": "", + "url": "", + "credential_type": "", + "password_policy": "", + "rotation_schedule": "", + "rotation_window": "", + "rotation_period": "0" +} +``` + +For example: + + + +```json +{ + "schema": "racf", + "binddn": "cn=admin,dc=abc,dc=com", + "bindpass": "iamabadpassword", + "url": "ldaps://138.91.247.105", + "credential_type": "phrase", + "password_policy": "racf_password_policy", + "rotation_schedule": "0 0 * * SAT", + "rotation_window": "1hr", + "rotation_period": "0" +} +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/example-config/static-role/basic.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/static-role/basic.mdx new file mode 100644 index 0000000000..61e5168411 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/static-role/basic.mdx @@ -0,0 +1,23 @@ +```json +{ + "role_name": "", + "username": "", + "dn": "", + "rotation_period": "" +} +``` + +For example: + + + +```json +{ + "role_name": "hashicorp", + "username": "vault", + "dn": "uid=vault,ou=users,dc=hashicorp,dc=com", + "rotation_period": "24h" +} +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/example-config/static-role/ibm-racf.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/static-role/ibm-racf.mdx new file mode 100644 index 0000000000..81d3c718e4 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/static-role/ibm-racf.mdx @@ -0,0 +1,23 @@ +```json +{ + "role_name": "", + "username": "", + "dn": "racfid=,profiletype=user,cn=RACFHC4", + "rotation_period": "" +} +``` + +For example: + + + +```json +{ + "role_name": "hashicorp", + "username": "vault", + "dn": "racfid=vault,profiletype=user,cn=RACFHC4", + "rotation_period": "24h" +} +``` + + diff --git a/content/vault/v1.21.x/content/partials/ldap/example-config/static-role/minimal.mdx b/content/vault/v1.21.x/content/partials/ldap/example-config/static-role/minimal.mdx new file mode 100644 index 0000000000..01f05ba138 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/example-config/static-role/minimal.mdx @@ -0,0 +1,21 @@ +```json +{ + "role_name": "", + "username": "" + "rotation_period": "" +} +``` + +For example: + + + +```json +{ + "role_name": "hashicorp", + "username": "vault" + "rotation_period": "24h" +} +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/get-role-creds/api.mdx b/content/vault/v1.21.x/content/partials/ldap/get-role-creds/api.mdx new file mode 100644 index 0000000000..b32d204484 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/get-role-creds/api.mdx @@ -0,0 +1,25 @@ +Make a `GET` call to +[`/{mount_path}/static-cred/{role_name}`](/vault/api-docs/secret/ldap#static-role-passwords) +to fetch the credential information for the given role: + +```shell-session +$ curl \ + --request GET \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1//static-role/ +``` + +For example: + + + +```shell-session +$ curl \ + --request GET \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1//static-role/hashicorp +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/get-role-creds/cli.mdx b/content/vault/v1.21.x/content/partials/ldap/get-role-creds/cli.mdx new file mode 100644 index 0000000000..890d53777f --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/get-role-creds/cli.mdx @@ -0,0 +1,17 @@ +Use `vault read` with the +[`/{mount_path}/static-cred/{role_name}`](/vault/api-docs/secret/ldap#static-role-passwords) +path to fetch the credential information for the given role: + +```shell-session +$ vault read /static-role/ +``` + +For example: + + + +```shell-session +$ vault read devcreds/static-role/hashicorp +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/rotate-creds/api.mdx b/content/vault/v1.21.x/content/partials/ldap/rotate-creds/api.mdx new file mode 100644 index 0000000000..262cd652bb --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/rotate-creds/api.mdx @@ -0,0 +1,25 @@ +Make a `POST` call to +[`/{mount_path}/rotate-role/{role_name}`](/vault/api-docs/secret/ldap#manually-rotate-static-role-password) +to rotate the credential password: + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1//rotate-role/ +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/devcreds/rotate-role/hashicorp +``` + + diff --git a/content/vault/v1.21.x/content/partials/ldap/rotate-creds/cli.mdx b/content/vault/v1.21.x/content/partials/ldap/rotate-creds/cli.mdx new file mode 100644 index 0000000000..b902b49366 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/rotate-creds/cli.mdx @@ -0,0 +1,19 @@ +Use `vault write` with the +[`/{mount_path}/rotate-role/{role_name}`](/vault/api-docs/secret/ldap#manually-rotate-static-role-password) +path to rotate the credential password: + +```shell-session +$ vault write -f /rotate-role/ +``` + +For example: + + + +```shell-session +$ vault write -f devcreds/rotate-role/hashicorp +``` + + + + diff --git a/content/vault/v1.21.x/content/partials/ldap/rotate-root/api.mdx b/content/vault/v1.21.x/content/partials/ldap/rotate-root/api.mdx new file mode 100644 index 0000000000..facdfa1a67 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/rotate-root/api.mdx @@ -0,0 +1,25 @@ +Make a `POST` call to +[`/{mount_path}/rotate-root`](/vault/api-docs/secret/ldap#rotate-root-password) +to rotate the root credential: + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/sys//rotate-root +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/sys/devcreds/rotate-root +``` + + diff --git a/content/vault/v1.21.x/content/partials/ldap/rotate-root/cli.mdx b/content/vault/v1.21.x/content/partials/ldap/rotate-root/cli.mdx new file mode 100644 index 0000000000..a1d594664a --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/rotate-root/cli.mdx @@ -0,0 +1,17 @@ +Use `vault write` with the +[`/{mount_path}/rotate-root`](/vault/api-docs/secret/ldap#rotate-root-password) +path to rotate the root credential: + +```shell-session +$ vault write -f /rotate-root +``` + +For example: + + + +```shell-session +$ vault write -f devcreds/rotate-root +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/examples/password-policies/default-password.mdx b/content/vault/v1.21.x/content/partials/password-policies/example-config/default-password.mdx similarity index 100% rename from content/vault/v1.21.x/content/partials/examples/password-policies/default-password.mdx rename to content/vault/v1.21.x/content/partials/password-policies/example-config/default-password.mdx diff --git a/content/vault/v1.21.x/content/partials/password-policies/example-config/ibm-racf-passphrase.mdx b/content/vault/v1.21.x/content/partials/password-policies/example-config/ibm-racf-passphrase.mdx new file mode 100644 index 0000000000..796c2c5c16 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/password-policies/example-config/ibm-racf-passphrase.mdx @@ -0,0 +1,32 @@ +The following password policy adheres to the passphrase policy in IBM RACF by +requiring: + +- 14 characters. +- at least one lowercase character. +- at least one uppercase character. +- at least one number. +- at least special character from the set [`!`, `@`, `#`, `$`, `%`, `&`]. + +```hcl +length = 14 + +rule "charset" { + charset = "abcdefghijklmnopqrstuvwxyz" + min-chars = 1 +} + +rule "charset" { + charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + min-chars = 1 +} + +rule "charset" { + charset = "0123456789" + min-chars = 1 +} + +rule "charset" { + charset = "!@#$%&" + min-chars = 1 +} +``` \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/password-policies/example-config/ibm-racf-password.mdx b/content/vault/v1.21.x/content/partials/password-policies/example-config/ibm-racf-password.mdx new file mode 100644 index 0000000000..1a3b3bebf4 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/password-policies/example-config/ibm-racf-password.mdx @@ -0,0 +1,26 @@ +The following password policy adheres to the password policy in IBM RACF by +requiring: + +- 8 characters. +- at least one lowercase character. +- at least one uppercase character. +- at least one number. + +```hcl +length = 8 + +rule "charset" { + charset = "abcdefghijklmnopqrstuvwxyz" + min-chars = 1 +} + +rule "charset" { + charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + min-chars = 1 +} + +rule "charset" { + charset = "0123456789" + min-chars = 1 +} +``` \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/examples/password-policies/passphrase.mdx b/content/vault/v1.21.x/content/partials/password-policies/example-config/passphrase.mdx similarity index 100% rename from content/vault/v1.21.x/content/partials/examples/password-policies/passphrase.mdx rename to content/vault/v1.21.x/content/partials/password-policies/example-config/passphrase.mdx diff --git a/content/vault/v1.21.x/content/partials/password-policies/example-config/traditional-ldap.mdx b/content/vault/v1.21.x/content/partials/password-policies/example-config/traditional-ldap.mdx new file mode 100644 index 0000000000..ab1f5cfed6 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/password-policies/example-config/traditional-ldap.mdx @@ -0,0 +1,10 @@ +The following password policy supports traditional, 8-character, alphanumeric +passwords: + +```hcl +length=8 + +rule "charset" { + charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +} +``` \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/password-policies/read-policy/api.mdx b/content/vault/v1.21.x/content/partials/password-policies/read-policy/api.mdx new file mode 100644 index 0000000000..b94a7ff769 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/password-policies/read-policy/api.mdx @@ -0,0 +1,25 @@ +Make a `GET` call to +[`/sys/policies/password/{policy_name}`](/vault/api-docs/system/policies-password#create-update-password-policy) +to read the details of a password policy: + +```shell-session +$ curl \ + --request GET \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/sys/policies/password/ +``` + +For example: + + + +```shell-session +$ curl \ + --request GET \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/sys/policies/password/racf-passphrase +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/password-policies/read-policy/cli.mdx b/content/vault/v1.21.x/content/partials/password-policies/read-policy/cli.mdx new file mode 100644 index 0000000000..922742abfe --- /dev/null +++ b/content/vault/v1.21.x/content/partials/password-policies/read-policy/cli.mdx @@ -0,0 +1,17 @@ +Use `vault read` with the +[`/sys/policies/password/{policy_name}`](/vault/api-docs/system/policies-password#create-update-password-policy) +to read the details of a password policy: + +```shell-session +$ vault read /sys/policies/password/ +``` + +For example: + + + +```shell-session +$ vault read /sys/policies/password/racf-passphrase +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/password-policies/save-policy/api.mdx b/content/vault/v1.21.x/content/partials/password-policies/save-policy/api.mdx new file mode 100644 index 0000000000..7388d78a84 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/password-policies/save-policy/api.mdx @@ -0,0 +1,27 @@ +Make a `POST` call to +[`/sys/policies/password/{policy_name}`](/vault/api-docs/system/policies-password#create-update-password-policy) +with your your policy file to create a new password policy: + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data {"policy": @} \ + ${VAULT_ADDR}/v1/sys/policies/password/ +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data {"policy": @racf-policy.hcl} \ + ${VAULT_ADDR}/v1/sys/policies/password/racf-passphrase +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/password-policies/save-policy/cli.mdx b/content/vault/v1.21.x/content/partials/password-policies/save-policy/cli.mdx new file mode 100644 index 0000000000..29dbcfeb65 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/password-policies/save-policy/cli.mdx @@ -0,0 +1,19 @@ +Use `vault write` with the +[`/sys/policies/password/{policy_name}`](/vault/api-docs/system/policies-password#create-update-password-policy) +path and your policy file to create a new password policy: + +```shell-session +$ vault write /sys/policies/password/ \ + policy= +``` + +For example: + + + +```shell-session +$ vault write /sys/policies/password/racf-passphrase \ + policy=racf-policy.hcl +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/data/docs-nav-data.json b/content/vault/v1.21.x/data/docs-nav-data.json index bff3419910..20e2e2a78e 100644 --- a/content/vault/v1.21.x/data/docs-nav-data.json +++ b/content/vault/v1.21.x/data/docs-nav-data.json @@ -2325,19 +2325,60 @@ "path": "secrets/ldap/updates" }, { - "title": "Setup", + "title": "Basic setup", "path": "secrets/ldap/setup" }, + { + "title": "IBM RACF setup", + "path": "secrets/ldap/ibm-racf" + }, + { + "title": "Use dynamic credentials", + "path": "secrets/ldap/dynamic-credentials" + }, + { + "title": "Check out service accounts", + "path": "secrets/ldap/service-account-checkout" + }, { "title": "Cookbook", "routes": [ { - "title": "Rotate root credentials", + "title": "Manually rotate root credentials", "path": "secrets/ldap/cookbook/rotate-root-creds" }, + { + "title": "Schedule root credential rotation", + "path": "secrets/ldap/cookbook/schedule-based-rotation" + }, + { + "title": "Disable root credential rotation", + "path": "secrets/ldap/cookbook/disable-root-rotation" + }, { "title": "Create static roles", - "path": "secrets/ldap/cookbook/creatae-static-roles" + "path": "secrets/ldap/cookbook/create-static-roles" + }, + { + "title": "Manually rotate role credentials", + "path": "secrets/ldap/cookbook/rotate-static-roles" + }, + { + "title": "Delete static roles", + "path": "secrets/ldap/cookbook/delete-static-roles" + } + ] + }, + { + "title": "Examples", + "routes": [ + { + "title": "Basic RACF configuration", + "path": "secrets/ldap/examples/basic-racf-config" + }, + { + "title": "Hash LDAP passwords", + "path": "secrets/ldap/examples/hash-passwords" } ] } From 5a193784ec30ff6c09bdc8515e1137a343158cfb Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Thu, 20 Nov 2025 16:32:09 -0800 Subject: [PATCH 08/18] save --- .../content/docs/secrets/ldap/ibm-racf.mdx | 55 +++++++------------ 1 file changed, 20 insertions(+), 35 deletions(-) diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx index 244cb8551a..e73e0fd12d 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx @@ -9,33 +9,9 @@ description: >- # Manage IBM RACF LDAP credentials -IBM RACF is a widely used mainframe security system for managing authentication and access control in enterprise environments. - -The LDAP secrets engine in HashiCorp Vault provides a secure and automated workflow for managing IBM RACF LDAP credentials. -It enables centralized storage and controlled access to credentials while offering automatic password rotation to enhance security and reduce operational overhead. - - -Password Policy in IBM RACF is defined as 1 - 8 characters length. -A password is a traditional one to eight character alphanumeric valu - -A RACF password phrase is a secure alternative to a traditional password in IBM's Resource Access Control Facility (RACF). -Unlike standard passwords, which are short and limited in complexity, a password phrase is a longer character string that may include -mixed-case letters, numbers, spaces, and special characters. -Due to its length and complexity, it provides stronger protection against unauthorized access and brute-force attacks. -When the new-password-phrase exit (ICHPWX11) is present and allows it, the password phrase can be 9 - 100 characters. -When ICHPWX11 is not present, the password phrase must be 14 - 100 characters. - -A password phrase is a character string that consists of mixed-case letters, numbers, and special characters including blanks. -Password phrases have security advantages over passwords as they are long enough to withstand most hacking attempts and are unlikely to be written down because they are easy to remember. -A user can be assigned a password, a password phrase, both, or neither. - -You can now define a more complex password policy by including special characters to enhance security and meet RACF compliance requirements - - -For more details refer to [RACF password-phrase policy](https://www.ibm.com/docs/en/zos/2.4.0?topic=syntax-password-phrase-specify-user-password-password-phrase) - - - +Use the LDAP plugin with IBM Resource Access Control Facility (RACF) mainframe +security systems to manage authentication and access control in enterprise +environments. ## Before you start @@ -45,19 +21,27 @@ For more details refer to [RACF password-phrase policy](https://www.ibm.com/docs - **Create a RACF-enabled LDAP user account for Vault**. You must have a RACF-enabled LDAP user account with sufficient privileges to manage user credentials. -- **Decide on a password policy**. We recommend using passphrases over passwords - for better security, but z/OS supports both. +- **Decide on a [Vault password policy](/vault/docs/concepts/password-policies)**. + You can use traditional passwords or passphrases with z/OS, but we strongly + recommend using passphrases, which provide stronger protection against + unauthorized access and brute-force attacks. RACF passphrases can include + mixed-case letters, numbers, spaces, and special characters. ## Step 1: Create a Vault password policy To securely manage z/OS LDAP credentials in Vault you must create a password -policy in Vault to control how the plugin rotates LDAP credentials. You can use -traditional passwords or a passphrase, but we strongly recommend using -passphrases. +policy in Vault to control how the plugin rotates LDAP credentials. + + +If your z/OS deployment allows the ICHPWX11 exit routine, you can use password +phrases 9 - 100 characters long. Otherwise, passphrases must be 14 - 100 +characters. -1. Create a policy configuration file `racf-policy.hcl`. + + +1. Create a policy configuration fil, `racf-policy.hcl`. @@ -112,6 +96,7 @@ passphrases. + ## Step 2: Enable the LDAP secrets plugin @@ -277,7 +262,6 @@ the static role configured. - 1. Use the provided credential to SSH into your mainframe z/OS system: ```shell-session @@ -309,7 +293,8 @@ the static role configured. - [Passwords and password phrases overview](https://www.ibm.com/docs/en/zos/2.5.0?topic=users-passwords-password-phrases) -- [Resource access control facility overview](https://www.ibm.com/docs/en/zos-basic-skills?topic=zos-what-is-racf +- [RACF password-phrase policy](https://www.ibm.com/docs/en/zos/2.4.0?topic=syntax-password-phrase-specify-user-password-password-phrase) +- [Resource access control facility overview](https://www.ibm.com/docs/en/zos-basic-skills?topic=zos-what-is-racf) From 2a04a8468799560dfbdbe7cb51ade5e34e5ae9fa Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Fri, 21 Nov 2025 09:55:08 -0800 Subject: [PATCH 09/18] save --- .../{examples => cookbook}/hash-passwords.mdx | 0 .../ldap/examples/basic-racf-config.mdx | 39 -- .../content/docs/secrets/ldap/ibm-racf.mdx | 8 +- .../content/docs/secrets/ldap/index.mdx | 587 +++--------------- .../content/docs/secrets/ldap/index2.mdx | 213 ------- .../content/docs/secrets/ldap/setup.mdx | 83 +-- .../content/docs/secrets/ldap/updates.mdx | 27 - content/vault/v1.21.x/data/docs-nav-data.json | 21 +- 8 files changed, 91 insertions(+), 887 deletions(-) rename content/vault/v1.21.x/content/docs/secrets/ldap/{examples => cookbook}/hash-passwords.mdx (100%) delete mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/examples/basic-racf-config.mdx delete mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx delete mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/updates.mdx diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/examples/hash-passwords.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/hash-passwords.mdx similarity index 100% rename from content/vault/v1.21.x/content/docs/secrets/ldap/examples/hash-passwords.mdx rename to content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/hash-passwords.mdx diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/examples/basic-racf-config.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/examples/basic-racf-config.mdx deleted file mode 100644 index b4c7379066..0000000000 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/examples/basic-racf-config.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -layout: docs -page_title: Example LDAP config for RACF -description: >- - Basic RACF configuration for the LDAP secrets plugin ---- - -# Example LDAP configuration for RACF - -You can use the following Resource access control facility (RACF) configuration -for the LDAP secrets plugin and password policy configuration as a starting -point for connecting Vault with your RACF deployment to automatically manage -password phrases with Vault. - - - -- You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). -- You have permission to create Vault - [password policy](/vault/docs/concepts/password-policies) passwords. - - - - - - - -@include 'password-policies/example-config/passphrase.mdx' - - - - - -@include 'ldap/example-config/racf/basic.mdx' - - - - - - diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx index e73e0fd12d..e8b801366d 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx @@ -126,8 +126,10 @@ characters. ## Step 3: Create your plugin configuration file For easier maintenance and reuse, create a JSON file with your preferred -configuration details. Use the schema enum `racf` and the name of your Vault -password policy to create a basic configuration file called `ldap.json`: +configuration details. + +Use the schema enum `racf`, the `phrase` credential type, and the name of your +Vault password policy to create a basic configuration file called `ldap.json`: @include 'ldap/example-config/racf/ibm-setup.mdx' @@ -154,8 +156,6 @@ your IBM RACF LDAP server. -![Screenshot of the schema selection screen in the Vault GUI](/img/gui/ldap/schema-selection.png) - @include 'ldap/apply-config/gui.mdx' diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx index 59709cb61f..1e3c1bb0ac 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx @@ -2,193 +2,37 @@ layout: docs page_title: LDAP secrets engine description: >- - Dynamically create and manage LDAP entry passwords with the LDAP secret engine - plugin. + Create and manage LDAP credentials with the LDAP secret engine plugin. --- -# LDAP secrets engine +# LDAP secrets engine overview -Latest version | Code source | Runtime --------------- | ----------- | ------- -1.21.x | Embedded | Built-in +Manage static and dynamic LDAP credentials and integrate with services that +implement the LDAP v3 protocol, including OpenLDAP, Active Directory, and IBM +Resource Access Control Facility (RACF). +Current version | Edition | Runtime | Code source +--------------- | --------- | -------- | ----------- +0.17.0 | Community | Built-in | [`hashicorp/vault-plugin-secrets-openldap`](https://github.com/hashicorp/vault-plugin-secrets-openldap) -## Changelog -hello, I'm an index page +## Feature summary -The LDAP secrets engine provides management of LDAP credentials as well as dynamic -creation of credentials. It supports integration with implementations of the LDAP -v3 protocol, including OpenLDAP, Active Directory, and IBM Resource Access Control -Facility (RACF). +- Use OpenLDAP, RACF, and Active Directory schemas. +- Use traditional 8-character passwords and modern, longer password phrases. +- Use dynamic LDAP credentials and manage LDAP user accounts through LDIF. +- Check-out service accounts with automatic password rotation. +- Map static Vault roles to LDAP credentials. +- Manually rotate LDAP passwords and root credentials. +- Automatically rotate LDAP passwords for static credentials. -The LDAP secrets plugin has three primary features: -- [Static Credentials](/vault/docs/secrets/ldap#static-credentials) -- [Dynamic Credentials](/vault/docs/secrets/ldap#dynamic-credentials) -- [Service Account Check-Out](/vault/docs/secrets/ldap#service-account-check-out) - - - -## Schemas - -The LDAP Secret Engine supports three different schemas: - -- `openldap` (default) -- `racf` -- `ad` - -### OpenLDAP - -By default, the LDAP Secret Engine assumes the entry password is stored in `userPassword`. -There are many object classes that provide `userPassword` including for example: - -- `organization` -- `organizationalUnit` -- `organizationalRole` -- `inetOrgPerson` -- `person` -- `posixAccount` - -### Resource access control facility (RACF) - -To manage credentials for an IBM Resource Access Control Facility (RACF), -configure the LDAP secrets engine with the `racf` schema to enable the -behaviors required for RACF compatibility. - -#### Password vs. password phrase credentials - -The LDAP plugin supports traditional 8-character passwords and modern, -longer password phrases through th -[`credential_type`](/vault/api-docs/secret/ldap#credential_type) parameter: - -- `password` (Default): Configure the plugin to generate and manage standard RACF passwords. -- `phrase`: Configure the plugin to generate and manage case-sensitive password phrases. - - -#### Configure password rules - -The RACF schema does not control the credential complexity rules directly. -To enforce site-specific complexity requirements, define and link a -standard Vault [password policy](/vault/docs/concepts/password-policies) -to your RACF schema. - - -#### Example configuration - -The following example configures the LDAP engine for RACF, sets it to manage -password phrases, and links a password policy to enforce length and -complexity. - -```shell-session -$ cat > /tmp/password_policy.hcl <<-EOF -length = 20 -rule "charset" { - charset = "abcdefghijklmnopqrstuvwxyz" - min-chars = 1 -} -EOF -$ vault write sys/policies/password/racf_password_policy policy=@/tmp/password_policy.hcl -$ vault write ldap/config \ - binddn="$USERNAME" \ - bindpass="$PASSWORD" \ - url="ldaps://138.91.247.105" \ - schema="racf" \ - credential_type="phrase" \ - password_policy="racf_password_policy" -``` - -### Active directory (AD) - -For managing Active Directory instances, the secret engine must be configured to use the -schema `ad`. - -```bash -$ vault write ldap/config \ - binddn=$USERNAME \ - bindpass=$PASSWORD \ - url=ldaps://138.91.247.105 \ - schema=ad -``` - -## Root credential rotation - -Mounts can rotate root credential keys configured directly within the mount. -Rotating to a Vault-generated key makes the key value inaccessible to the -operator and ensures only Vault can operate as a root user to manipulate dynamic -and static credentials. - -```shell-session -vault write -f ldap/rotate-root -``` - -### Schedule-based root credential rotation - -@include 'alerts/enterprise-only.mdx' - -Use the [`rotation_schedule`](/vault/api-docs/secret/ldap#rotation_schedule) field -to configure schedule-based, automatic credential rotation for root credentials in -the LDAP secrets engine. For example, the following command set the rotation to -occur every Saturday at midnight (00:00): - -```shell-session -$ vault write ldap/config \ - ... - rotation_schedule="0 * * * SAT" - ... -``` - -This configuration will set the role's credential rotation to occur on Saturday -at 00:00. - -Scheduled root credential rotation can also set a -[rotation_window](/vault/api-docs/secret/ldap#rotation_window) during which the -scheduled rotation is allowed to occur. Vault will stop trying to rotate the -credential once the window expires. For example, the following command tells -Vault to rotate the credential on Saturday at midnight, but only within the span -of an hour. If Vault cannot rotate the credential by 1:00, due to a failure -or otherwise, Vault will stop trying to rotate the credential until the next -scheduled rotation. - -```shell-session -$ vault write ldap/config \ - ... - rotation_window="1h" \ - rotation_schedule="0 * * * SAT" - ... -``` - -You can temporarily disable root rotation by setting -[`disable_automated_rotation`](/vault/api-docs/secret/ldap#disable_automated_rotation) -to `true`. Setting the `disable_automated_rotation` field prevent any rotation -of the root credential until the field is reset to `false`. If you use -`rotation_period`, setting `disable_automated_rotation` also resets the credential -TTL. - -For more details on rotating root credentials in the LDAP plugin, refer to the -[Root credential rotation](/vault/api-docs/secret/ldap#rotate-root) API docs. +## Overview @include 'rotation-manager-logging.mdx' -## Static credentials - -### Setup -1. Configure a static role that maps a name in Vault to an entry in LDAP. - Password rotation settings will be managed by this role. - - ```shell-session - $ vault write ldap/static-role/hashicorp \ - dn='uid=hashicorp,ou=users,dc=hashicorp,dc=com' \ - username='hashicorp' \ - rotation_period="24h" - ``` - -2. Request credentials for the "hashicorp" role: - - ```shell-session - $ vault read ldap/static-cred/hashicorp - ``` +## Static credentials ### Password rotation @@ -203,9 +47,6 @@ Passwords will automatically be rotated based on the `rotation_period` configure in the static role (minimum of 5 seconds). When requesting credentials for a static role, the response will include the time before the next rotation (`ttl`). -The `binddn` account used by Vault should be rotated using the `rotate-root` endpoint to generate a password -only Vault will know. - As with the rotation manager, Vault logs rotations with reference to the `name` of the role and `error` if the rotation failed. The logs also indicate if the rotation was part of a `periodic function`. @@ -218,336 +59,36 @@ rotated the rotation period will start over. Logging for manual rotation records the same information as other rotation logging with an additional reference that the rotation happened `on user request`. -### Deleting static roles - -Passwords are not rotated upon deletion of a static role. The password should be manually -rotated prior to deleting the role or revoking access to the static role. - -## Dynamic credentials - -### Setup - -Dynamic credentials can be configured by calling the `/role/:role_name` endpoint: - -```bash -$ vault write ldap/role/dynamic-role \ - creation_ldif=@/path/to/creation.ldif \ - deletion_ldif=@/path/to/deletion.ldif \ - rollback_ldif=@/path/to/rollback.ldif \ - default_ttl=1h \ - max_ttl=24h -``` - --> Note: The `rollback_ldif` argument is optional, but recommended. The statements within `rollback_ldif` will be -executed if the creation fails for any reason. This ensures any entities are removed in the event of a failure. - -To generate credentials: - -```bash -$ vault read ldap/creds/dynamic-role -Key Value ---- ----- -lease_id ldap/creds/dynamic-role/HFgd6uKaDomVMvJpYbn9q4q5 -lease_duration 1h -lease_renewable true -distinguished_names [cn=v_token_dynamic-role_FfH2i1c4dO_1611952635,ou=users,dc=learn,dc=example] -password xWMjkIFMerYttEbzfnBVZvhRQGmhpAA0yeTya8fdmDB3LXDzGrjNEPV2bCPE9CW6 -username v_token_testrole_FfH2i1c4dO_1611952635 -``` - -The `distinguished_names` field is an array of DNs that are created from the `creation_ldif` statements. If more than -one LDIF entry is included, the DN from each statement will be included in this field. Each entry in this field -corresponds to a single LDIF statement. No de-duplication occurs and order is maintained. - -### LDIF entries - -User account management is provided through LDIF entries. The LDIF entries may be a base64-encoded version of the -LDIF string. The string will be parsed and validated to ensure that it adheres to LDIF syntax. A good reference -for proper LDIF syntax can be found [here](https://ldap.com/ldif-the-ldap-data-interchange-format/). - -Some important things to remember when crafting your LDIF entries: - -- There should not be any trailing spaces on any line, including empty lines -- Each `modify` block needs to be preceded with an empty line -- Multiple modifications for a `dn` can be defined in a single `modify` block. Each modification needs to close - with a single dash (`-`) - -### Active directory (AD) - - - - Windows Servers hosting Active Directory include a - `lifetime period of an old password` configuration setting that lets clients - authenticate with old passwords for a specified amount of time. - - For more information, refer to the - [NTLM network authentication behavior](https://learn.microsoft.com/en-us/troubleshoot/windows-server/windows-security new-setting-modifies-ntlm-network-authentication) - guide by Microsoft. - - - -For Active Directory, there are a few additional details that are important to remember: - -To create a user programmatically in AD, you first `add` a user object and then `modify` that user to provide a -password and enable the account. - -- Passwords in AD are set using the `unicodePwd` field. This must be proceeded by two (2) colons (`::`). -- When setting a password programmatically in AD, the following criteria must be met: - - - The password must be enclosed in double quotes (`" "`) - - The password must be in [`UTF16LE` format](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/6e803168-f140-4d23-b2d3-c3a8ab5917d2) - - The password must be `base64`-encoded - - Additional details can be found [here](https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/set-user-password-with-ldifde) - -- Once a user's password has been set, it can be enabled. AD uses the `userAccountControl` field for this purpose: - - To enable the account, set `userAccountControl` to `512` - - You will likely also want to disable AD's password expiration for this dynamic user account. The - `userAccountControl` value for this is: `65536` - - `userAccountControl` flags are cumulative, so to set both of the above two flags, add up the two values - (`512 + 65536 = 66048`): set `userAccountControl` to `66048` - - See [here](https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties#property-flag-descriptions) - for details on `userAccountControl` flags - -`sAMAccountName` is a common field when working with AD users. It is used to provide compatibility with legacy -Windows NT systems and has a limit of 20 characters. Keep this in mind when defining your `username_template`. -See [here](https://docs.microsoft.com/en-us/windows/win32/adschema/a-samaccountname) for additional details. - -Since the default `username_template` is longer than 20 characters which follows the template of `v_{{.DisplayName}}_{{.RoleName}}_{{random 10}}_{{unix_time}}`, we recommend customising the `username_template` on the role configuration to generate accounts with names less than 20 characters. Please refer to the [username templating document](/vault/docs/concepts/username-templating) for more information. - -With regard to adding dynamic users to groups, AD doesn't let you directly modify a user's `memberOf` attribute. -The `member` attribute of a group and `memberOf` attribute of a user are -[linked attributes](https://docs.microsoft.com/en-us/windows/win32/ad/linked-attributes). Linked attributes are -forward link/back link pairs, with the forward link able to be modified. In the case of AD group membership, the -group's `member` attribute is the forward link. In order to add a newly-created dynamic user to a group, we also -need to issue a `modify` request to the desired group and update the group membership with the new user. - -#### Active directory LDIF example - -The various `*_ldif` parameters are templates that use the [go template](https://golang.org/pkg/text/template/) -language. A complete LDIF example for creating an Active Directory user account is provided here for reference: - -```ldif -dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab -changetype: add -objectClass: top -objectClass: person -objectClass: organizationalPerson -objectClass: user -userPrincipalName: {{.Username}}@adtesting.lab -sAMAccountName: {{.Username}} - -dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab -changetype: modify -replace: unicodePwd -unicodePwd::{{ printf "%q" .Password | utf16le | base64 }} -- -replace: userAccountControl -userAccountControl: 66048 -- - -dn: CN=test-group,OU=HashiVault,DC=adtesting,DC=lab -changetype: modify -add: member -member: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab -- -``` - -## Service account Check-Out -Service account check-out provides a library of service accounts that can be checked out -by a person or by machines. Vault will automatically rotate the password each time a -service account is checked in. Service accounts can be voluntarily checked in, or Vault -will check them in when their lending period (or, "ttl", in Vault's language) ends. +--------------------------------------------------------------------------------- -The service account check-out functionality works with various [schemas](/vault/api-docs/secret/ldap#schema), -including OpenLDAP, Active Directory, and RACF. In the following usage example, the secrets -engine is configured to manage a library of service accounts in an Active Directory instance. - -First we'll need to enable the LDAP secrets engine and tell it how to securely connect -to an AD server. - -```shell-session -$ vault secrets enable ldap -Success! Enabled the ad secrets engine at: ldap/ - -$ vault write ldap/config \ - binddn=$USERNAME \ - bindpass=$PASSWORD \ - url=ldaps://138.91.247.105 \ - userdn='dc=example,dc=com' -``` - -Our next step is to designate a set of service accounts for check-out. - -```shell-session -$ vault write ldap/library/accounting-team \ - service_account_names=fizz@example.com,buzz@example.com \ - ttl=10h \ - max_ttl=20h \ - disable_check_in_enforcement=false -``` - -In this example, the service account names of `fizz@example.com` and `buzz@example.com` have -already been created on the remote AD server. They've been set aside solely for Vault to handle. -The `ttl` is how long each check-out will last before Vault checks in a service account, -rotating its password during check-in. The `max_ttl` is the maximum amount of time it can live -if it's renewed. These default to `24h`, and both use [duration format strings](/vault/docs/concepts/duration-format). -Also by default, a service account must be checked in by the same Vault entity or client token that -checked it out. However, if this behavior causes problems, set `disable_check_in_enforcement=true`. - -When a library of service accounts has been created, view their status at any time to see if they're -available or checked out. - -```shell-session -$ vault read ldap/library/accounting-team/status -Key Value ---- ----- -buzz@example.com map[available:true] -fizz@example.com map[available:true] -``` - -To check out any service account that's available, simply execute: - -```shell-session -$ vault write -f ldap/library/accounting-team/check-out -Key Value ---- ----- -lease_id ldap/library/accounting-team/check-out/EpuS8cX7uEsDzOwW9kkKOyGW -lease_duration 10h -lease_renewable true -password ?@09AZKh03hBORZPJcTDgLfntlHqxLy29tcQjPVThzuwWAx/Twx4a2ZcRQRqrZ1w -service_account_name fizz@example.com -``` - -If the default `ttl` for the check-out is higher than needed, set the check-out to last -for a shorter time by using: - -```shell-session -$ vault write ldap/library/accounting-team/check-out ttl=30m -Key Value ---- ----- -lease_id ldap/library/accounting-team/check-out/gMonJ2jB6kYs6d3Vw37WFDCY -lease_duration 30m -lease_renewable true -password ?@09AZerLLuJfEMbRqP+3yfQYDSq6laP48TCJRBJaJu/kDKLsq9WxL9szVAvL/E1 -service_account_name buzz@example.com -``` - -This can be a nice way to say, "Although I _can_ have a check-out for 24 hours, if I -haven't checked it in after 30 minutes, I forgot or I'm a dead instance, so you can just -check it back in." - -If no service accounts are available for check-out, Vault will return a 400 Bad Request. - -```shell-session -$ vault write -f ldap/library/accounting-team/check-out -Error writing data to ldap/library/accounting-team/check-out: Error making API request. - -URL: POST http://localhost:8200/v1/ldap/library/accounting-team/check-out -Code: 400. Errors: - -* No service accounts available for check-out. -``` - -To extend a check-out, renew its lease. - -```shell-session -$ vault lease renew ldap/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq -Key Value ---- ----- -lease_id ldap/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq -lease_duration 10h -lease_renewable true -``` - -Renewing a check-out means its current password will live longer, since passwords are rotated -anytime a password is _checked in_ either by a caller, or by Vault because the check-out `ttl` -ends. - -To check a service account back in for others to use, call: - -```shell-session -$ vault write -f ldap/library/accounting-team/check-in -Key Value ---- ----- -check_ins [fizz@example.com] -``` - -Most of the time this will just work, but if multiple service accounts are checked out by the same -caller, Vault will need to know which one(s) to check in. - -```shell-session -$ vault write ldap/library/accounting-team/check-in service_account_names=fizz@example.com -Key Value ---- ----- -check_ins [fizz@example.com] -``` - -To perform a check-in, Vault verifies that the caller _should_ be able to check in a given service account. -To do this, Vault looks for either the same [entity ID](/vault/tutorials/auth-methods/identity) -used to check out the service account, or the same client token. - -If a caller is unable to check in a service account, or simply doesn't try, -Vault will check it back in automatically when the `ttl` expires. However, if that is too long, -service accounts can be forcibly checked in by a highly privileged user through: +### OpenLDAP -```shell-session -$ vault write -f ldap/library/manage/accounting-team/check-in -Key Value ---- ----- -check_ins [fizz@example.com] -``` +- `openldap` (default) -Or, alternatively, revoking the secret's lease has the same effect. +By default, the LDAP Secret Engine assumes the entry password is stored in `userPassword`. +There are many object classes that provide `userPassword` including for example: -```shell-session -$ vault lease revoke ldap/library/accounting-team/check-out/PvBVG0m7pEg2940Cb3Jw3KpJ -All revocation operations queued successfully! -``` +- `organization` +- `organizationalUnit` +- `organizationalRole` +- `inetOrgPerson` +- `person` +- `posixAccount` -## Password generation -This engine previously allowed configuration of the length of the password that is generated -when rotating credentials. This mechanism was deprecated in Vault 1.5 in favor of -[password policies](/vault/docs/concepts/password-policies). This means the `length` field should -no longer be used. The following password policy can be used to mirror the same behavior -that the `length` field provides: +## Root credential rotation -```hcl -length= -rule "charset" { - charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -} -``` +Mounts can rotate root credential keys configured directly within the mount. +Rotating to a Vault-generated key makes the key value inaccessible to the +operator and ensures only Vault can operate as a root user to manipulate dynamic +and static credentials. -## LDAP password policy +- Schedule-based root credential rotation -The LDAP secret engine does not hash or encrypt passwords prior to modifying -values in LDAP. This behavior can cause plaintext passwords to be stored in LDAP. -To avoid having plaintext passwords stored, the LDAP server should be configured -with an LDAP password policy (ppolicy, not to be confused with a Vault password -policy). A ppolicy can enforce rules such as hashing plaintext passwords by default. -The following is an example of an LDAP password policy to enforce hashing on the -data information tree (DIT) `dc=hashicorp,dc=com`: -``` -dn: cn=module{0},cn=config -changetype: modify -add: olcModuleLoad -olcModuleLoad: ppolicy - -dn: olcOverlay={2}ppolicy,olcDatabase={1}mdb,cn=config -changetype: add -objectClass: olcPPolicyConfig -objectClass: olcOverlayConfig -olcOverlay: {2}ppolicy -olcPPolicyDefault: cn=default,ou=pwpolicies,dc=hashicorp,dc=com -olcPPolicyForwardUpdates: FALSE -olcPPolicyHashCleartext: TRUE -olcPPolicyUseLockout: TRUE -``` ## Hierarchical paths @@ -616,25 +157,51 @@ Since [Vault policies](/vault/docs/concepts/policies) are also path-based, hierarchical names also let you define policies that map 1-1 to LDAP secrets engine roles and set paths. -The following Vault API endpoints support hierarchical path handling: -- [Static roles](/vault/api-docs/secret/ldap#static-roles) -- [Static role passwords](/vault/api-docs/secret/ldap#static-role-passwords) -- [Manually rotate static role password](/vault/api-docs/secret/ldap#manually-rotate-static-role-password) -- [Dynamic roles](/vault/api-docs/secret/ldap#dynamic-roles) -- [Dynamic role passwords](/vault/api-docs/secret/ldap#dynamic-role-passwords) -- [Library set management](/vault/api-docs/secret/ldap#library-set-management) -- [Library set status check](/vault/api-docs/secret/ldap#library-set-status-check) -- [Check-Out management](/vault/api-docs/secret/ldap#check-out-management) -- [Check-In management](/vault/api-docs/secret/ldap#check-in-management) -## Tutorial +--------------------------------------------------------------------------- + + + + + +Step-by-step instructions: + +- [Set up the `ldap` plugin](/vault/docs/secrets/ldap/setup) +- [Use the `ldap` plugin with IBM RACF](/vault/docs/secrets/ldap/ibm-racf) +- [Use dynamic credentials](/vault/docs/secrets/ldap/dynamic-credentials) +- [Check out service accounts](/vault/docs/secrets/ldap/service-account-checkout) + + + + + +Short explanations for common problems: + +- [Manually rotate root credentials](/vault/docs/secrets/ldap/cookbook/rotate-root-cred) +- [Schedule root credential rotation](/vault/docs/secrets/ldap/cookbook/schedule-based-rotation) +- [Disable root credential rotation](/vault/docs/secrets/ldap/cookbook/disable-root-rotation) +- [Create static roles](/vault/docs/secrets/ldap/cookbook/create-static-roles) +- [Hash policy for LDAP passwords](/vault/docs/secrets/ldap/cookbook/hash-passwords) + + + + + + +Technical references: + +- [LDAP plugin API docs](/vault/api-docs/secret/ldap) + + + + -Refer to the [LDAP Secrets Engine](/vault/tutorials/secrets-management/openldap) -tutorial to learn how to configure and use the LDAP secrets engine. +Detailed tutorials: +- [Manage LDAP credentials with Vault](/vault/tutorials/secrets-management/openldap). +- [Implement identity entities and groups](/vault/tutorials/auth-methods/identity) -## API + -The LDAP secrets engine has a full HTTP API. Please see the [LDAP secrets engine API docs](/vault/api-docs/secret/ldap) -for more details. + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx deleted file mode 100644 index 82baed4a8d..0000000000 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/index2.mdx +++ /dev/null @@ -1,213 +0,0 @@ ---- -layout: docs -page_title: LDAP secrets engine -description: >- - Create and manage LDAP credentials with the LDAP secret engine plugin. ---- - -# LDAP secrets engine overview - -Manage static and dynamic LDAP credentials and integrate with services that -implement the LDAP v3 protocol, including OpenLDAP, Active Directory, and IBM -Resource Access Control Facility (RACF). - -Current version | Edition | Runtime | Code source ---------------- | --------- | -------- | ----------- -0.17.0 | Community | Built-in | [`hashicorp/vault-plugin-secrets-openldap`](https://github.com/hashicorp/vault-plugin-secrets-openldap) - - -## Feature summary - -- Use OpenLDAP, RACF, and Active Directory schemas. -- Use traditional 8-character passwords and modern, longer password phrases. -- Use dynamic LDAP credentials and manage LDAP user accounts through LDIF. -- Check-out service accounts with automatic password rotation. -- Map static Vault roles to LDAP credentials. -- Manually rotate LDAP passwords and root credentials. -- Automatically rotate LDAP passwords for static credentials. - - -## Overview - -@include 'rotation-manager-logging.mdx' - - -## Static credentials - -### Password rotation - -Passwords can be managed in two ways: - -- automatic time based rotation -- manual rotation - -### TTL-based static role rotation - -Passwords will automatically be rotated based on the `rotation_period` configured -in the static role (minimum of 5 seconds). When requesting credentials for a static -role, the response will include the time before the next rotation (`ttl`). - -As with the rotation manager, Vault logs rotations with reference to the -`name` of the role and `error` if the rotation failed. The logs also indicate -if the rotation was part of a `periodic function`. - -### Manual rotation - -Static roles can be manually rotated using the `rotate-role` endpoint. When manually -rotated the rotation period will start over. - -Logging for manual rotation records the same information as other rotation -logging with an additional reference that the rotation happened `on user request`. -\ ---------------------------------------------------------------------------------- - -### OpenLDAP - -- `openldap` (default) - -By default, the LDAP Secret Engine assumes the entry password is stored in `userPassword`. -There are many object classes that provide `userPassword` including for example: - -- `organization` -- `organizationalUnit` -- `organizationalRole` -- `inetOrgPerson` -- `person` -- `posixAccount` - - -## Root credential rotation - -Mounts can rotate root credential keys configured directly within the mount. -Rotating to a Vault-generated key makes the key value inaccessible to the -operator and ensures only Vault can operate as a root user to manipulate dynamic -and static credentials. - -- Schedule-based root credential rotation - - - - - -## Hierarchical paths - -The LDAP secrets engine lets you define role and set names that contain an -arbitrary number of forward slashes. Names with forward slashes define -hierarchical path structures. - -For example, you can configure two static roles with the names `org/secure` and `org/platform/dev`: - -```shell-session -$ vault write ldap/static-role/org/secure \ - username="user1" \ - rotation_period="1h" -Success! Data written to: ldap/static-role/org/secure - -$ vault write ldap/static-role/org/platform/dev \ - username="user2" \ - rotation_period="1h" -Success! Data written to: ldap/static-role/org/platform/dev -``` - -Names with hierarchical paths let you use the Vault API to query the available -roles at a specific path with arbitrary depth. Names that end with a forward -slash indicate that sub-paths reside under that path. - -For example, to list all direct children under the `org/` path: - -```shell-session -$ vault list ldap/static-role/org/ -Keys ----- -platform/ -secure -``` - -The `platform/` key also ends in a forward slash. To list the `platform` sub-keys: - -```shell-session -$ vault list ldap/static-role/org/platform -Keys ----- -dev -``` - -You can read and rotate credentials using the same role name and the respective -APIs. For example, - -```shell-session -$ vault read ldap/static-cred/org/platform/dev -Key Value ---- ----- -dn n/a -last_password a3sQ6OkmXKt2dtx22kAt36YLkkxLsg4RmhMZCLYCBCbvvv67ILROaOokdCaGPEAE -last_vault_rotation 2024-05-03T16:39:27.174164-05:00 -password ECf7ZoxfDxGuJEYZrzgzTffSIDI4tx5TojBR9wuEGp8bqUXbl4Kr9eAgPjmizcvg -rotation_period 5m -ttl 4m58s -username user2 -``` - -```shell-session -$ vault write -f ldap/rotate-role/org/platform/dev -``` - -Since [Vault policies](/vault/docs/concepts/policies) are also path-based, -hierarchical names also let you define policies that map 1-1 to LDAP secrets -engine roles and set paths. - - - ---------------------------------------------------------------------------- - - - - - -Step-by-step instructions: - -- [Set up the `ldap` plugin](/vault/docs/secrets/ldap/setup) -- [Use dynamic credentials](/vault/docs/secrets/ldap/dynamic-credentials) -- [Check out service accounts](/vault/docs/secrets/ldap/service-account-checkout) - - - - - -Short explanations for common problems: - -- [Manually rotate root credentials](/vault/docs/secrets/ldap/cookbook/rotate-root-cred) -- [Schedule root credential rotation](/vault/docs/secrets/ldap/cookbook/schedule-based-rotation) -- [Disable root credential rotation](/vault/docs/secrets/ldap/cookbook/disable-root-rotation) -- [Create static roles](/vault/docs/secrets/ldap/cookbook/create-static-roles) - - - - - -Configuration and code templates: - -- [Basic RACF configuration](/vault/docs/secrets/ldap/examples/basic-racf-config) -- [Hash policy for LDAP passwords](/vault/docs/secrets/ldap/examples/hash-passwords) - - - - - - -Technical references: - -- [LDAP plugin API docs](/vault/api-docs/secret/ldap) - - - - - -Detailed tutorials: - -- [Manage LDAP credentials with Vault](/vault/tutorials/secrets-management/openldap). -- [Implement identity entities and groups](/vault/tutorials/auth-methods/identity) - - - - \ No newline at end of file diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx index 0e8456c6cd..9f65d4c0dc 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx @@ -9,7 +9,8 @@ description: >- # Set up the LDAP secrets plugin -Use `vault secrets enable` to enable an instance of the `ldap` plugin. +Enable and configure an instance of the `ldap` plugin to use with OpenLDAP or +Active Directory. ## Before you start @@ -18,8 +19,6 @@ Use `vault secrets enable` to enable an instance of the `ldap` plugin. configure plugins in Vault. - **Create an LDAP account for Vault**. We highly recommend creating a dedicated entry management account for Vault. -- **Create a password policy**. To configure password rules for RACF, you must - have a Vault [password policy](/vault/docs/concepts/password-policies) defined. ## Step 1: Enable the LDAP secrets plugin @@ -28,75 +27,26 @@ Use `vault secrets enable` to enable an instance of the `ldap` plugin. -Use `vault secrets enable` to establish a new instance of the `ldap` plugin. By -default, Vault uses the plugin name as the mount path. To configure a custom -mount path, use the `-path` flag: - -```shell-session -$ vault secrets enable -path ldap -``` - -For example: - -```shell-session -$ vault secrets enable -path devcreds ldap -``` +@include 'ldap/enable/cli.mdx' -Make a `POST` call to -[`/sys/mounts/{mount_path}`](/vault/api-docs/system/mounts#enable-secrets-engine): - -```shell-session -$ curl \ - --request POST \ - --header "X-Vault-Token: ${VAULT_TOKEN}" \ - --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ - --data '{"type": "ldap"}' \ - ${VAULT_ADDR}/v1/sys/mounts/ -``` - -For example: - - - -```shell-session -$ curl \ - --request POST \ - --header "X-Vault-Token: ${VAULT_TOKEN}" \ - --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ - --data '{"type": "ldap"}' \ - ${VAULT_ADDR}/v1/sys/mounts/devcreds -``` - - - -`/sys/mounts/{mount_path}` does not return data on success. +@include 'ldap/enable/api.mdx' -@include 'gui-instructions/enable-secrets-plugin.mdx' - -- Select the "LDAP" plugin. - -- Enter a unique path for the plugin and set your basic plugin settings. +@include 'ldap/enable/gui.mdx' -## Step 2: Create a configuration file - -The LDAP secrets engine plugin supports the following LDAP schemas: - -- OpenLDAP (**default**) -- Active Directory -- Resource access control facility (RACF) +## Step 2: Create a plugin configuration file For easier maintenance and reuse, create a JSON file with your preferred configuration details. @@ -119,16 +69,6 @@ Use the schema enum `ad` to create a basic configuration file called @include 'ldap/example-config/ad/basic.mdx' - - - - - -Use the schema enum `racf` and the name of your password policy to create a -basic configuration file called `ldap.json`: - -@include 'ldap/example-config/racf/basic.mdx' - @@ -154,21 +94,14 @@ Apply your configuration details so Vault can communicate with your LDAP server. -![Screenshot of the schema selection screen in the Vault GUI](/img/gui/ldap/schema-selection.png) - - -@include 'gui-instructions/configure-secrets-plugin.mdx' - -- Select your LDAP schema. -- Provide the required information according to your configuration file. -- Click **Save**. +@include 'ldap/apply-config/gui.mdx' - + ## Step 4: Rotate the root password Once you connect Vault and your LDAP server, rotate the root password for the diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/updates.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/updates.mdx deleted file mode 100644 index 36ff097575..0000000000 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/updates.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -layout: docs -page_title: LDAP secrets engine release notes -description: >- - Release notes for the LDAP secrets engine plugin ---- - -# LDAP secrets engine updates - -Refer to the -[Github changelog](https://github.com/hashicorp/vault-plugin-secrets-openldap/blob/main/CHANGELOG.md) -for a full history of changes. - -## October 8, 2025 ((#2025-10-08)) - -Version | Vault requirement -------- | ----------------- -0.17.0 | 1.21.0+ - -Feature updates: - -- [GH-211](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/211): - Add event notification support -- [GH-183](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/183): - Log static and root rotations -- [GH-170](https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/170): - Add RACF passphrase support diff --git a/content/vault/v1.21.x/data/docs-nav-data.json b/content/vault/v1.21.x/data/docs-nav-data.json index 20e2e2a78e..d0c25e31d6 100644 --- a/content/vault/v1.21.x/data/docs-nav-data.json +++ b/content/vault/v1.21.x/data/docs-nav-data.json @@ -2312,17 +2312,9 @@ { "title": "LDAP", "routes": [ - { - "title": "Boo", - "path": "secrets/ldap" - }, { "title": "Overview", - "path": "secrets/ldap/index2" - }, - { - "title": "Recent updates", - "path": "secrets/ldap/updates" + "path": "secrets/ldap" }, { "title": "Basic setup", @@ -2366,19 +2358,10 @@ { "title": "Delete static roles", "path": "secrets/ldap/cookbook/delete-static-roles" - } - ] - }, - { - "title": "Examples", - "routes": [ - { - "title": "Basic RACF configuration", - "path": "secrets/ldap/examples/basic-racf-config" }, { "title": "Hash LDAP passwords", - "path": "secrets/ldap/examples/hash-passwords" + "path": "secrets/ldap/cookbook/hash-passwords" } ] } From 346317b63a930e60deef448cad771d908288a2c5 Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Fri, 21 Nov 2025 17:05:10 -0800 Subject: [PATCH 10/18] Update content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx Co-authored-by: Yoko Hyakuna --- content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx index e8b801366d..646ec5c80f 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/ibm-racf.mdx @@ -41,7 +41,7 @@ characters. -1. Create a policy configuration fil, `racf-policy.hcl`. +1. Create a policy configuration file, `racf-policy.hcl`. From 907e0759cfb50e586c0a0f8687347299b082be5c Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Fri, 21 Nov 2025 18:52:30 -0800 Subject: [PATCH 11/18] save --- .../docs/secrets/ldap/account-library.mdx | 138 +++++++++++++++ .../ldap/cookbook/account-library/checkin.mdx | 38 +++++ .../cookbook/account-library/checkout.mdx | 39 +++++ .../cookbook/account-library/extend-lease.mdx | 39 +++++ .../cookbook/account-library/revoke-lease.mdx | 37 ++++ .../disable-root-rotation.mdx | 0 .../rotate-root-creds.mdx | 0 .../schedule-based-rotation.mdx | 0 .../create-static-roles.mdx | 0 .../delete-static-roles.mdx | 0 .../rotate-static-roles.mdx | 0 .../content/docs/secrets/ldap/index.mdx | 14 ++ .../secrets/ldap/service-account-checkout.mdx | 159 ------------------ .../partials/ldap/account-checkin/api.mdx | 32 ++++ .../partials/ldap/account-checkin/cli.mdx | 26 +++ .../partials/ldap/account-checkout/api.mdx | 36 ++++ .../partials/ldap/account-checkout/cli.mdx | 34 ++++ .../partials/ldap/create-library/api.mdx | 27 +++ .../partials/ldap/create-library/cli.mdx | 17 ++ .../partials/ldap/extend-lease/api.mdx | 28 +++ .../partials/ldap/extend-lease/cli.mdx | 18 ++ .../partials/ldap/revoke-lease/api.mdx | 28 +++ .../partials/ldap/revoke-lease/cli.mdx | 18 ++ .../partials/ldap/view-library/api.mdx | 25 +++ .../partials/ldap/view-library/cli.mdx | 22 +++ content/vault/v1.21.x/data/docs-nav-data.json | 71 +++++--- 26 files changed, 667 insertions(+), 179 deletions(-) create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/account-library.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/checkin.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/checkout.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/extend-lease.mdx create mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/revoke-lease.mdx rename content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/{ => root-credentials}/disable-root-rotation.mdx (100%) rename content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/{ => root-credentials}/rotate-root-creds.mdx (100%) rename content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/{ => root-credentials}/schedule-based-rotation.mdx (100%) rename content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/{ => static-credentials}/create-static-roles.mdx (100%) rename content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/{ => static-credentials}/delete-static-roles.mdx (100%) rename content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/{ => static-credentials}/rotate-static-roles.mdx (100%) delete mode 100644 content/vault/v1.21.x/content/docs/secrets/ldap/service-account-checkout.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/account-checkin/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/account-checkin/cli.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/account-checkout/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/account-checkout/cli.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/create-library/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/create-library/cli.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/extend-lease/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/extend-lease/cli.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/revoke-lease/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/revoke-lease/cli.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/view-library/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/view-library/cli.mdx diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/account-library.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/account-library.mdx new file mode 100644 index 0000000000..02cea7e74b --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/account-library.mdx @@ -0,0 +1,138 @@ +--- +layout: docs +page_title: Create a service account library +description: >- + Create a library of LDAP service accounts that users and machines can check-out + as needed. +--- + +# Create a service account library + +Create a library of service accounts that users and machines can check out as +needed. Vault automatically rotates the account password when clients return the +service account to the library. + + +## Before you start + +- **Check your Vault permissions**. You must have permission to enable and + configure plugins in Vault. +- **You must have an LDAP plugin configured for OpenLDAP or Active Directory**. + If you do not already have an LDAP plugin enabled, follow the + [setup guide](/vault/docs/secrets/ldap/setup). +- **Create the library accounts on your LDAP server**. We highly recommend + creating a dedicated accounts for the library. + + +## Step 1: Create a library configuration file + +For easier maintenance and reuse, create a JSON file `library.json`, with the +credential library configuration details. + +```json +{ + "service_account_names": "", + "ttl": "", + "max_ttl": "", + "disable_check_in_enforcement": "false" +} +``` + +For example: + +```json +{ + "service_account_names": "fizz@example.com,buzz@example.com", + "ttl": "10h", + "max_ttl": "24h", + "disable_check_in_enforcement": "false" +} +``` + +the following configuration file: + +- defines the set of accounts in the library as `fizz@example.com` and `buzz@example.com` +- sets a default checkout time of 10 hours +- disallows renewals after 24 hours +- requires that the same Vault entity or client token checking out a service + account also be the one to check the account back into the library. + + + + If your workflow uses a clean up process such that the client returning the + service account regularly uses a different token than the client checking the + account out, set `disable_check_in_enforcement=true`. + + + + + +## Step 2: Configure the plugin + +Apply the libray configuration file to your plugin. + + + + + +@include 'ldap/create-library/cli.mdx' + + + + + +@include 'ldap/create-library/api.mdx' + + + + + + + +## Step 3: Verify the service account settings + +To verify the library settings, view the set status. + + + + + +@include 'ldap/view-library/cli.mdx' + + + + + +@include 'ldap/view-library/api.mdx' + + + + + + + +## Step 3: Test the check-out process + +To test the connection between Vault and your LDAP server, try checking out +and returning a service account. + + + + + + +@include 'ldap/account-checkout/cli.mdx' + +@include 'ldap/account-checkin/cli.mdx' + + + + + +@include 'ldap/account-checkout/api.mdx' + +@include 'ldap/account-checkin/api.mdx' + + + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/checkin.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/checkin.mdx new file mode 100644 index 0000000000..cd5ae28b13 --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/checkin.mdx @@ -0,0 +1,38 @@ +--- +layout: docs +page_title: Check in a service account +description: >- + Return a service account previously checked out from an LDAP library +--- + +# Check in a service account + +Return a service account previously checked out from a previously configured +LDAP library. + + + +- You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). +- You have [created an LDAP account library](/vault/docs/secrets/ldap/account-library). + + + + +Returing a service account to the library tells Vault to rotate the associated +password. + + + + + +@include 'ldap/account-checkin/cli.mdx' + + + + + +@include 'ldap/account-checkin/api.mdx' + + + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/checkout.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/checkout.mdx new file mode 100644 index 0000000000..521ce5b022 --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/checkout.mdx @@ -0,0 +1,39 @@ +--- +layout: docs +page_title: Check out a service account +description: >- + Check out a service account from an LDAP library +--- + +# Check out a service account + +The LDAP secrets plugin lets clients check out service accounts from a +previously configured LDAP library. + + + +- You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). +- You have [created an LDAP account library](/vault/docs/secrets/ldap/account-library). + + + + + + + + +@include 'ldap/account-checkout/cli.mdx' + +@include 'ldap/account-checkin/cli.mdx' + + + + + +@include 'ldap/account-checkout/api.mdx' + +@include 'ldap/account-checkin/api.mdx' + + + + diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/extend-lease.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/extend-lease.mdx new file mode 100644 index 0000000000..1605a4d332 --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/extend-lease.mdx @@ -0,0 +1,39 @@ +--- +layout: docs +page_title: Extend a service account lease +description: >- + Extend a service account lease to avoid rotating the associated password. +--- + +# Extend a service account lease + +The LDAP secrets plugin lets clients extend the lease for checked out service +accounts as long as the renewal does not violate the maximum TTL of the service +account. + + + +- You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). +- You have [created an LDAP account library](/vault/docs/secrets/ldap/account-library). +- You know the full lease ID for the service account from the original account + checkout. + + + +To extend a check-out so the current password lives longer, renew its lease. + + + + + +@include 'ldap/extend-lease/cli.mdx' + + + + + +@include 'ldap/extend-lease/api.mdx' + + + + diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/revoke-lease.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/revoke-lease.mdx new file mode 100644 index 0000000000..2615d6a5e7 --- /dev/null +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/revoke-lease.mdx @@ -0,0 +1,37 @@ +--- +layout: docs +page_title: Revoke a service account lease +description: >- + Force the return of a service account and rotate the associated password. +--- + +# Extend a service account lease + +The LDAP secrets plugin lets operators revoke the lease for checked out service +account to force a password rotation. + + + +- You have [set up an `ldap` plugin](/vault/docs/secrets/ldap/setup). +- You have [created an LDAP account library](/vault/docs/secrets/ldap/account-library). +- You know the full lease ID for the service account from the original account + checkout. + + + + + + + + +@include 'ldap/revoke-lease/cli.mdx' + + + + + +@include 'ldap/revoke-lease/api.mdx' + + + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/disable-root-rotation.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/root-credentials/disable-root-rotation.mdx similarity index 100% rename from content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/disable-root-rotation.mdx rename to content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/root-credentials/disable-root-rotation.mdx diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-root-creds.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/root-credentials/rotate-root-creds.mdx similarity index 100% rename from content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-root-creds.mdx rename to content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/root-credentials/rotate-root-creds.mdx diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/schedule-based-rotation.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/root-credentials/schedule-based-rotation.mdx similarity index 100% rename from content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/schedule-based-rotation.mdx rename to content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/root-credentials/schedule-based-rotation.mdx diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/create-static-roles.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/static-credentials/create-static-roles.mdx similarity index 100% rename from content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/create-static-roles.mdx rename to content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/static-credentials/create-static-roles.mdx diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/delete-static-roles.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/static-credentials/delete-static-roles.mdx similarity index 100% rename from content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/delete-static-roles.mdx rename to content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/static-credentials/delete-static-roles.mdx diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-static-roles.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/static-credentials/rotate-static-roles.mdx similarity index 100% rename from content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/rotate-static-roles.mdx rename to content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/static-credentials/rotate-static-roles.mdx diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx index 1e3c1bb0ac..0963962c29 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx @@ -32,6 +32,20 @@ Current version | Edition | Runtime | Code source @include 'rotation-manager-logging.mdx' +Use the service account functionality to create a library of service accounts +that users and machines can check out and use as needed. Vault automatically +rotates the associated password when the client checks the service account back in. + +Service accounts can be voluntarily checked in, or Vault +will check them in when their lending period (or, "ttl", in Vault's language) ends. + +The service account check-out functionality works with various [schemas](/vault/api-docs/secret/ldap#schema), +including OpenLDAP, Active Directory, and RACF. In the following usage example, the secrets +engine is configured to manage a library of service accounts in an Active Directory instance. + + + + ## Static credentials ### Password rotation diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/service-account-checkout.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/service-account-checkout.mdx deleted file mode 100644 index d6893beeea..0000000000 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/service-account-checkout.mdx +++ /dev/null @@ -1,159 +0,0 @@ -## Service account Check-Out - -Service account check-out provides a library of service accounts that can be checked out -by a person or by machines. Vault will automatically rotate the password each time a -service account is checked in. Service accounts can be voluntarily checked in, or Vault -will check them in when their lending period (or, "ttl", in Vault's language) ends. - -The service account check-out functionality works with various [schemas](/vault/api-docs/secret/ldap#schema), -including OpenLDAP, Active Directory, and RACF. In the following usage example, the secrets -engine is configured to manage a library of service accounts in an Active Directory instance. - -First we'll need to enable the LDAP secrets engine and tell it how to securely connect -to an AD server. - -```shell-session -$ vault secrets enable ldap -Success! Enabled the ad secrets engine at: ldap/ - -$ vault write ldap/config \ - binddn=$USERNAME \ - bindpass=$PASSWORD \ - url=ldaps://138.91.247.105 \ - userdn='dc=example,dc=com' -``` - -Our next step is to designate a set of service accounts for check-out. - -```shell-session -$ vault write ldap/library/accounting-team \ - service_account_names=fizz@example.com,buzz@example.com \ - ttl=10h \ - max_ttl=20h \ - disable_check_in_enforcement=false -``` - -In this example, the service account names of `fizz@example.com` and `buzz@example.com` have -already been created on the remote AD server. They've been set aside solely for Vault to handle. -The `ttl` is how long each check-out will last before Vault checks in a service account, -rotating its password during check-in. The `max_ttl` is the maximum amount of time it can live -if it's renewed. These default to `24h`, and both use [duration format strings](/vault/docs/concepts/duration-format). -Also by default, a service account must be checked in by the same Vault entity or client token that -checked it out. However, if this behavior causes problems, set `disable_check_in_enforcement=true`. - -When a library of service accounts has been created, view their status at any time to see if they're -available or checked out. - -```shell-session -$ vault read ldap/library/accounting-team/status -Key Value ---- ----- -buzz@example.com map[available:true] -fizz@example.com map[available:true] -``` - -To check out any service account that's available, simply execute: - -```shell-session -$ vault write -f ldap/library/accounting-team/check-out -Key Value ---- ----- -lease_id ldap/library/accounting-team/check-out/EpuS8cX7uEsDzOwW9kkKOyGW -lease_duration 10h -lease_renewable true -password ?@09AZKh03hBORZPJcTDgLfntlHqxLy29tcQjPVThzuwWAx/Twx4a2ZcRQRqrZ1w -service_account_name fizz@example.com -``` - -If the default `ttl` for the check-out is higher than needed, set the check-out to last -for a shorter time by using: - -```shell-session -$ vault write ldap/library/accounting-team/check-out ttl=30m -Key Value ---- ----- -lease_id ldap/library/accounting-team/check-out/gMonJ2jB6kYs6d3Vw37WFDCY -lease_duration 30m -lease_renewable true -password ?@09AZerLLuJfEMbRqP+3yfQYDSq6laP48TCJRBJaJu/kDKLsq9WxL9szVAvL/E1 -service_account_name buzz@example.com -``` - -This can be a nice way to say, "Although I _can_ have a check-out for 24 hours, if I -haven't checked it in after 30 minutes, I forgot or I'm a dead instance, so you can just -check it back in." - -If no service accounts are available for check-out, Vault will return a 400 Bad Request. - -```shell-session -$ vault write -f ldap/library/accounting-team/check-out -Error writing data to ldap/library/accounting-team/check-out: Error making API request. - -URL: POST http://localhost:8200/v1/ldap/library/accounting-team/check-out -Code: 400. Errors: - -* No service accounts available for check-out. -``` - -To extend a check-out, renew its lease. - -```shell-session -$ vault lease renew ldap/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq -Key Value ---- ----- -lease_id ldap/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq -lease_duration 10h -lease_renewable true -``` - -Renewing a check-out means its current password will live longer, since passwords are rotated -anytime a password is _checked in_ either by a caller, or by Vault because the check-out `ttl` -ends. - -To check a service account back in for others to use, call: - -```shell-session -$ vault write -f ldap/library/accounting-team/check-in -Key Value ---- ----- -check_ins [fizz@example.com] -``` - -Most of the time this will just work, but if multiple service accounts are checked out by the same -caller, Vault will need to know which one(s) to check in. - -```shell-session -$ vault write ldap/library/accounting-team/check-in service_account_names=fizz@example.com -Key Value ---- ----- -check_ins [fizz@example.com] -``` - -To perform a check-in, Vault verifies that the caller _should_ be able to check in a given service account. -To do this, Vault looks for either the same [entity ID](/vault/tutorials/auth-methods/identity) -used to check out the service account, or the same client token. - -If a caller is unable to check in a service account, or simply doesn't try, -Vault will check it back in automatically when the `ttl` expires. However, if that is too long, -service accounts can be forcibly checked in by a highly privileged user through: - -```shell-session -$ vault write -f ldap/library/manage/accounting-team/check-in -Key Value ---- ----- -check_ins [fizz@example.com] -``` - -Or, alternatively, revoking the secret's lease has the same effect. - -```shell-session -$ vault lease revoke ldap/library/accounting-team/check-out/PvBVG0m7pEg2940Cb3Jw3KpJ -All revocation operations queued successfully! -``` - - - -- [Library set management](/vault/api-docs/secret/ldap#library-set-management) -- [Library set status check](/vault/api-docs/secret/ldap#library-set-status-check) -- [Check-Out management](/vault/api-docs/secret/ldap#check-out-management) -- [Check-In management](/vault/api-docs/secret/ldap#check-in-management) \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/account-checkin/api.mdx b/content/vault/v1.21.x/content/partials/ldap/account-checkin/api.mdx new file mode 100644 index 0000000000..3cf6bf0b76 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/account-checkin/api.mdx @@ -0,0 +1,32 @@ +Make a `POST` call to +[`{mount_path}/library/{set_name}/check-out`](/vault/api-docs/secret/ldap#check-out-management) +to request a service account: + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1//library//checkout +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/devcreds/library/accounting-team/checkout +``` + + + + + +If the caller only has one account checked out, you can omit the account list +and make an empty POST call to the endpoint. + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/account-checkin/cli.mdx b/content/vault/v1.21.x/content/partials/ldap/account-checkin/cli.mdx new file mode 100644 index 0000000000..59308ec9bc --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/account-checkin/cli.mdx @@ -0,0 +1,26 @@ +Use `vault write` with the service account name and +[`{mount_path}/library/{set_name}/check-out`](/vault/api-docs/secret/ldap#check-in-management) +path to request a service account: + +```shell-session +$ vault write /library//check-in \ + service_account_names=[] +``` + +For example: + + + +```shell-session +$ vault write -f devcreds/library/accounting-team/check-in \ + service_account_names=["fizz@example.com"] +``` + + + + + +If the caller only has one account checked out, you can omit the account list +and use the `-f` flag to call the endpoint without explicit parameters. + + diff --git a/content/vault/v1.21.x/content/partials/ldap/account-checkout/api.mdx b/content/vault/v1.21.x/content/partials/ldap/account-checkout/api.mdx new file mode 100644 index 0000000000..6408adc3c5 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/account-checkout/api.mdx @@ -0,0 +1,36 @@ +Make a `POST` call to +[`{mount_path}/library/{set_name}/check-in`](/vault/api-docs/secret/ldap#check-in-management) +with the service account name to return the service account: + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data '{"service_account_names": []}' \ + ${VAULT_ADDR}/v1//library//check-in +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data '{"service_account_names": ["fizz@example.com"]}' \ + ${VAULT_ADDR}/v1/devcreds/library/accounting-team/check-in +``` + + + + + + +If the default checkout time is longer than you need, provide an explict `ttl` +value so Vault can reclaim the account sooner if it becomes abandoned for some +reason. + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/account-checkout/cli.mdx b/content/vault/v1.21.x/content/partials/ldap/account-checkout/cli.mdx new file mode 100644 index 0000000000..e219394c84 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/account-checkout/cli.mdx @@ -0,0 +1,34 @@ +Use `vault write` with the `-f` flag and +[`{mount_path}/library/{set_name}/check-out`](/vault/api-docs/secret/ldap#check-out-management) +path to request a service account: + +```shell-session +$ vault write -f /library//checkout +``` + +For example: + + + +```shell-session +$ vault write -f devcreds/library/accounting-team/checkout + +Key Value +--- ----- +lease_id devcreds/library/accounting-team/check-out/EpuS8cX7uEsDzOwW9kkKOyGW +lease_duration 10h +lease_renewable true +password ?@09AZKh03hBORZPJcTDgLfntlHqxLy29tcQjPVThzuwWAx/Twx4a2ZcRQRqrZ1w +service_account_name fizz@example.com +``` + + + + + + +If the default checkout time is longer than you need, omit the `-f` flag and +provide an explict `ttl` value so Vault can reclaim the account sooner if it +becomes abandoned for some reason. + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/create-library/api.mdx b/content/vault/v1.21.x/content/partials/ldap/create-library/api.mdx new file mode 100644 index 0000000000..3ed065e452 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/create-library/api.mdx @@ -0,0 +1,27 @@ +Make a `POST` call to +[`{mount_path}/library/{set_name}`](/vault/api-docs/secret/ldap#library-set-management) +to apply your `library.json` configuration file: + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data @library.json \ + ${VAULT_ADDR}/v1//library/ +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data @library.json \ + ${VAULT_ADDR}/v1/devcreds/library/accounting-team +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/create-library/cli.mdx b/content/vault/v1.21.x/content/partials/ldap/create-library/cli.mdx new file mode 100644 index 0000000000..98c5ac39ec --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/create-library/cli.mdx @@ -0,0 +1,17 @@ +Use `vault write` with the +[`{mount_path}/library/{set_name}`](/vault/api-docs/secret/ldap#library-set-management) +path to apply your `library.json` configuration file: + +```shell-session +$ vault write /library/ @library.json +``` + +For example: + + + +```shell-session +$ vault write devcreds/library/accounting-team @library.json +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/extend-lease/api.mdx b/content/vault/v1.21.x/content/partials/ldap/extend-lease/api.mdx new file mode 100644 index 0000000000..27ca1b980d --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/extend-lease/api.mdx @@ -0,0 +1,28 @@ +Make a `POST` call to +[`/sys/leases/renew`](/vault/api-docs/system/leases#renew-lease) +with the full lease ID of the service account to extend the lease on a service +account: + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data '{"lease_id": "/library//check-out/"}' \ + ${VAULT_ADDR}/v1/sys/leases/renew +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data '{"lease_id": "devcreds/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq"}' \ + ${VAULT_ADDR}/v1/sys/leases/renew +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/extend-lease/cli.mdx b/content/vault/v1.21.x/content/partials/ldap/extend-lease/cli.mdx new file mode 100644 index 0000000000..cea8ccbab7 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/extend-lease/cli.mdx @@ -0,0 +1,18 @@ +Use `vault lease renew` with the full lease ID of the service account +to extend the lease on a service account: + +```shell-session +$ vault lease renew \ + /library//check-out/ +``` + +For example: + + + +```shell-session +$ vault lease renew \ + devcreds/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq +``` + + diff --git a/content/vault/v1.21.x/content/partials/ldap/revoke-lease/api.mdx b/content/vault/v1.21.x/content/partials/ldap/revoke-lease/api.mdx new file mode 100644 index 0000000000..31331f13de --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/revoke-lease/api.mdx @@ -0,0 +1,28 @@ +Make a `POST` call to +[`/sys/leases/revoke`](/vault/api-docs/system/leases#revoke-lease) +with the full lease ID of the service account to extend the lease on a service +account: + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data '{"lease_id": "/library//check-out/"}' \ + ${VAULT_ADDR}/v1/sys/leases/revoke +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data '{"lease_id": "devcreds/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq"}' \ + ${VAULT_ADDR}/v1/sys/leases/revoke +``` + + diff --git a/content/vault/v1.21.x/content/partials/ldap/revoke-lease/cli.mdx b/content/vault/v1.21.x/content/partials/ldap/revoke-lease/cli.mdx new file mode 100644 index 0000000000..325e9b835d --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/revoke-lease/cli.mdx @@ -0,0 +1,18 @@ +Use `vault lease revoke` with the full lease ID of the service account +to revoke the lease on a service account: + +```shell-session +$ vault lease revoke \ + /library//check-out/ +``` + +For example: + + + +```shell-session +$ vault lease revoke \ + devcreds/library/accounting-team/check-out/0C2wmeaDmsToVFc0zDiX9cMq +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/view-library/api.mdx b/content/vault/v1.21.x/content/partials/ldap/view-library/api.mdx new file mode 100644 index 0000000000..00ccaaaba6 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/view-library/api.mdx @@ -0,0 +1,25 @@ +Make a `POST` call to +[`{mount_path}/library/{set_name}`](/vault/api-docs/secret/ldap#library-set-management) +to check the status of your library: + +```shell-session +$ curl \ + --request GET \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1//library/ +``` + +For example: + + + +```shell-session +$ curl \ + --request GET \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/devcreds/library/accounting-team +``` + + diff --git a/content/vault/v1.21.x/content/partials/ldap/view-library/cli.mdx b/content/vault/v1.21.x/content/partials/ldap/view-library/cli.mdx new file mode 100644 index 0000000000..0e12958d31 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/view-library/cli.mdx @@ -0,0 +1,22 @@ +Use `vault read` with the +[`{mount_path}/library/{set_name}`](/vault/api-docs/secret/ldap#library-set-management) +path to check the status of your library: + +```shell-session +$ vault read /library/ +``` + +For example: + + + +```shell-session +$ vault read devcreds/library/accounting-team + +Key Value +--- ----- +buzz@example.com map[available:true] +fizz@example.com map[available:true] +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/data/docs-nav-data.json b/content/vault/v1.21.x/data/docs-nav-data.json index ec433aea1d..0225883224 100644 --- a/content/vault/v1.21.x/data/docs-nav-data.json +++ b/content/vault/v1.21.x/data/docs-nav-data.json @@ -2333,35 +2333,66 @@ "path": "secrets/ldap/dynamic-credentials" }, { - "title": "Check out service accounts", - "path": "secrets/ldap/service-account-checkout" + "title": "Create a service account library", + "path": "secrets/ldap/account-library" }, { "title": "Cookbook", "routes": [ { - "title": "Manually rotate root credentials", - "path": "secrets/ldap/cookbook/rotate-root-creds" - }, - { - "title": "Schedule root credential rotation", - "path": "secrets/ldap/cookbook/schedule-based-rotation" - }, - { - "title": "Disable root credential rotation", - "path": "secrets/ldap/cookbook/disable-root-rotation" - }, - { - "title": "Create static roles", - "path": "secrets/ldap/cookbook/create-static-roles" + "title": "Root credentials", + "routes": [ + { + "title": "Manually rotate root credentials", + "path": "secrets/ldap/cookbook/root-credentials/rotate-root-creds" + }, + { + "title": "Schedule root credential rotation", + "path": "secrets/ldap/cookbook/root-credentials/schedule-based-rotation" + }, + { + "title": "Disable root credential rotation", + "path": "secrets/ldap/cookbook/root-credentials/disable-root-rotation" + } + ] }, { - "title": "Manually rotate role credentials", - "path": "secrets/ldap/cookbook/rotate-static-roles" + "title": "Static credentials", + "routes": [ + { + "title": "Create static roles", + "path": "secrets/ldap/cookbook/static-credentials/create-static-roles" + }, + { + "title": "Manually rotate role credentials", + "path": "secrets/ldap/cookbook/static-credentials/rotate-static-roles" + }, + { + "title": "Delete static roles", + "path": "secrets/ldap/cookbook/static-credentials/delete-static-roles" + } + ] }, { - "title": "Delete static roles", - "path": "secrets/ldap/cookbook/delete-static-roles" + "title": "Account checkout", + "routes": [ + { + "title": "Check out a service account", + "path": "secrets/ldap/cookbook/account-library/checkout" + }, + { + "title": "Return a service account", + "path": "secrets/ldap/cookbook/account-library/checkin" + }, + { + "title": "Extend an account lease", + "path": "secrets/ldap/cookbook/account-library/extened-lease" + }, + { + "title": "Revoce an account lease", + "path": "secrets/ldap/cookbook/account-library/revoke-lease" + } + ] }, { "title": "Hash LDAP passwords", From efac9827a0cb552582ccd1ab1c0eef677081f42c Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Mon, 24 Nov 2025 09:00:38 -0800 Subject: [PATCH 12/18] save --- .../docs/secrets/ldap/dynamic-credentials.mdx | 226 ++++++++---------- .../content/docs/secrets/ldap/index.mdx | 159 ++++-------- .../content/docs/secrets/ldap/setup.mdx | 11 + .../partials/ldap/create-dynamic-role/api.mdx | 28 +++ .../partials/ldap/create-dynamic-role/cli.mdx | 18 ++ .../partials/ldap/get-dynamic-creds/api.mdx | 25 ++ .../partials/ldap/get-dynamic-creds/cli.mdx | 27 +++ .../partials/ldap/get-role-creds/api.mdx | 2 +- .../v1.21.x/content/partials/ldap/ldif/ad.mdx | 92 +++++++ .../content/partials/ldap/ldif/openldap.mdx | 23 ++ 10 files changed, 377 insertions(+), 234 deletions(-) create mode 100644 content/vault/v1.21.x/content/partials/ldap/create-dynamic-role/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/create-dynamic-role/cli.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/get-dynamic-creds/api.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/get-dynamic-creds/cli.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/ldif/ad.mdx create mode 100644 content/vault/v1.21.x/content/partials/ldap/ldif/openldap.mdx diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx index 342ebe8232..8320cdbcc0 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx @@ -1,130 +1,116 @@ -## Dynamic credentials +--- +layout: docs +page_title: Use dynamic LDAP credentials +description: >- + Configure LDAP for dynamic credentials +--- -### Setup +# Use dynamic credentials with LDAP -Dynamic credentials can be configured by calling the `/role/:role_name` endpoint: +Use dynamic LDAP credentials and manage LDAP user accounts through LDIF. -```bash -$ vault write ldap/role/dynamic-role \ - creation_ldif=@/path/to/creation.ldif \ - deletion_ldif=@/path/to/deletion.ldif \ - rollback_ldif=@/path/to/rollback.ldif \ - default_ttl=1h \ - max_ttl=24h -``` +## Before you start + +- **Check your Vault permissions**. You must have permission to enable and + configure plugins in Vault. +- **You must have an LDAP plugin configured for OpenLDAP or Active Directory**. + If you do not already have an LDAP plugin enabled, follow the + [setup guide](/vault/docs/secrets/ldap/setup). + + + +## Step 1: Create your LDAP LDIF entries + +Vault manages LDAP accounts through LDIF entries. LDIF entries are a +base64-encoded version of the LDIF string that Vault parses and validates +against +[proper LDIF syntax](https://ldap.com/ldif-the-ldap-data-interchange-format/). + +LDIF parameters (`*_ldif`) define account templates using the +[go template](https://golang.org/pkg/text/template/) language. + + + + + + +@include 'ldap/ldif/openldap.mdx' + + --> Note: The `rollback_ldif` argument is optional, but recommended. The statements within `rollback_ldif` will be -executed if the creation fails for any reason. This ensures any entities are removed in the event of a failure. - -To generate credentials: - -```bash -$ vault read ldap/creds/dynamic-role -Key Value ---- ----- -lease_id ldap/creds/dynamic-role/HFgd6uKaDomVMvJpYbn9q4q5 -lease_duration 1h -lease_renewable true -distinguished_names [cn=v_token_dynamic-role_FfH2i1c4dO_1611952635,ou=users,dc=learn,dc=example] -password xWMjkIFMerYttEbzfnBVZvhRQGmhpAA0yeTya8fdmDB3LXDzGrjNEPV2bCPE9CW6 -username v_token_testrole_FfH2i1c4dO_1611952635 + + +@include 'ldap/ldif/ad.mdx' + + + + + + + +## Step 2: Create a Vault role configuration file + +For easier maintenance and reuse, create a JSON file `ldap-role.json`, with the +dynamic role details so Vault knows how to create an LDAP domain user account. + +We strongly recommend configuring a rollback LDIF to +ensure Vault removes any partialy created entities in the event of a failure. +Vault automatically runs the rollback statments if credential creation fails for +any reason. + +```json +{ + "creation_ldif": "@/path/to/creation.ldif", + "deletion_ldif": "@/path/to/deletion.ldif", + "rollback_ldif": "@/path/to/rollback.ldif", + "default_ttl": "1h", + "max_ttl": "24h" +} ``` + + +## Step 3: Save the Vault role + + + + + +@include 'ldap/create-dynamic-role/cli.mdx' + + + + + +include 'ldap/create-dynamic-role/api.mdx' + + + + + + + +## Step 4: Test credential generation + +Generate credentials to confirm setup: + + + + + +@include 'ldap/create-dynamic-role/cli.mdx' + + + + + +include 'ldap/create-dynamic-role/api.mdx' + + + + + The `distinguished_names` field is an array of DNs that are created from the `creation_ldif` statements. If more than one LDIF entry is included, the DN from each statement will be included in this field. Each entry in this field corresponds to a single LDIF statement. No de-duplication occurs and order is maintained. -### LDIF entries - -User account management is provided through LDIF entries. The LDIF entries may be a base64-encoded version of the -LDIF string. The string will be parsed and validated to ensure that it adheres to LDIF syntax. A good reference -for proper LDIF syntax can be found [here](https://ldap.com/ldif-the-ldap-data-interchange-format/). - -Some important things to remember when crafting your LDIF entries: - -- There should not be any trailing spaces on any line, including empty lines -- Each `modify` block needs to be preceded with an empty line -- Multiple modifications for a `dn` can be defined in a single `modify` block. Each modification needs to close - with a single dash (`-`) - -### Active directory (AD) - - - - Windows Servers hosting Active Directory include a - `lifetime period of an old password` configuration setting that lets clients - authenticate with old passwords for a specified amount of time. - - For more information, refer to the - [NTLM network authentication behavior](https://learn.microsoft.com/en-us/troubleshoot/windows-server/windows-security new-setting-modifies-ntlm-network-authentication) - guide by Microsoft. - - - -For Active Directory, there are a few additional details that are important to remember: - -To create a user programmatically in AD, you first `add` a user object and then `modify` that user to provide a -password and enable the account. - -- Passwords in AD are set using the `unicodePwd` field. This must be proceeded by two (2) colons (`::`). -- When setting a password programmatically in AD, the following criteria must be met: - - - The password must be enclosed in double quotes (`" "`) - - The password must be in [`UTF16LE` format](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/6e803168-f140-4d23-b2d3-c3a8ab5917d2) - - The password must be `base64`-encoded - - Additional details can be found [here](https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/set-user-password-with-ldifde) - -- Once a user's password has been set, it can be enabled. AD uses the `userAccountControl` field for this purpose: - - To enable the account, set `userAccountControl` to `512` - - You will likely also want to disable AD's password expiration for this dynamic user account. The - `userAccountControl` value for this is: `65536` - - `userAccountControl` flags are cumulative, so to set both of the above two flags, add up the two values - (`512 + 65536 = 66048`): set `userAccountControl` to `66048` - - See [here](https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties#property-flag-descriptions) - for details on `userAccountControl` flags - -`sAMAccountName` is a common field when working with AD users. It is used to provide compatibility with legacy -Windows NT systems and has a limit of 20 characters. Keep this in mind when defining your `username_template`. -See [here](https://docs.microsoft.com/en-us/windows/win32/adschema/a-samaccountname) for additional details. - -Since the default `username_template` is longer than 20 characters which follows the template of `v_{{.DisplayName}}_{{.RoleName}}_{{random 10}}_{{unix_time}}`, we recommend customising the `username_template` on the role configuration to generate accounts with names less than 20 characters. Please refer to the [username templating document](/vault/docs/concepts/username-templating) for more information. - -With regard to adding dynamic users to groups, AD doesn't let you directly modify a user's `memberOf` attribute. -The `member` attribute of a group and `memberOf` attribute of a user are -[linked attributes](https://docs.microsoft.com/en-us/windows/win32/ad/linked-attributes). Linked attributes are -forward link/back link pairs, with the forward link able to be modified. In the case of AD group membership, the -group's `member` attribute is the forward link. In order to add a newly-created dynamic user to a group, we also -need to issue a `modify` request to the desired group and update the group membership with the new user. - -#### Active directory LDIF example - -The various `*_ldif` parameters are templates that use the [go template](https://golang.org/pkg/text/template/) -language. A complete LDIF example for creating an Active Directory user account is provided here for reference: - -```ldif -dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab -changetype: add -objectClass: top -objectClass: person -objectClass: organizationalPerson -objectClass: user -userPrincipalName: {{.Username}}@adtesting.lab -sAMAccountName: {{.Username}} - -dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab -changetype: modify -replace: unicodePwd -unicodePwd::{{ printf "%q" .Password | utf16le | base64 }} -- -replace: userAccountControl -userAccountControl: 66048 -- - -dn: CN=test-group,OU=HashiVault,DC=adtesting,DC=lab -changetype: modify -add: member -member: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab -- -``` - - diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx index 0963962c29..d654120f23 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/index.mdx @@ -20,168 +20,92 @@ Current version | Edition | Runtime | Code source - Use OpenLDAP, RACF, and Active Directory schemas. - Use traditional 8-character passwords and modern, longer password phrases. -- Use dynamic LDAP credentials and manage LDAP user accounts through LDIF. - Check-out service accounts with automatic password rotation. - Map static Vault roles to LDAP credentials. +- Use dynamic LDAP credentials and manage LDAP user accounts through LDIF. - Manually rotate LDAP passwords and root credentials. - Automatically rotate LDAP passwords for static credentials. +- Rotate root credentials on a predefined schedule. +- Organize related credentials with hierarchical paths. -## Overview - -@include 'rotation-manager-logging.mdx' - +## Service account libraries ((#library)) Use the service account functionality to create a library of service accounts that users and machines can check out and use as needed. Vault automatically -rotates the associated password when the client checks the service account back in. - -Service accounts can be voluntarily checked in, or Vault -will check them in when their lending period (or, "ttl", in Vault's language) ends. - -The service account check-out functionality works with various [schemas](/vault/api-docs/secret/ldap#schema), -including OpenLDAP, Active Directory, and RACF. In the following usage example, the secrets -engine is configured to manage a library of service accounts in an Active Directory instance. - - - - -## Static credentials - -### Password rotation +rotates the associated password when the client checks the service account back +in. -Passwords can be managed in two ways: +Clients can voluntarily check in service accounts at any time and Vault +automatically returns the account to the library when the lending period ("ttl") +ends. -- automatic time based rotation -- manual rotation +The service account check-out functionality works with all the LDAP schemas +supported by the plugin. -### TTL-based static role rotation -Passwords will automatically be rotated based on the `rotation_period` configured -in the static role (minimum of 5 seconds). When requesting credentials for a static -role, the response will include the time before the next rotation (`ttl`). +## Credential rotation ((#rotate)) -As with the rotation manager, Vault logs rotations with reference to the -`name` of the role and `error` if the rotation failed. The logs also indicate -if the rotation was part of a `periodic function`. +For static roles, Vault automatically rotates passwords based on the configured +rotation period. When clients request credentials for a static role, Vault +includes the time before the next rotation (`ttl`) in the response. -### Manual rotation +The plugin can alsp rotate root credential keys configured directly within the +mount. Rotating to a Vault-generated key makes the key value inaccessible to the +operator and ensures only Vault can operate as a root user to manipulate dynamic +and static credentials. -Static roles can be manually rotated using the `rotate-role` endpoint. When manually -rotated the rotation period will start over. +## Logging Logging for manual rotation records the same information as other rotation logging with an additional reference that the rotation happened `on user request`. - ---------------------------------------------------------------------------------- - -### OpenLDAP - -- `openldap` (default) - -By default, the LDAP Secret Engine assumes the entry password is stored in `userPassword`. -There are many object classes that provide `userPassword` including for example: - -- `organization` -- `organizationalUnit` -- `organizationalRole` -- `inetOrgPerson` -- `person` -- `posixAccount` - - -## Root credential rotation - -Mounts can rotate root credential keys configured directly within the mount. -Rotating to a Vault-generated key makes the key value inaccessible to the -operator and ensures only Vault can operate as a root user to manipulate dynamic -and static credentials. - -- Schedule-based root credential rotation +@include 'rotation-manager-logging.mdx' +As with the rotation manager, Vault logs rotations with reference to the +name of the role and error information if the rotation failed. The logs also +indicate if the rotation was part of a periodic function. -## Hierarchical paths +## Hierarchical paths ((#ldap-paths)) -The LDAP secrets engine lets you define role and set names that contain an +The LDAP secrets plugin lets you define role and set names that contain an arbitrary number of forward slashes. Names with forward slashes define hierarchical path structures. -For example, you can configure two static roles with the names `org/secure` and `org/platform/dev`: - -```shell-session -$ vault write ldap/static-role/org/secure \ - username="user1" \ - rotation_period="1h" -Success! Data written to: ldap/static-role/org/secure - -$ vault write ldap/static-role/org/platform/dev \ - username="user2" \ - rotation_period="1h" -Success! Data written to: ldap/static-role/org/platform/dev -``` +For example, you can configure two static roles with the names `org/secure` and +`org/platform/dev`. -Names with hierarchical paths let you use the Vault API to query the available +Names with hierarchical paths let you use the plugin API to query the available roles at a specific path with arbitrary depth. Names that end with a forward slash indicate that sub-paths reside under that path. -For example, to list all direct children under the `org/` path: +For example, to list all static roles under the `org/` path, you can call the +`{mount_path}/static-role/{role_name}/` endpoint with the `org` path segment: ```shell-session $ vault list ldap/static-role/org/ + Keys ---- platform/ secure ``` -The `platform/` key also ends in a forward slash. To list the `platform` sub-keys: - -```shell-session -$ vault list ldap/static-role/org/platform -Keys ----- -dev -``` - -You can read and rotate credentials using the same role name and the respective -APIs. For example, - -```shell-session -$ vault read ldap/static-cred/org/platform/dev -Key Value ---- ----- -dn n/a -last_password a3sQ6OkmXKt2dtx22kAt36YLkkxLsg4RmhMZCLYCBCbvvv67ILROaOokdCaGPEAE -last_vault_rotation 2024-05-03T16:39:27.174164-05:00 -password ECf7ZoxfDxGuJEYZrzgzTffSIDI4tx5TojBR9wuEGp8bqUXbl4Kr9eAgPjmizcvg -rotation_period 5m -ttl 4m58s -username user2 -``` - -```shell-session -$ vault write -f ldap/rotate-role/org/platform/dev -``` - Since [Vault policies](/vault/docs/concepts/policies) are also path-based, hierarchical names also let you define policies that map 1-1 to LDAP secrets engine roles and set paths. - ---------------------------------------------------------------------------- - Step-by-step instructions: -- [Set up the `ldap` plugin](/vault/docs/secrets/ldap/setup) +- [Set up the `ldap` plugin for OpenLDAP or Active Directory](/vault/docs/secrets/ldap/setup) - [Use the `ldap` plugin with IBM RACF](/vault/docs/secrets/ldap/ibm-racf) - [Use dynamic credentials](/vault/docs/secrets/ldap/dynamic-credentials) - [Check out service accounts](/vault/docs/secrets/ldap/service-account-checkout) @@ -192,10 +116,19 @@ Step-by-step instructions: Short explanations for common problems: -- [Manually rotate root credentials](/vault/docs/secrets/ldap/cookbook/rotate-root-cred) -- [Schedule root credential rotation](/vault/docs/secrets/ldap/cookbook/schedule-based-rotation) -- [Disable root credential rotation](/vault/docs/secrets/ldap/cookbook/disable-root-rotation) -- [Create static roles](/vault/docs/secrets/ldap/cookbook/create-static-roles) +- Manage root credentials + - [Manually rotate root credentials](/vault/docs/secrets/ldap/cookbook/root-credentials/rotate-root-cred) + - [Schedule root credential rotation](/vault/docs/secrets/ldap/cookbook/root-credentials/schedule-based-rotation) + - [Disable root credential rotation](/vault/docs/secrets/ldap/cookbook/root-credentials/disable-root-rotation) +- Manage static credentials: + - [Create static roles](/vault/docs/secrets/ldap/cookbook/static-credentials/create-static-roles) + - [Manually rotate static roles](/vault/docs/secrets/ldap/cookbook/static-credentials/rotate-static-roles) + - [Delete static roles](/vault/docs/secrets/ldap/cookbook/static-credentials/delete-static-roles) +- Manage a service account library: + - [Check out a service account](/vault/docs/secrets/ldap/cookbook/account-library/checkout) + - [Check in a service account](/vault/docs/secrets/ldap/cookbook/account-library/checkin) + - [Extend a service account lease](/vault/docs/secrets/ldap/cookbook/account-library/extend-lease) + - [Revoke a service account](/vault/docs/secrets/ldap/cookbook/account-library/revoke-lease) - [Hash policy for LDAP passwords](/vault/docs/secrets/ldap/cookbook/hash-passwords) diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx index 9f65d4c0dc..9619b75773 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/setup.mdx @@ -60,6 +60,17 @@ Use the schema enum `openldap` to create a basic configuration file called @include 'ldap/example-config/openldap/basic.mdx' +By default, the LDAP secrets plugin assumes you have stored the entry password +in `userPassword`. But you can also provide provide `userPassword` using other +object classes such as: + +- `organization` +- `organizationalUnit` +- `organizationalRole` +- `inetOrgPerson` +- `person` +- `posixAccount` + diff --git a/content/vault/v1.21.x/content/partials/ldap/create-dynamic-role/api.mdx b/content/vault/v1.21.x/content/partials/ldap/create-dynamic-role/api.mdx new file mode 100644 index 0000000000..56afc2c5f9 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/create-dynamic-role/api.mdx @@ -0,0 +1,28 @@ +Make a `POST` call to +[`/{mount_path}/role/{role_name}`](/vault/api-docs/secret/ldap#create-delete-dynamic-role-configuration) +with your dynamic role configuration, `ldap-role.json`, to create a new +dynamic role entry: + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data @ldap-role.json \ + ${VAULT_ADDR}/v1//role/ +``` + +For example: + + + +```shell-session +$ curl \ + --request POST \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + --data @ldap-role.json \ + ${VAULT_ADDR}/v1/devcreds/role/developers +``` + + diff --git a/content/vault/v1.21.x/content/partials/ldap/create-dynamic-role/cli.mdx b/content/vault/v1.21.x/content/partials/ldap/create-dynamic-role/cli.mdx new file mode 100644 index 0000000000..6ea3e8b160 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/create-dynamic-role/cli.mdx @@ -0,0 +1,18 @@ +Use `vault write` with the +[`/{mount_path}/static-role`](/vault/api-docs/secret/ldap#static-roles) +path and your dynamic role configuration, `ldap-role.json`, to create a new +dynamic role entry: + +```shell-session +$ vault write /role/ @ldap-role.json +``` + +For example: + + + +```shell-session +$ vault write devcreds/role/developers @ldap-role.json +``` + + diff --git a/content/vault/v1.21.x/content/partials/ldap/get-dynamic-creds/api.mdx b/content/vault/v1.21.x/content/partials/ldap/get-dynamic-creds/api.mdx new file mode 100644 index 0000000000..4916835042 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/get-dynamic-creds/api.mdx @@ -0,0 +1,25 @@ +Make a `GET` call to +[`/{mount_path}/creds/{role_name}`](/vault/api-docs/secret/ldap#dynamic-role-passwords) +to fetch the credential information for the dynamic role: + +```shell-session +$ curl \ + --request GET \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1//creds/ +``` + +For example: + + + +```shell-session +$ curl \ + --request GET \ + --header "X-Vault-Token: ${VAULT_TOKEN}" \ + --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ + ${VAULT_ADDR}/v1/devcreds/creds/developer +``` + + diff --git a/content/vault/v1.21.x/content/partials/ldap/get-dynamic-creds/cli.mdx b/content/vault/v1.21.x/content/partials/ldap/get-dynamic-creds/cli.mdx new file mode 100644 index 0000000000..8e0c87fc93 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/get-dynamic-creds/cli.mdx @@ -0,0 +1,27 @@ +Use `vault read` with the +[`/{mount_path}/creds/{role_name}`](/vault/api-docs/secret/ldap#dynamic-role-passwords) +to fetch the credential information for the dynamic role: + +```shell-session +$ vault read /creds/ +``` + +For example: + + + +```shell-session +$ vault read devcreds/creds/developer + +Key Value +--- ----- +lease_id devcreds/creds/developer/HFgd6uKaDomVMvJpYbn9q4q5 +lease_duration 1h +lease_renewable true +distinguished_names [cn=v_token_developer_FfH2i1c4dO_1611952635,ou=users,dc=learn,dc=example] +password xWMjkIFMerYttEbzfnBVZvhRQGmhpAA0yeTya8fdmDB3LXDzGrjNEPV2bCPE9CW6 +username v_token_testrole_FfH2i1c4dO_1611952635 + +``` + + \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/get-role-creds/api.mdx b/content/vault/v1.21.x/content/partials/ldap/get-role-creds/api.mdx index b32d204484..e06c46e43c 100644 --- a/content/vault/v1.21.x/content/partials/ldap/get-role-creds/api.mdx +++ b/content/vault/v1.21.x/content/partials/ldap/get-role-creds/api.mdx @@ -19,7 +19,7 @@ $ curl \ --request GET \ --header "X-Vault-Token: ${VAULT_TOKEN}" \ --namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \ - ${VAULT_ADDR}/v1//static-role/hashicorp + ${VAULT_ADDR}/v1/devcreds/static-role/hashicorp ``` \ No newline at end of file diff --git a/content/vault/v1.21.x/content/partials/ldap/ldif/ad.mdx b/content/vault/v1.21.x/content/partials/ldap/ldif/ad.mdx new file mode 100644 index 0000000000..34e7c71cdf --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/ldif/ad.mdx @@ -0,0 +1,92 @@ + + + Windows Servers hosting Active Directory include a configuration setting that + lets clients authenticate with old passwords for a specified amount of time. + + Refer to the   + + Setting in NTLM network authentication behavior +   + guidance on learn.microsoft.com if you want to change that behavior. + + + +To create a user programmatically in Active Directory, you first `add` a user +object and then `modify` that user to provide a password using the `unicodePwd` +field and enable the account. + +Passwords entries must: + +- Start with two (2) colons (`::`). +- Be enclosed in double quotes (`" "`). +- Be writen in + [`UTF16LE` format](https://learn.microsoft.com/openspecs/windows_protocols/ms-adts/6e803168-f140-4d23-b2d3-c3a8ab5917d2). +- Use `base64`-encoding. + +Once you set the password, you can enable the account with the +[`userAccountControl`](https://learn.microsoft.com/troubleshoot/windows-server/active-directory/useraccountcontrol-manipulate-account-properties#property-flag-descriptions) +field: + +`userAccountControl` | Result +-------------------- | ----------- +`512` | Enables the account +`65536` | Disable AD password expiration for the dynamic user account + +You set `userAccountControl` flags cumulatively. For example, to enable the +account and disable password expiration, set `userAccountControl` to `66048` : + +```text +(enable + disable password) = 512 + 65536 = 66048 +``` + +If you need backward compatibility with legacy Windows NT systems, you can use +[`sAMAccountName`](https://learn.microsoft.com/windows/win32/adschema/a-samaccountname), +which has a limit of 20 characters . Keep the character limit in mind when +defining `username_template`, which typically looks like +`v_{{.DisplayName}}_{{.RoleName}}_{{random 10}}_{{unix_time}}`. + +We recommend customizing +[the username template](/vault/docs/concepts/username-templating) in your role +configuration to generate accounts with names less than 20 characters if you +need backward compatibility. + +Example LDIF file: + +```ldif +dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab +changetype: add +objectClass: top +objectClass: person +objectClass: organizationalPerson +objectClass: user +userPrincipalName: {{.Username}}@adtesting.lab +sAMAccountName: {{.Username}} + +dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab +changetype: modify +replace: unicodePwd +unicodePwd::{{ printf "%q" .Password | utf16le | base64 }} +- +replace: userAccountControl +userAccountControl: 66048 +- + +dn: CN=test-group,OU=HashiVault,DC=adtesting,DC=lab +changetype: modify +add: member +member: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab +- +``` + + + + Active Directory does not let you add dynamic users directly to groups by + modifying the `memberOf` attribute because `memberOf` is the back-link half of a + [linked attribute pair](https://learn.microsoft.com/windows/win32/ad/linked-attributes) + with the `member` attribute of a group. You can only modify the forward + attribute of a linked pair. + + To add a newly-created dynamic user to a group, you must issue a `modify` + request to the desired group and update the group membership with the new user. + + diff --git a/content/vault/v1.21.x/content/partials/ldap/ldif/openldap.mdx b/content/vault/v1.21.x/content/partials/ldap/ldif/openldap.mdx new file mode 100644 index 0000000000..aadcfca9e3 --- /dev/null +++ b/content/vault/v1.21.x/content/partials/ldap/ldif/openldap.mdx @@ -0,0 +1,23 @@ +When you craft your LDIF entries: + +- Check for, and remove, trailing spaces on any line, including empty lines. +- Make sure each `modify` block has an empty line before it and closes with a + single dash (`-`). + +You can define multiple modifications for a `dn` entry in a single `modify` +block. + +Example LDIF file: + +```ldif +dn: uid=johndoe,ou=users,dc=example,dc=com +objectClass: top +objectClass: person +objectClass: organizationalPerson +objectClass: inetOrgPerson +uid: johndoe +cn: John Doe +sn: Doe +givenName: John +mail: john.doe@example.com +``` From 5fd7af35e0297eb9a77abef92c54675cd18058b6 Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Mon, 24 Nov 2025 09:02:34 -0800 Subject: [PATCH 13/18] Apply suggestion from @yhyakuna Co-authored-by: Yoko Hyakuna --- content/vault/v1.21.x/data/docs-nav-data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/vault/v1.21.x/data/docs-nav-data.json b/content/vault/v1.21.x/data/docs-nav-data.json index 0225883224..77fe2075c7 100644 --- a/content/vault/v1.21.x/data/docs-nav-data.json +++ b/content/vault/v1.21.x/data/docs-nav-data.json @@ -2386,7 +2386,7 @@ }, { "title": "Extend an account lease", - "path": "secrets/ldap/cookbook/account-library/extened-lease" + "path": "secrets/ldap/cookbook/account-library/extend-lease" }, { "title": "Revoce an account lease", From 3bbcbea23b3f8cd3422dbc7a9a276d8de4c04f25 Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Mon, 24 Nov 2025 09:02:52 -0800 Subject: [PATCH 14/18] Apply suggestion from @yhyakuna Co-authored-by: Yoko Hyakuna --- content/vault/v1.21.x/data/docs-nav-data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/vault/v1.21.x/data/docs-nav-data.json b/content/vault/v1.21.x/data/docs-nav-data.json index 77fe2075c7..3c5f2f86e0 100644 --- a/content/vault/v1.21.x/data/docs-nav-data.json +++ b/content/vault/v1.21.x/data/docs-nav-data.json @@ -2389,7 +2389,7 @@ "path": "secrets/ldap/cookbook/account-library/extend-lease" }, { - "title": "Revoce an account lease", + "title": "Revoke an account lease", "path": "secrets/ldap/cookbook/account-library/revoke-lease" } ] From 766e44b7e17ad34881b96333a23a2962cfd23734 Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Mon, 24 Nov 2025 09:20:51 -0800 Subject: [PATCH 15/18] remove invalid language --- content/vault/v1.21.x/content/partials/ldap/ldif/ad.mdx | 2 +- content/vault/v1.21.x/content/partials/ldap/ldif/openldap.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/vault/v1.21.x/content/partials/ldap/ldif/ad.mdx b/content/vault/v1.21.x/content/partials/ldap/ldif/ad.mdx index 34e7c71cdf..a06e1a620c 100644 --- a/content/vault/v1.21.x/content/partials/ldap/ldif/ad.mdx +++ b/content/vault/v1.21.x/content/partials/ldap/ldif/ad.mdx @@ -52,7 +52,7 @@ need backward compatibility. Example LDIF file: -```ldif +```text dn: CN={{.Username}},OU=HashiVault,DC=adtesting,DC=lab changetype: add objectClass: top diff --git a/content/vault/v1.21.x/content/partials/ldap/ldif/openldap.mdx b/content/vault/v1.21.x/content/partials/ldap/ldif/openldap.mdx index aadcfca9e3..2bb556b797 100644 --- a/content/vault/v1.21.x/content/partials/ldap/ldif/openldap.mdx +++ b/content/vault/v1.21.x/content/partials/ldap/ldif/openldap.mdx @@ -9,7 +9,7 @@ block. Example LDIF file: -```ldif +```text dn: uid=johndoe,ou=users,dc=example,dc=com objectClass: top objectClass: person From bd71b9104a9e200a0775d5656ef78bb1b1f4f265 Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Mon, 24 Nov 2025 09:28:15 -0800 Subject: [PATCH 16/18] Update content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/revoke-lease.mdx Co-authored-by: Yoko Hyakuna --- .../docs/secrets/ldap/cookbook/account-library/revoke-lease.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/revoke-lease.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/revoke-lease.mdx index 2615d6a5e7..bf93d202b0 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/revoke-lease.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/cookbook/account-library/revoke-lease.mdx @@ -5,7 +5,7 @@ description: >- Force the return of a service account and rotate the associated password. --- -# Extend a service account lease +# Revoke a service account lease The LDAP secrets plugin lets operators revoke the lease for checked out service account to force a password rotation. From 7d1e945957243f8705f477781fd2b747e9e96967 Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Mon, 24 Nov 2025 09:51:29 -0800 Subject: [PATCH 17/18] Update content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx Co-authored-by: Yoko Hyakuna --- .../v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx index 8320cdbcc0..d900970143 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx @@ -82,7 +82,7 @@ any reason. -include 'ldap/create-dynamic-role/api.mdx' +@include 'ldap/create-dynamic-role/api.mdx' From 89c920c208298e6f18f6e154a9b174f82f9bdc01 Mon Sep 17 00:00:00 2001 From: Sarah Chavis <62406755+schavis@users.noreply.github.com> Date: Mon, 24 Nov 2025 09:51:36 -0800 Subject: [PATCH 18/18] Update content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx Co-authored-by: Yoko Hyakuna --- .../v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx b/content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx index d900970143..d508ec316a 100644 --- a/content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx +++ b/content/vault/v1.21.x/content/docs/secrets/ldap/dynamic-credentials.mdx @@ -104,7 +104,7 @@ Generate credentials to confirm setup: -include 'ldap/create-dynamic-role/api.mdx' +@include 'ldap/create-dynamic-role/api.mdx'