On Wed, Oct 03, 2018 at 07:08:41PM +0200, ro...@seffner.de wrote: > > Using user or session based keys suggests me no other session/user is able > to take advantage of them. It seems to me as the following > - permissions/ACL's controls the access rights to en-/decrypted filesystem > objects > - each object (file/directory) hast o be decrypted by the keyowner before > other (permission/ACL's enabled) users can access encrypted content > Did I understand it right now?
That's about how things work right now, but the truer answer is that fscrypt was *not* designed for the use case where encrypted files which are shared between multiple users. And the keyring infrastructuer in the kernel doesn't have the concept of global keys (again because it doesn't actually make that sense from a keying perspective --- what use are keys if everyone on the system can use them, at least in the general case)? > My usecase is a crypted folder on an external storage shared by local and > remote samba users. So I have to add the decryption-key to one user an link > it to all th others. For that use case, I'd argue that fscrypt is simply not the right solution. What actually are you trying to protect? Since it's on a file server, the keys have to be available any time the file server is up. So what is your security model? Who are potential attackers, and what capabilities do they have, and what do you hope to have the file system encryption provide? Using dm-crypt to encrypt the entire file system is probably a closer match, but again, what do you hope to achieve by using encryption in the first place? If the file server has to come up automatically after a reboot, and the keys are located permanently on the file server --- what point is the encryption? Especially since CIFS/SMB doesn't have any protocol level encryption, so sending the file data unencrypted across your network is probably a **much** bigger threat than whatever security properties you might have for keeping the bits on the platter encrypted (and the key permanently installed in the server memory, if not on some server boot files). I don't have the whole story, but from what you've told me, the picture appears to be one of vault doors and paper maiche walls. Was the encryption only to provide paper-level certification for "encryption at rest" without actually trying to provide any real security? And I don't say that as a criticism; we have security theater every time we fly in airports; the security measures don't really provide *real* security, but it makes the passengers feel good, which is an important business objective for the airlines, even if it isn't really all that security relevant. :-) - Ted