linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [RFC PATCH 0/1] Create a DNS SRV record of the ID mapping domain
Date: Tue, 24 May 2016 13:43:11 -0400	[thread overview]
Message-ID: <c33c89df-ec54-fa6e-a84c-671f8a79f3c3@RedHat.com> (raw)
In-Reply-To: <D7102E5D-3328-4379-B8F2-BFDA86AAEBE4@oracle.com>



On 05/24/2016 12:20 PM, Chuck Lever wrote:
> 
> 
> So your security realm is redhat.com. Any way
> to discover that fact, either at system install
> time, or after every boot, or ... ?
Yea... put it DNS ;-) But I think the answer
is no... at least I don't know of a way. 

> 
> I think the ID mapping domain name only matters
> when you are using Kerberos? sec=sys should use
> only stringified UIDs.
Netapp filers still use name@domain strings and 
probably  Solaris servers... I think only Linux
use the stringified UIDs.


>>>
>>> How would "nfsidmap -d" work if the ID mapping
>>> domain was set via DNS?
>> I guess we would have to teach nfs4_get_default_domain()
>> to check DNS like nfs4_init_name_mapping() would.
> 
> Or both functions could use common infrastructure
> or a cached value.
Yeah.. we could make domain_from_dns() a bit smarter... 

> 
> 
>>> Would the DNS-derived ID domain name be cached
>>> somewhere?
>> Currently its stored in the global default_domain
>> variable in libnfsidmap... I think its a good
>> place for it to live. 
> 
> That means every time an application loads
> libnfsidmap, it has to retrieve the ID mapping
> domain from DNS again?
Yeah... which I didn't think it was a big deal with
rpc.idmap since its only started once... but
maybe that's not the best solution for every 
nfsidmap upcall, although the uid/gids are cached
maybe its not so bad.

> 
> What if you built a small tool that just set
> the Domain value in /etc/idmapd.conf during
> system startup?
I would hate to change something an admin has set.
I'm thinking if Domain is set in /etc/idmapd.conf
that override everything, including DNS.
 
> 
>   $ nfsidmap --txt
> 
> could retrieve it and display it,
> 
>   # nfsidmap --txt -s
> 
> could retrieve it and update idmapd.conf if
> there was a TXT record retrieved, for example.
I see what you are trying to do here... instead 
of rewriting idmapd.conf... we should probably
uses... the system that shall go nameless... systemd! ;-)

systemd could run the nfsidmap --txt command that would
create a file under /run, which is managed by the
systemd-tmpfiles package. rpcbind does something similar
to manage its warmstart up files. 

Then we could point rpc.idmap and nfsidmap to that
runtime file via the libnfsidmap interfaces. 

The problem with this is how do we expire this cache?
We would have to store the TTL to know when its time
to ping DNS again... Is the TTL returned in the DNS
query? 

> 
> Then the rest of the infrastructure would not
> have to change. Just a thought!
yeah we probably should cache but it does add 
a lot of complexity... Doesn't DNS cache things
internally? If so, would using that cache work?

steved.


  reply	other threads:[~2016-05-24 17:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 16:18 [RFC PATCH 0/1] Create a DNS SRV record of the ID mapping domain Steve Dickson
2016-05-23 16:18 ` [RFC PATCH 1/1] libnfsidmap: Query DNS for the NFSv4 ID domain Steve Dickson
2016-05-23 17:22 ` [RFC PATCH 0/1] Create a DNS SRV record of the ID mapping domain Chuck Lever
2016-05-24 16:02   ` Steve Dickson
2016-05-24 16:20     ` Chuck Lever
2016-05-24 17:43       ` Steve Dickson [this message]
2016-05-24 18:20         ` Chuck Lever
2016-05-24 19:34           ` Thomas Haynes
2016-05-24 20:57             ` Mkrtchyan, Tigran
2016-05-25 12:14           ` Steve Dickson
2016-05-25 15:25             ` Chuck Lever
2016-05-25 16:07               ` Steve Dickson
2016-05-25 16:12                 ` Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c33c89df-ec54-fa6e-a84c-671f8a79f3c3@RedHat.com \
    --to=steved@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).