Clevis and Tang Documentation
After following setup instructions for a RHEL 8 tang/clevis infrastructure and everything was working (https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/system_design_guide/configuring-automated-unlocking-of-encrypted-volumes-using-policy-based-decryption_system-design-guide), I found that nearly all documentation for both tang and clevis is extremely bare-bones, only for initial setup, sometimes incorrect or vague, and doesn't every include how to verify settings. (Online and man pages and help texts.)
For example, once I've bound a luks volume to clevis using tang as a pin, there is no [easy] way to retrieve a human readable policy. (Answer the question: How many necessary and of what kind of pins can unlock this device? If it is a tang pin, then what URLs?) As such, I can show that the LUKS keyslots are in use and that those keyslots have clevis metadata, but I have no ability to decode the clevis metadata for inspection, though it must be accessible or clevis/jose would not know how to unlock the device.
Additionally, and maybe related since this all may be a documentation issue, the clevis and tang and jose man pages are woefully slim, do not define acronyms for new users ("JWE" and "PT", etc.), have actual errors in them (clevis-decrypt(1) even says that there are no parameters but the SYNOPSIS has a parameter and also references itself in the SEE ALSO section.), and are generally disorganized and have small typos. (jose-fmt(1) is nearly impossible to find parameters as they are neither alphabetized nor ordered within their [my assumption] grouped functionality, along with extra space(s) in the Overview, etc.) .
Responses
Hello Nathan,
Thank you for your feedback. Because I am the current maintainer of the RHEL7 and RHEL8 Clevis+Tang-related documentation on the Customer Portal, I am very interested in the specific feedback for that part of Clevis and Tang docs - which parts are not clear and what exactly have you found as incorrect? You can either report them here in this conversation or use the Direct Documentation Feedback (DDF) feature available for logged-in users on the Customer Portal (you can highlight a problematic part of the documentation, provide comment, and the system creates a bug in Red Hat Bugzilla automatically).
Regarding the last paragraph - I am going to notify also the current maintainer of the mentioned packages. Your specific feedback helps us to fix and improve the man pages.
Thank you.
Hi Nathan, and thanks for the feedback on the man pages. Also, thanks Mirek for pointing me to this feedback.
I just looked into the man pages of jose/jose-fmt/clevis-decrypt and I agree we can do better. The man page for jose mentions some (not all) of the used acronyms in the overview section, when listing the standards and the associated RFC documents, but as you reported, clevis man pages just throw the acronyms without much context, if any. Thanks also for catching the errors in clevis-decrypt. As for jose-fmt, I will also look into how we can reorganize the options so that they make sense/become easier to find.
Best Regards and thanks again.
Hi again, Nathan,
Here's the answers to your inquiries:
1: You are correct; to specify a custom port for tang, one should follow the approaches listed in the "Modifying existing unit files" section, in the documentation.
One way to use a custom port with tang would be the following:
1) Create an override file with
systemctl edit tang.socket
You will be presented with an empty file -- located at /etc/systemd/system/tangd.socket.d/override.conf --, which you can then add the following content:
[Socket]
ListenStream=
ListenStream=7500
2) Save the file and issue the following command:
systemctl daemon-reload
3) Check the port configured to listen with
systemctl show tangd.socket -p Listen
, to make sure you have the port configured correctly.
You should see the following output:
Listen=[::]:7500 (Stream)
Now you can go ahead and enable/start the unit. I will be working with Mirek to have the documentation updated -- thanks once more for the feedback.
2: Regarding the rotation of keys in tang, there is work ongoing upstream (https://github.com/latchset/clevis/pull/113) to provide a simple way to check whether there are rotated keys and also to regenerate such rotated keys. Feel free to follow the development in there and also feel free to report issues in there directly.
Best Regards.
Hi Nathan,
We've also updated the Deploying a Tang server procedure in the RHEL 8 Security hardening title.
Thank you again for your helpful report.
Hi Mirek,
I got an error following the guide : curl: (22) The requested URL returned error: 500 Internal Server Error
I solved the issue with chown -R tang:tang /var/db/tang
Maybe it need to be add to the procedure.
Regards, Vincent
Hi Vincent, what tang version do you have there? Also, could you be more specific about the procedure you have tried when you got the error 500 so we can review it? Thanks in advance.
I had the same 500 error on version 7.6.el8 when running the tangd-keygen it creates keys with root permissions, which the tang-show-keys gets the 500 error, change permissions to the keys as user tang resolved that step
This might be because of the known issue related to a non-default umask. This will be fixed in version 7.8 (RHEL 8.9 and 9.3).
[1] 8.8 Rel. notes - Known issues
[2] RHBZ#2188743