diff options
| author | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-11-14 15:10:28 +0000 |
|---|---|---|
| committer | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-11-14 15:10:28 +0000 |
| commit | 6daec6b5d03a80af3e2496b6bf666340b3d718fd (patch) | |
| tree | 842d614ba0a5cdd72473ea0d96eb061fd8fef0f5 /docs | |
| parent | 586b0f63ef31fde987e00a305e91ee4e2136332e (diff) | |
| download | genenetwork4-6daec6b5d03a80af3e2496b6bf666340b3d718fd.tar.gz | |
log: name the person and the credential, and resolve handles from the registry
The access log said who (`user`) but not with what: with short tokens a
request can be made by a shared credential, so "which person" and "which
credential" are now separate fields -- `scheme` ("jwt" | "opaque") and,
for an opaque token, `token` (its registry handle, e.g.
`agent-ravanan-3`). Never the token or its hash, and the path still
carries no query string.
The line also gains `ts` (RFC 3339 UTC), so a redirected stderr file is
self-describing rather than relying on journald's prefix. Hand-rolled
civil-from-days rather than a new crate: one format, and no Cargo.lock
drift.
scripts/gn4-log.py reads such a log and shows it as a table with the
handle joined against tokens.sqlite: the subject as the registry has it
now (flagging a handle whose subject has been repointed), and the token's
status today -- [revoked], [expired], [unknown] -- which is how "an agent
was working at 14:02" is told apart from "an agent was working at 14:02
with a credential revoked since". It reads the registry read-only, passes
non-JSON lines through in table mode (the process log interleaves
backtraces), and offers --json and --summary for jq and for counting.
CallerSlot now carries the whole Caller (scheme, id, subject) rather than
just the subject string.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/www/SKILL.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/www/SKILL.md b/docs/www/SKILL.md index b4454ec..2fa2385 100644 --- a/docs/www/SKILL.md +++ b/docs/www/SKILL.md @@ -179,6 +179,13 @@ SQLite database, `tokens.sqlite`). - 64 characters, `gn4ai_` + 56 body characters + a 2-character checksum, from an alphabet with no look-alikes (`0/O`, `1/l/I`) — a typo is refused before the registry is asked. +- **In the log**, one JSON line per request names the person and the credential: + `{"event":"request","ts":…,"user":"zachs","scheme":"opaque","token":"agent-1"}` + — never the token or its hash. `scripts/gn4-log.py -f LOG` renders that as a + table with the handle resolved against the registry, so it shows the subject + as the registry has it now and the token's status *today* (`[revoked]`, + `[expired]`, `[unknown]`); `--json` enriches the records for `jq`, and + `--summary` counts requests per caller and credential. ### Which GEMMA endpoint: ravanan by default |
