zfsprops(7): attempt to clarify the keylocation description #17742
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
In trying to scope out how I might be able to incorporate a TPM into a new pool design, it wasn't very clear how I might be able to fit the pieces together to minimize the amount of hacking I might need to do on ZFS itself. The biggest source of confusion for me, personally, was the description of keylocation (and that "prompt" is maybe not the best name; something like 'adhoc' would have probably been vague enough for me to realize immediately that it wasn't just an interactive thing, prompting is only half of the actual behavior. 'adhoc' is also not a great name so I'm not even proposing anything there). The end result is that I think all of the pieces are there for me to have something wrap
zfs load-key
that derives a key from the TPM and passes it along with keylocation=prompt, but it seems worth restructuring the description a bit to make it more obvious that this would work.Description
The current description is somewhat difficult to parse through, and in some cases is a little unclear as to the behavior.
Split it into a paragraphs based on the three distinct behaviors you may get: prompt, file URL, HTTP(S) URL. The descriptions of the file and HTTP(s) behavior seems fine, but prompt is a little vague- expand on it and make it clear that the behavior is actively based on whether the inquisitor of key-data is provided with a tty for stdin or not.
Also clarify why one shouldn't "place keys which should be kept secret on the command line" and note that you have to supply the key via stdin if it's a raw key, just to be sure.
How Has This Been Tested?
I read it again after a shallow dive into libzfs_crypto to confirm the behavior.
Types of changes
Checklist:
Signed-off-by
.