diff options
| author | Pjotr <wrk@bosa.lan> | 2026-11-06 22:26:21 +0000 |
|---|---|---|
| committer | Pjotr <wrk@bosa.lan> | 2026-11-06 22:26:21 +0000 |
| commit | 2af6978846121e75175bd329c3d3cdbd3cb835fb (patch) | |
| tree | 6a7afde888944a525db32b1b53d9f732846795fb /README.md | |
| parent | 9a6c5f36e4435c3f8dd04b21458e18074310e2fa (diff) | |
| download | genenetwork4-2af6978846121e75175bd329c3d3cdbd3cb835fb.tar.gz | |
ai-instruction: issue a token per user without gn-auth
The page told the operator to mint with POST /get-test-token, which is gn-auth's dev password grant and does not exist in the deployment being set up. Issuing a second user's token also had no good answer: the stub minted exactly one token per process, so a new user meant starting a throwaway instance, grabbing --token-file and killing it. So add --mint-only: mint for --subject, print, write --token-file and exit without listening. Verification only depends on the key (committed, so shared by every instance) and on iss, which now falls back to AUTH_SERVER_URL -- a token minted this way verifies against the long-running stub untouched. * scripts/gn-auth-stub.py (main): --mint-only; --issuer defaults to AUTH_SERVER_URL before the port-derived default. Docstring says how a second user's token is issued. * docs/www/ai-instruction.md (1. Get a token): the operator's command is the stub, not /get-test-token; the token lasts whatever --expires-in said rather than an hour, and there is no early revocation. (4. What is public): minting is operator-side. Appendix: "Token issuance" rewritten around the stub -- public-data-only, expiry as the only revocation, sub as attribution, one token per user -- with gn-auth kept as what replaces it later; the stub is no longer listed as a dev leftover to delete, but as the auth server that must never be routed publicly. * README.md (Tests): mention --mint-only next to the stub's other flags.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/README.md b/README.md index f3079d1..7f7ea83 100644 --- a/README.md +++ b/README.md @@ -1721,6 +1721,10 @@ Python suite 94 tests, OK, no skips. and flags, not trait data, and are not gated on fine-grained authorisation. + `--mint-only` mints for one subject and exits without listening: how a + token is issued for one more user without disturbing the running stub + (see docs/www/ai-instruction.md, "Token issuance"). + `--expires-in` sets the token's lifetime (`30d`, `24h`, `60m`, or plain seconds; default 24h). A month-long one is fine because the stub's key is fixed and never rotates: nothing invalidates the token |
