Score:1

Setup SSO : openldap, kerberos, nfs(truenas) :

aq flag

Currently I am able to setup a SSO NFS setup with openldap ldap server and Truenas NFS server (with LDAP access configured). The ubuntu clients are able to use pam-mount to mount the nfs home shares. The purpose is have each LDAP users to authenticate using pam-ldap and nss-ldap and then mount the appropriate nfs home shares. The setup is working.

There are four possible approaches as I see.

Approach - 1:

a) Use no_root_squash, and sec=sys in nfs-server export (this has serious security implications) and mount /home for every user authenticated using ldap by the pam_ldap in the ubuntu client. This will enable pam_mkdir to autocreate home folders for new users, and also access other user home folders based on the permissions setup.

b) But this seem like thoroughly insecure as the client can fake the uid/gid to access the unauthorized shares including root. But without no_root_squash, auto creation of home folder in /home seem like impossible.

Approach - 2

a) Use sec=sys, root_squash in nfs export. Nfs (truenas) server has ldap access configured. Do not mount /home. Rather use pam_mount or autofs to mount only client authenticated the user home folders. This is how my current working setup is. But still the client can fake uid/gid to gain unauthorized access. But in this case auto home create wont work, it has to be done manually.

Approach - 3

a) Use sec=ldap , root_squash in nfs export. Setup ldap_pam auth in nfs server also. Does this approach provide any extra security ? As I understand, nfs_client provides nfs_server with uid/gid (which may be faked too) and even if nfs_server query the ldap server with these info, I dont see any manner in which some security can be provided. Can any one comment on this approach ? I have not tried this out as I really dont understand how this work.

Approach - 4

a) Use kerberos. sec=krb5 in nfs_server. Setup ldap_backend for kerberos. Authenticate client users using kerberos with ldap backend. Now here the traditional userPassword field of LDAP become useless, once we start using kerberos to authenticate users. So other applications like gitea, gogs etc that used ldap for authentication cannot further use ldap as userPassword field in ldap server is not in sync with the kerberos key storage field. What is the right way to proceed in this approach ? This seem like the best approach provided it does sync the passwords for traditional ldap approach and kerberos ldap backend.

Approach - 5

a) Use kerberos only to authenticate client machines and nfs server. Use traditional ldap authentication for all purpose including login/ssh other applications such as gogs etc. Is this a possibility ?

My experience with these are limited. Please help with your valuable suggestions. Ideally I want a SSO with nfs home shares with some reasonable security with openldap as my backend for all. If possible it should be as seamless as if it is not nfs shares that each user can access other user folder if permissions permit.

A simpler solution that provides reasonable security is fine enough.

-thanks tachionic

Score:0
fr flag

a) Use sec=ldap , root_squash in nfs export. Setup ldap_pam auth in nfs server also. Does this approach provide any extra security ? As I understand, nfs_client provides nfs_server with uid/gid (which may be faked too) and even if nfs_server query the ldap server with these info, I dont see any manner in which some security can be provided. Can any one comment on this approach ? I have not tried this out as I really dont understand how this work.

It doesn't because NFS does not use PAM for anything.

NFS (v4 specifically) may involve LDAP for user⇆uid lookups, as it sends usernames over the wire in stat() results, but this a) has no effect on sec=sys and b) is not done through PAM.

a) Use sec=ldap , root_squash in nfs export. Setup ldap_pam auth in nfs server also. Does this approach provide any extra security ? As I understand, nfs_client provides nfs_server with uid/gid (which may be faked too) and even if nfs_server query the ldap server with these info, I dont see any manner in which some security can be provided. Can any one comment on this approach ? I have not tried this out as I really dont understand how this work.

sec=ldap does not exist. (If it did exist, it would be something like sec=password instead of sec=ldap, in the same way that SSH doesn't have an "ldap" authentication mechanism as there is nothing LDAP-related being transferred between the client-server. However, NFS doesn't have any password-based authentication mechanism in the first place.)

a) Use kerberos. sec=krb5 in nfs_server. Setup ldap_backend for kerberos. Authenticate client users using kerberos with ldap backend. Now here the traditional userPassword field of LDAP become useless, once we start using kerberos to authenticate users. So other applications like gitea, gogs etc that used ldap for authentication cannot further use ldap as userPassword field in ldap server is not in sync with the kerberos key storage field.

For OpenLDAP, the userPassword field can be set to {SASL}user@REALM to perform pass-through authentication of "simple bind" against a Cyrus saslauthd daemon running on the server, which is able to verify the password against a Kerberos KDC (using the -a kerberos5 mode).

Remember that Kerberos is not able to authenticate users against LDAP servers; the "LDAP backend" is purely for data storage of the KDC.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.