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
|
Both servers use the identity provided at attach time for permission enforcement.
|
||||||
socket (or TCP port) can connect.
|
|
||||||
|
|
||||||
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`
|
**toolsrv** requires Tauth. The protocol:
|
||||||
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.
|
|
||||||
|
|
||||||
The `aname` field is used for permission enforcement — it scopes tool registry
|
1. Client sends Tauth with `aname` identifying the agent.
|
||||||
lookups and process ownership to the connecting agent. Currently there is no
|
2. Client writes the shared secret to the auth fid.
|
||||||
mechanism to prevent one agent from claiming another's identity; the scheme
|
3. Server verifies the secret (first client sets it; subsequent clients must match).
|
||||||
relies on all clients being spawned by olliesrv with the correct secret.
|
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