diff options
| author | Pjotr <wrk@bosa.lan> | 2026-11-06 13:46:11 +0000 |
|---|---|---|
| committer | Pjotr <wrk@bosa.lan> | 2026-11-06 13:46:11 +0000 |
| commit | 108b2e13925a5ab040635a96d6c920d023b0bbad (patch) | |
| tree | c88dfcac59c08ed37c54ff81a9345caf07be2f34 /test/python/server_test_case.py | |
| parent | 59d4d073551209a00a21782f8f1bb9ce202333de (diff) | |
| download | genenetwork4-108b2e13925a5ab040635a96d6c920d023b0bbad.tar.gz | |
docs: how an AI client uses the public API, and what must not leak
docs/www/ai-instruction.md is the AI-facing page: you are handed a JWT (the operator mints it on the server's loopback interface, so there is no token endpoint on the public host and no flow for the model to follow), send it as a bearer token, and read the envelope. It covers discovery (/openapi.json, /version), the readable endpoints, search's grammar and paging cost, the public-data rule (public > 0 && confidentiality < 1, or older than five years), error classes and what to do with each, and a worked example. The operator appendix records the deployment findings from this session: * /get-test-token is now the minting route and only a loopback peer check plus proxy-header refusal keeps it off the internet -- it must not be proxied and the app must stay bound to 127.0.0.1; * POST /compute/* takes server-side file paths and is token_only, so it is an arbitrary-read/execution surface and stays internal; * the public rule is enforced per dataset for values, while metadata endpoints are token_only by design and do reveal non-public dataset records -- a decision to make, not an accident; * the index must be built with the public filter (GN4's indexer does; gn3's index-genenetwork has no WHERE clause). Verified on the current full index: the confidentiality=1 HCPPublish and the public=0 BR_U_0303_M dataset both return zero hits; * error detail can carry the database address, and tokens minted this way all carry gn-auth's development user as sub, so the audit trail is "someone with a token" until client_credentials exists.
Diffstat (limited to 'test/python/server_test_case.py')
0 files changed, 0 insertions, 0 deletions
