Search

10.3. Configuring Attribute Encryption

download PDF
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:
  1. Optionally, to encrypt existing telephoneNumber attributes, export the database. See Section 10.4.1, “Exporting an Encrypted Database”.
  2. Enable AES encryption for the telephoneNumber attribute in the userRoot database:
    # dsconf -D "cn=Directory Manager" ldap://server.example.com backend attr-encrypt --add-attr telephoneNumber userRoot
  3. 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:
  1. Optionally, to encrypt existing telephoneNumber attributes, export the database. See Section 10.4.1, “Exporting an Encrypted Database”.
  2. Open the Directory Server user interface in the web console. See Section 1.4, “Logging Into Directory Server Using the Web Console”.
  3. Select the instance.
  4. Open the Database menu.
  5. Select the suffix entry.
  6. Open the Encrypted Attributes tab.
  7. Enter the name of the attribute to be encrypted.
  8. Click Add Attribute.
  9. 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:
  1. Optionally, to decrypt existing telephoneNumber attributes, export the database. See Section 10.4.1, “Exporting an Encrypted Database”.
  2. Disable encryption for the telephoneNumber attribute in the userRoot database:
    # dsconf -D "cn=Directory Manager" ldap://server.example.com backend attr-encrypt --del-attr telephoneNumber userRoot
  3. 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:
  1. Optionally, to encrypt existing telephoneNumber attributes, export the database. See Section 10.4.1, “Exporting an Encrypted Database”.
  2. Open the Directory Server user interface in the web console. See Section 1.4, “Logging Into Directory Server Using the Web Console”.
  3. Select the instance.
  4. Open the Database menu.
  5. Select the suffix entry.
  6. Open the Encrypted Attributes tab.
  7. Click the Delete Attribute button to the right of the telephoneNumber attribute.
  8. Click Yes to confirm.
  9. 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:
    1. Stop the instance:
      # dsctl instance_name stop
    2. Delete the /var/lib/dirsrv/slapd-instance_name/db/guardian file:
      # rm /var/lib/dirsrv/slapd-instance_name/db/guardian
    3. 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.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.