10.3. Configuring Attribute Encryption
Use the command line or the web console to enable and disable attribute encryption for certain attributes.
10.3.1. Enabling Encryption of an Attribute Using the Command Line
To configure that Directory Server stores, for example,
telephoneNumber
attributes in the userRoot
database AES-encrypted:
- Optionally, to encrypt existing
telephoneNumber
attributes, export the database. See Section 10.4.1, “Exporting an Encrypted Database”. - Enable AES encryption for the
telephoneNumber
attribute in theuserRoot
database:# dsconf -D "cn=Directory Manager" ldap://server.example.com backend attr-encrypt --add-attr telephoneNumber userRoot
- If you exported the database to encrypt also existing attributes, reimport the database. See Section 10.4.2, “Importing an LDIF File into an Encrypted Database”.
10.3.2. Enabling Encryption of an Attribute Using the Web Console
To configure that Directory Server stores, for example,
telephoneNumber
attributes in the database AES-encrypted:
- Optionally, to encrypt existing
telephoneNumber
attributes, export the database. See Section 10.4.1, “Exporting an Encrypted Database”. - Open the Directory Server user interface in the web console. See Section 1.4, “Logging Into Directory Server Using the Web Console”.
- Select the instance.
- Open themenu.
- Select the suffix entry.
- Open the Encrypted Attributes tab.
- Enter the name of the attribute to be encrypted.
- Click.
- If you exported the database to encrypt also existing attributes, reimport the database. See Section 10.4.2, “Importing an LDIF File into an Encrypted Database”.
10.3.3. Disabling Encryption for an Attribute Using the Command Line
To configure that Directory Server no longer stores, for example,
telephoneNumber
attributes encrypted in the userRoot
database:
- Optionally, to decrypt existing
telephoneNumber
attributes, export the database. See Section 10.4.1, “Exporting an Encrypted Database”. - Disable encryption for the
telephoneNumber
attribute in theuserRoot
database:# dsconf -D "cn=Directory Manager" ldap://server.example.com backend attr-encrypt --del-attr telephoneNumber userRoot
- If you exported the database to decrypt existing attributes, reimport the database. See Section 10.4.2, “Importing an LDIF File into an Encrypted Database”.
10.3.4. Disabling Encryption of an Attribute Using the Web Console
To configure that Directory Server stores, for example,
telephoneNumber
attributes in the database AES-encrypted:
- Optionally, to encrypt existing
telephoneNumber
attributes, export the database. See Section 10.4.1, “Exporting an Encrypted Database”. - Open the Directory Server user interface in the web console. See Section 1.4, “Logging Into Directory Server Using the Web Console”.
- Select the instance.
- Open themenu.
- Select the suffix entry.
- Open the Encrypted Attributes tab.
- Click thebutton to the right of the
telephoneNumber
attribute. - Clickto confirm.
- If you exported the database to decrypt existing attributes, reimport the database. See Section 10.4.2, “Importing an LDIF File into an Encrypted Database”.
10.3.5. General Considerations after Enabling Attribute Encryption
When you enabled encryption for data that is already in the database:
- Unencrypted data can persist in the server's database page pool backing file. To remove this data:
- Stop the instance:
# dsctl instance_name stop
- Delete the
/var/lib/dirsrv/slapd-instance_name/db/guardian
file:# rm /var/lib/dirsrv/slapd-instance_name/db/guardian
- Start the instance:
# dsctl instance_name start
- After you enabled encryption and successfully imported the data, delete the LDIF file with the unencrypted data.
- After enabling encryption, Directory Server deletes and creates a new database when reimporting the data.
- The replication log file is not encrypted. To protect this data, store it on an encrypted disk.
- Data in the server's memory (RAM) is unencrypted and can be temporarily stored in swap partitions. To protect this data, set up encrypted swap space.
Important
Even if you delete files that contain unencrypted data, this data can be restored under certain circumstances.