Replies: 19 comments
-
@ibotty Could you be as specific as possible about your intended use case? thx! |
Beta Was this translation helpful? Give feedback.
-
Sure. I'd like to mount an encrypted stratis volume on system startup. The key should reside on the (already non-stratis, luks-encrypted) root file system. The volume is mounted via /etc/fstab. |
Beta Was this translation helpful? Give feedback.
-
Migrating to project |
Beta Was this translation helpful? Give feedback.
-
@jbaublitz, @dkeefe: Could you comment? My first thought is that such a file would be too user-specfic for Stratis to ship unconditionally. |
Beta Was this translation helpful? Give feedback.
-
If we're going to package anything, I'd much prefer packaging a service file that prompts the user for a passphrase through a general system mechanism like |
Beta Was this translation helpful? Give feedback.
-
@jbaublitz That makes sense to me. @ibotty If there is some more general solution that would also be useful to you, please let us know. |
Beta Was this translation helpful? Give feedback.
-
That systemd unit is in a way a logical successor to having It also makes it easier to start with stratis encryption. See how much easier https://fedoramagazine.org/getting-started-with-stratis-encryption/ could become with said unit: no strange systemd unit with key-setting, sleeps and mounting in one single-use unit. It could just say Honestly, I didn't think of users not realizing that when storing the key on disk, the password is only as safe as the disk. That has to be addressed prominently, of course. I don't think not including useful features is the way to go though. I'd argue that there are many use cases where it makes sense to store the key on disk.
This unit does not readily address the usecase, that a user has a usb-stick on their keychain holding the key for the stratis pool. That would work with that unit and symlinks, but I don't know whether I would support that usecase 🙃. Having said that, I am not opposed at all against asking users for their password. I don't know how to achieve that with a systemd unit alone though, because |
Beta Was this translation helpful? Give feedback.
-
@ibotty I still maintain that this unit file is not generic enough. We may eventually, for example, bump into a setup where the root filesystem is unencrypted and the assumption of this unit file is that it's always encrypted to safely use it. We have not explicitly stated that that is a requirement anywhere in our documentation so I'm not personally willing to make that a restriction for using our unit file without explicitly stating it, and it seems like a somewhat arbitrary restriction just for a unit file that we ship. If you have had success with the unit file you proposed, I absolutely encourage you to use it as it seems to work for your use case, but we have to consider all potential use cases before merging something into our code base. I am still interested in working with you on a service file that we can definitely merge to prompt users for their passphrase. I'm going to do a little bit more research into this. |
Beta Was this translation helpful? Give feedback.
-
@mulkieran I have a suggestion that ties into stratisd-min for how we can potentially deal with the D-Bus/fstab-generator ordering problem. I'll update you in stand up. |
Beta Was this translation helpful? Give feedback.
-
Oh, I did not know about That is not what I will need in any case though. I'd like to mount a stratis volume without any user interaction. Maybe the unit should be named accordingly: |
Beta Was this translation helpful? Give feedback.
-
Reading
|
Beta Was this translation helpful? Give feedback.
-
Seems very timely that the new Stratis 2.3.0 release supports Clevis/Tang. I have a tang server deployed in my network which allows me to unlock and mount my volumes automatically. I typically use Cockpit to establish the Clevis/Tang binding, but I would recommend trying the new Stratis features too! Here's a short video that highlights it's simplicity. |
Beta Was this translation helpful? Give feedback.
-
Well, that's one more way to decrypt. But, say, I don't have any other trusted devices in this network. I don't think my use case is handled by that. I appreciate stratis supporting clevis/tang though. I'd really like to try it out in an enterprise environment! Anyway, back to the point: |
Beta Was this translation helpful? Give feedback.
-
@ibotty You could use a TPM with our Clevis implementation so that is an option still. However, I'm happy to keep discussing an alternate unit file both for prompting the user and using a keyfile. If we do end up adding a keyfile service file, I'm going to request that somehow, the absolute path is encoded in the argument after the |
Beta Was this translation helpful? Give feedback.
-
The problem with having an absolute path is that right now the unit file (above) uses the convention that I don't know how to implement that. I will note though, that using an absolute path is not possible with above unit, but using a path somewhere else is indeed possible with a symbolic link. |
Beta Was this translation helpful? Give feedback.
-
I need to discuss this with the team, but I think it's unlikely that we'll include something that hard codes a path. Again, if this is something that is useful for your workflow, I encourage you to use it for your workflow independently of what we include in our main repo.
I'm not entirely sure what you mean by this, but it appears the |
Beta Was this translation helpful? Give feedback.
-
from the manpage:
from
But that's only very minor. Regarding the main point. Of course I can keep using it. I do think that having a robust unit in proper is favorable, but if you disagree, I'm ok with that as well. |
Beta Was this translation helpful? Give feedback.
-
We may be able to augment the systemd generators to handle the root filesystem case with a kernel command line parameter like |
Beta Was this translation helpful? Give feedback.
-
Dropping this from any particular project at this tim.e |
Beta Was this translation helpful? Give feedback.
-
I propose shipping and documenting the following unit that sets a key in
/etc/stratisd/<pool>.key
.Beta Was this translation helpful? Give feedback.
All reactions