9.2. Deploying a Tang server
You can use a Tang server to unlock LUKS-encrypted volumes on Clevis-enabled clients automatically. In the minimalist scenario, you deploy a Tang server by installing its package and entering a single command.
Prerequisites
-
Commands that start with the
#command prompt require administrative privileges provided bysudoor root user access. For information on how to configuresudoaccess, see Enabling unprivileged users to run certain commands.
Procedure
Install the
tangpackage and its dependencies:# dnf install tangStart and enable the
tangdservice:# systemctl enable tangd.socket --nowBecause
tangduses thesystemdsocket activation mechanism, the server starts as soon as the first connection comes in. A new set of cryptographic keys is automatically generated at the first start. To perform cryptographic operations such as manual key generation, use thejoseutility as described in thejose(1)man page on your system.
Verification
On your NBDE client, verify that your Tang server works correctly by using the following command. The command must return the identical message you pass for encryption and decryption:
# echo test | clevis encrypt tang '{"url":"<tang.server.example.com:80>"}' -y | clevis decrypt test
Next steps
- For deployments on a different port than 80, see Deploying a Tang server with SELinux in enforcing mode.