diff options
| author | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-10-04 13:32:08 +0000 |
|---|---|---|
| committer | Pjotr <wrk@bosa.lan> | 2026-10-04 13:32:08 +0000 |
| commit | 21c69c1051715e6964fe9d4c8e06a326344fe6eb (patch) | |
| tree | 5e8fbf9892de09c9d095ae32c39de2e149195292 /docs | |
| parent | dfbf105652140d52e50a96853f0a7ab91fec0776 (diff) | |
| download | genenetwork4-21c69c1051715e6964fe9d4c8e06a326344fe6eb.tar.gz | |
Gate GET /datasets/{dataset}/probesets/{probeset}/values on gn-auth
Same treatment as dataset_probeset_info: require a valid AuthToken unconditionally, and for a dataset that isn't publicly readable, check group:resource:view-resource via authorise_trait -- denied is a 403, gn-auth unreachable is a 502. Unify DatasetProbesetLookup/DatasetProbesetInfoLookup back into one generic enum (with the new Forbidden variant) now that both dataset_probeset_info and dataset_probeset_values need it, rather than keeping two near-identical enums. tests/dataset_probeset_values.rs and its Python mirror gain the same 401/403 cases as dataset_probeset_info's, run against a real gn-auth instance; the 403 case reuses UTHSC_BXD_Cochlea_0225, confirmed to have both ProbeSet metadata and ProbeSetData values rows so the test exercises the authorization check rather than ProbesetNotFound. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDDpXvZBQat9uSgDeEMJ8d
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/gn-auth.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/gn-auth.md b/docs/gn-auth.md index c33dc54..ab07d72 100644 --- a/docs/gn-auth.md +++ b/docs/gn-auth.md @@ -247,9 +247,9 @@ failure. - `tests/auth.rs` runs all of this against a real gn-auth instance (set `GN4_TEST_AUTH_TOKEN`/`GN4_TEST_RESOURCE_ID`; skips otherwise). -### Wired into a route: `GET /datasets/{dataset}/probesets/{probeset}` +### Wired into routes: `GET /datasets/{dataset}/probesets/{probeset}` and its `/values` sibling -This is the first (and so far only) endpoint gated this way: +These are the two endpoints gated this way so far, both the same way: - An `AuthToken` is required unconditionally -- every caller needs a valid token, even for public data. @@ -261,8 +261,8 @@ This is the first (and so far only) endpoint gated this way: probeset both exist, the caller just isn't allowed to see them. - A failure to reach/parse gn-auth's answer is a 502, distinct from a 403 (denied) or a 500 (this service's own database error) -- see - `tests/dataset_probeset_info.rs` for all of these cases exercised - against a real gn-auth instance. + `tests/dataset_probeset_info.rs`/`tests/dataset_probeset_values.rs` + for all of these cases exercised against a real gn-auth instance. Which other endpoints should require a token, and which privilege each should check, remains a separate decision, not yet made here. |
