docs: fix auth section - both servers use attach identity for permissions
This commit is contained in:
parent
255986bad6
commit
92d9fec51a
31
doc/9p.md
31
doc/9p.md
|
|
@ -248,20 +248,25 @@ output here
|
|||
|
||||
---
|
||||
|
||||
## Authentication
|
||||
## Authentication and permissions
|
||||
|
||||
olliesrv does not require authentication — any client that can reach the Unix
|
||||
socket (or TCP port) can connect.
|
||||
Both servers use the identity provided at attach time for permission enforcement.
|
||||
|
||||
toolsrv requires Tauth. The protocol:
|
||||
**olliesrv** does not require Tauth (no secret exchange), but the `uname` from
|
||||
Tattach is used for standard 9P file permission checks (uid/gid/world bits).
|
||||
Files are owned by the server's user with group `agent`; any attaching client
|
||||
is added to the `agent` group, so group permission bits govern what agents can
|
||||
access.
|
||||
|
||||
1. Client sends Tauth with a shared secret as the write payload and `aname`
|
||||
identifying the agent.
|
||||
2. Server verifies the secret (first client sets it; subsequent clients must match).
|
||||
3. Server returns a session token via read on the auth fid.
|
||||
4. Client attaches using the authenticated afid.
|
||||
**toolsrv** requires Tauth. The protocol:
|
||||
|
||||
The `aname` field is used for permission enforcement — it scopes tool registry
|
||||
lookups and process ownership to the connecting agent. Currently there is no
|
||||
mechanism to prevent one agent from claiming another's identity; the scheme
|
||||
relies on all clients being spawned by olliesrv with the correct secret.
|
||||
1. Client sends Tauth with `aname` identifying the agent.
|
||||
2. Client writes the shared secret to the auth fid.
|
||||
3. Server verifies the secret (first client sets it; subsequent clients must match).
|
||||
4. Server returns a session token via read on the auth fid.
|
||||
5. Client attaches using the authenticated afid.
|
||||
|
||||
The `aname` field scopes tool registry lookups and process ownership to the
|
||||
connecting agent. Currently there is no mechanism to prevent one agent from
|
||||
claiming another's identity; the scheme relies on all clients being spawned by
|
||||
olliesrv with the correct secret.
|
||||
|
|
|
|||
Loading…
Reference in New Issue