Repository navigation
feat: hide TES backends in the service info - #401
Conversation
Add `custom.service_info.list_backends` (default: true, as before). When false, `service_info_fields()` leaves out `backends`, keeps `gateway` and reads no registries. The docs say what stays visible to signed-in users. Closes #396 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG
Reviewer's GuideThis PR adds a default-enabled Sequence diagram for filtered public service infosequenceDiagram
participant Client
participant ServiceInfo as GET /service-info
participant Config
participant Registries
participant Plugins
Client->>ServiceInfo: GET /service-info
ServiceInfo->>Config: get_custom_config(CustomConfig)
alt list_backends is true
ServiceInfo->>Registries: get_backend_list().describe()
Registries-->>ServiceInfo: backends
else list_backends is false
Note over ServiceInfo,Registries: No registry lookup
end
ServiceInfo->>Plugins: service_info_fields(plugins_url=PLUGINS_PATH)
Plugins-->>ServiceInfo: gateway
ServiceInfo-->>Client: service info with gateway and optional backends
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #401 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 23 23
Lines 2233 2238 +5
=========================================
+ Hits 2233 2238 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Linked issues
#366 feat: limit exposure of tokens and backend URLs · 1 of 3 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Limit replay of a registry token across its TES instances. | ❌ Not addressed | The PR says “Per-backend tokens moved to #397”; this diff does not change token scoping. |
| 2 | Limit exposure of backend URLs in the public service info. | ✅ Met | The new setting omits backends while retaining gateway; the default remains unchanged. |
| 3 | Warn about silent default routing when multiple TES instances are configured. | ❌ Not addressed | There is no routing warning in this diff; the PR says this point is “moot since #385”. |
#396 feat: hide TES backends in the service info · 3 of 3 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | With the setting off, omit backends but keep gateway; by default, leave behavior unchanged. |
✅ Met | The setting defaults to true; when false, service_info_fields() skips backends and still adds plugin service-info fields. |
| 2 | With the setting off, serving service info does not read registries. | ✅ Met | get_backend_list() is only called when list_backends is true; a test checks that no registry is read when false. |
| 3 | Document the setting and what it does not hide in docs/configuration.md and the 0.5.0 upgrade notes. |
✅ Met | The configuration docs explain the remaining visibility to task creators and registries; the upgrade note describes the setting and that gateway remains. |
Sourcery assessment
Approved.
Summary
Adds
custom.service_info.list_backends(default:true, today's behaviour). When it isfalse, the publicGET /service-infoleaves outbackends, keepsgateway, and reads no registries for it. Before, the only opt-out,service_info.runtime_fields: null, hid both.The default stays as it is because clients that choose backends with
gateway.backendsneed their identifiers, and registries publish verified backends anyway.docs/configuration.mdsays plainly that this hides the TES instances from anonymous callers only: any user who can create tasks still gets their identifiers from the provenance of one task, and the URLs of those tried from its tags.docs/upgrading.mdhas a note in "To version 0.5.0".This is the last open child of #366. Per-backend tokens moved to #397 (milestone
v0.6.0); the silent default routing point is moot since #385.Closes #396
Closes #366
Verification
tests/ga4gh/tes/test_backend_list.pyfailed first (noservice_infoon the config), then passed. They cover the unit level,GET /service-infothrough the app, and the default and unknown keys.coverage run -m pytest: 1189 passed, 1 skipped, 100% coverage. The 175 failures of that run all came from the library chart missing at that point; afterhelm dependency build deployment,tests/test_chart.pyandtests/test_config_examples.pygave 206 passed.tests/ga4gh/tes/test_backend_list.py,tests/test_version_mentions.py,tests/test_docs_hooks.py.ruff checkandruff format --check(0.17.3, the version of the pre-commit config),mypy pro_tes tests,mkdocs build --strict: pass.helm templatewithconfig.custom.service_info.list_backends=falserenders the setting into the config.pre-commit run --all-filesas a whole (semgrep, gitleaks, ast-grep, actionlint) and the smoke test; CI runs them.CI passed, including Lint, Test (mongomock, MongoDB 7.0), Chart, Docs, Smoke test and Scan image.Review
adversarial-reviewerandquality-reviewer, two rounds for the former. Round 1 found one medium, fixed: the docs understated what signed-in users can still see. Round 2 found one low, fixed: a link target. Also fixed: a long line in the docs.Declined review findings
test_service_info_hiddenwraps the setup in an app context, reported as unnecessary:get_custom_configneeds it there, as that test has no fixture that provides one.ServiceInfoas a class name is generic: optional per the reviewer, and it matches its neighboursTesandControllers.🤖 Generated with Claude Code
https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG
Summary by Sourcery
Allow deployments to hide TES backend listings from public service information without affecting gateway capabilities.
New Features:
custom.service_info.list_backendsto optionally omit TES backend details from the public service information while retaining gateway metadata.Enhancements:
Documentation:
Tests: