Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[9fans] If hostid==uid, then /lib/ndb/auth is not checked.

2 views
Skip to first unread message

9n...@9netics.com

unread,
Mar 11, 2004, 11:11:39 PM3/11/04
to
In an earlier post titled "rm /lib/ndb/auth?", YAMANASHI Takeshi
reported a behavior that looks inconsistent: basically, in authsrv.c,
it appears that if the hostid and the uid in the ticket request are the
same, /lib/ndb/auth is not consulted.

Is this right? Is it working as designed?

lu...@proxima.alt.za

unread,
Mar 12, 2004, 12:32:55 AM3/12/04
to

Well, /lib/ndb/auth indicates the speaksfor relationship. Surely uid
X can be assumed to speakfor uid X?

++L

YAMANASHI Takeshi

unread,
Mar 12, 2004, 12:48:48 AM3/12/04
to
On Fri Mar 12 14:32:41 JST 2004, lu...@proxima.alt.za wrote:
> Well, /lib/ndb/auth indicates the speaksfor relationship. Surely uid
> X can be assumed to speakfor uid X?

Then, every users in a domain can start their processes on
arbitary cpu servers whose host owners aren't allowed to speak
for the user? Is this the way that the speaksfor relationship
works?

I thought the relationship can be used to restrict which users
are allowed to run their process on cpu servers. I am still
confused with the relationship... :)
--


lu...@proxima.alt.za

unread,
Mar 12, 2004, 12:57:44 AM3/12/04
to
> On Fri Mar 12 14:32:41 JST 2004, lu...@proxima.alt.za wrote:
>> Well, /lib/ndb/auth indicates the speaksfor relationship. Surely uid
>> X can be assumed to speakfor uid X?
>
> Then, every users in a domain can start their processes on
> arbitary cpu servers whose host owners aren't allowed to speak
> for the user? Is this the way that the speaksfor relationship
> works?
>
Not that I can see. To be able to execute a process on a CPU server,
you need to be authenticated on the file server that holds the
executable. If the CPU server can't speakfor you, then you are
blocked from using it.

> I thought the relationship can be used to restrict which users
> are allowed to run their process on cpu servers. I am still
> confused with the relationship... :)

I found it hard to grasp too, the mailing list archives will bear
witness of that :-) But I suspect it is simpler than one expects,
which is what confuses one. I have no doubt whatsoever that the
speakfor relationship is quite sufficient as a security measure.

++L

YAMANASHI Takeshi

unread,
Mar 12, 2004, 1:02:47 AM3/12/04
to
On Fri Mar 12 14:57:38 JST 2004, lu...@proxima.alt.za wrote:
> Not that I can see. To be able to execute a process on a CPU server,
> you need to be authenticated on the file server that holds the
> executable.

But what if the CPU server stands alone?
--


lu...@proxima.alt.za

unread,
Mar 12, 2004, 1:17:41 AM3/12/04
to
> But what if the CPU server stands alone?

At the risk of sounding facetious, it is not a CPU server, then, is
it?

If you're trying to lock out certain users from a standalone CPU
server, you must make sure that they have no presence in /adm/users.
I don't believe they will be able to access the CPU services in that
situation.

++L

YAMANASHI Takeshi

unread,
Mar 12, 2004, 1:49:47 AM3/12/04
to
On Fri Mar 12 15:17:28 JST 2004, lu...@proxima.alt.za wrote:
> If you're trying to lock out certain users from a standalone CPU
> server, you must make sure that they have no presence in /adm/users.

If users don't have their uid listed in /adm/users,
standalone cpu servers still permit them to log in.
The users' file accesses are treated as `none' in that
situation.

How shall I lock out certain users on cpu server, I wonder?
--


lu...@proxima.alt.za

unread,
Mar 12, 2004, 2:26:44 AM3/12/04
to
> How shall I lock out certain users on cpu server, I wonder?

Presumably, you have authenticated users, but you don't want them to
access one or more standalone CPU servers. Then I think you'll need
to list them in /adm/users and make sure their namespace locks them
out.

In my opinion, being aware of the users' identity is preferable to
relying on defaults, as long as the authentication and users lists are
managed together. There may be a different approach, but I'd be happy
with the above.

++L

boyd, rounin

