I followed the following tutorial to configure nfsv4 with kerberos https://help.ubuntu.com/community/NFSv4Howto (with the difference that the NFS server is managed by zfsonlinux). Kerberos is here only used to secure the NFS mount (to prevent users to plug their own laptop on the ethernet and mount nfs with rw), users/groups/auths are managed with OpenLDAP.
I exported one of the shares with sec=krb5 and then mount it on another machine. All users should have access to files (with ownership and permissions mapped as with non-kerberos NFS/LDAP). The problem is that when listing the mount with users other than root:
$ ls /mnt/nfs/ ls: cannot open directory '/mnt/nfs/': Stale file handle
even though all users are allowed to read the folder:
$ ll /mnt/ total 25 drwxr-xr-x 3 root root 4096 Jul 22 16:05 ./ drwxr-xr-x 24 root root 4096 Jul 25 06:12 ../ drwxrwxr-x 9 root sudo 9 May 20 14:27 nfs/
and root can read it, all the files are here, and ownerships mapped properly.
$ sudo ls -la /mnt/nfs/ total 56 drwxrwxr-x 9 root sudo 9 May 20 14:27 . drwxr-xr-x 3 root root 4096 Jul 22 16:05 .. ... ...