IBM Db2
Note
Vault supports IBM Db2 credential management using the LDAP secrets engine.
Access to Db2 is managed by facilities that reside outside the Db2 database system. By default, user authentication is completed by a security facility that relies on operating system based authentication of users and passwords. This means that the lifecycle of user identities in Db2 aren't capable of being managed using SQL statements and Vault's database secrets engine.
To provide flexibility in accommodating authentication needs, Db2 ships with authentication plugin modules for Lightweight Directory Access Protocol (LDAP). This enables the Db2 database manager to authenticate users and obtain group membership defined in an LDAP directory, removing the requirement that users and groups be defined to the operating system.
Vault's LDAP secrets engine can be used to manage the lifecycle of credentials for Db2 environments that have been configured to delegate user authentication and group membership to an LDAP server. You can use either dynamic credentials or static credentials with the LDAP secrets engine.
Before you start
The architecture for implementing this solution is highly context dependent. The assumptions made in this guide help to provide a practical example of how this could be configured.
Be sure to read the IBM LDAP plugin documentation to understand the tradeoffs and security implications.
The setup presented in this guide makes the following assumptions:
Db2 is configured to authenticate users from an LDAP server using the server authentication plugin module.
Db2 is configured to retrieve group membership from an LDAP server using the group lookup plugin module.
The LDAP directory information tree (DIT) has the following structure:
IBMLDAPSecurity.ini
is updated to match the LDAP server configuration.
Setup
Enable the LDAP secrets engine.
Configure the LDAP secrets engine.
Write a template file that defines how to create LDAP users.
This file will be used by Vault to create LDAP users when credentials are requested.
Write a template file that defines how to delete LDAP users.
This file will be used by Vault to delete LDAP users when the credentials are revoked.
Create a Vault role that includes
creation.ldif
anddeletion_rollback.ldif
Usage
Generate dynamic credentials using the Vault dynamic
role.
Successful output:
Use the dynamic credentials to connect to Db2.
Tutorial
Refer to the LDAP Secrets Engine 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 for more details.