unread,
Mar 12, 2004, 6:39:54 AM3/12/04
to
> But what if the CPU server stands alone?

Only the cheese stands alone.

David Presotto

unread,
Mar 12, 2004, 7:39:48 AM3/12/04
to
You got it.

The speaksfor relationship is used to allow a user that has
cpu'ld (or ssh'd or telnet'd...) into a cpu server to access
resources off of that cpu server. Assume you've telnet'd in
but the file server is on another machine. In order to have
any files at all to continue, your process (via the factotum
on the cpu server) must authenticate to the file server.
However the only keys in that factotum are those of the cpu
server's owner. Therefore, that owner must be able to
'speak for' you to the file server. It does that by getting
a ticket from the auth server, encrypted in the file server
owner's key, that identifies the caller as you.

Keeping people out of a machine is another problem altogether.
In our world, having a key in a host's domain is equivalent to
having access to the host. The way we lock people out of a
host is to not give them a key into its domain. We run a
number of authentication domains at the Labs for that reason.

This was a lack of forsight on my part. Putting a system in
a separate auth domain can be a pain for all the users involved.
Some flavor of ACL would be nicer; i.e. the ability to say, user
Alice can only do the following things on host X. We already
have something like that in the form of /lib/ndb/consoledb.
Perhaps we could do something similar on a per service basis,
i.e., a servicesdb that each service (or listen itself) can
consult to determine yay or nay for the service. For example,
you could make /lib/ndb/common:

tcp=cpu port=17013 uid=!presotto uid=*

That way, stand alone servers could control who cold use
its services.

I'm not sold yet on the form it should take, but I think it is
necessary.

YAMANASHI Takeshi

unread,
Mar 12, 2004, 10:13:42 AM3/12/04
to
> Only the cheese stands alone.

Nihonjin dakara, kono joke ga wakaranai.... :)
--

YAMANASHI Takeshi

unread,
Mar 12, 2004, 10:46:40 AM3/12/04
to
> Keeping people out of a machine is another problem altogether.
:
> Perhaps we could do something similar on a per service basis,
> i.e., a servicesdb that each service (or listen itself) can
> consult to determine yay or nay for the service. For example,
> you could make /lib/ndb/common:
>
> tcp=cpu port=17013 uid=!presotto uid=*

I thought of similar control, but based on the idea of tcpwrappers, like:

/lib/ndb/local:
ipnet=xxx.xx.xx.xx ipmask=xxx.xxx.xxx.xxx
permit=tcp10
permit=tcp20
deny=all

using ndb/ipquery to determine if a connection is allowed or not.
ndb is so powerful, isn't it?


P.S
Thank you for all who helped me to understand the speaksfor
relationship.
--

boyd, rounin

unread,
Mar 12, 2004, 2:09:47 PM3/12/04
to
> I thought of similar control, but based on the idea of tcpwrappers, like:

tcpwrappers was written to 'fix' the non-existant IP security.

if you don't want to listen on the port, don't listen on the port.

boyd, rounin

unread,
Mar 12, 2004, 2:12:39 PM3/12/04
to
> > Only the cheese stands alone.
>
> Nihonjin dakara, kono joke ga wakaranai.... :)

not being japanese won't help you understand the joke.

YAMANASHI Takeshi

unread,
Mar 13, 2004, 10:57:00 PM3/13/04
to
> > > Only the cheese stands alone.
> not being japanese won't help you understand the joke.

really!?... excuse me to start ask questions to understand the joke.
The cheese is a blue one?
--


boyd, rounin

unread,
Mar 13, 2004, 11:31:32 PM3/13/04
to
> really!?... excuse me to start ask questions to understand the joke.
> The cheese is a blue one?

c'est une ENIGME

Bruce Ellis

unread,
Mar 14, 2004, 4:50:43 AM3/14/04
to
someone must have a "cheese stands alone" poster,
or a picture at least. dennis might like to comment.

brucee

YAMANASHI Takeshi

unread,
Mar 14, 2004, 7:31:55 AM3/14/04
to
> > The cheese is a blue one?
> c'est une ENIGME

Since it *SOUNDS* like french, Roguefort might be it.
# Goolgle had told me what the joke is, I think ;)
--

0 new messages