-
Notifications
You must be signed in to change notification settings - Fork 19
Handle FreeBSD-style user-specific certificates for NFS #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think adding this would be a very good idea. Being able to differentiate access rights for example between several users homedirs is something that is currently missing in linux with TLS-NFS. The way FreeBSD does it afaik, is you put "username@domain" into the subjectAltName with type otherName:1.3.6.1.4.1.2238.1.1.1;UTF8 of the cert and then "username" is looked up in the passwd (or other user database) and translated to the filesystem UID. But what happens with groups and their GIDs? Would they be
I'm asking because I have a bunch of directories that are used for sharing files between user groups. I have dedicated GIDs for these and use the setgid mode in the respective directories to have all files automatically regrouped to these GIDs. I would prefer if a solution for this would still allow something like that and keep strict access controls tied to certificates between the groups. |
First, you understand of course that each NFS client uses only one certificate, because certificates here identify a peer host, not a user. So one client can't, say, use multiple certificates, one for each user. Therefore: for any one client, the server squashes all users on that client to the user identified in the client's certificate.
We'll have to ask Rick how FreeBSD manages group information. |
Yes, I understand this and this is no issue for me. I should probably have mentioned this in my usecase description. Each user is connected from one or more workstations, and one workstation is only ever used by one user at the same time. The client certificates are loaded into the workstation & decrypted with the pam framework when the user logs in.
I didn't see anything documented about GIDs in FreeBSD when skimming their docs. |
The gid list is created exactly the same way as would be done if the user were to log into the server.
Now, what I did that I am not certain is correct is...
Squashing all RPCs should be ok for NFSv4.1/4.2 using SP4_NONE, but what about |
I should note that I think NFSv4.0 as well as NFSv4.1/4.2 using However, when a NFSv4.1/4.2 client mixes RPCSEC_GSS and AUTH_SYS, |
Thanks Rick. I don't have any answers. Sounds like there needs to be some discussion on nfsv4@ietf.org. Maybe even some standards action might be helpful to resolve some of these issues so that clients and servers can interoperate securely. |
Thank you, this is exactly what I wandted to hear.
I'm not really familiar with the way NFS is implemented and the different RPC calls used, so take this with caution: I'm aware that RPC-over-TLS and the underlying NFS RPCs are different layers. But nonetheless I think you can assume that there are no clients capable of RPC-over-TLS that don't also support NFS 4.2. So from a user perspective I wouldn't see an issue if there is some option in the exports file or config for tlshd on the server that restricts mounts with userid-squashing to NFS 4.2. |
FreeBSD's RPC-with-TLS implementation supports a security policy mechanism that enables an x.509-authenticated client to tell an NFS server to squash all requests within its TLS session to a single specific user ID. The user ID is specified within the subjectAltName field of the client's certificate. We'd like to add that support to ktls-utils and the Linux kernel's RPC client and server.
The text was updated successfully, but these errors were encountered: