Skip to content

feat: browse services from a registry #40

Closed

Description

@uniqueg

Why?

Krini picks the TES and WES services it talks to from a GA4GH Service Registry, e.g. a Cloud Registry. Registry entries aren't trusted by default: anyone who can log in to the registry can register a service, and an entry pointing at a malicious endpoint would receive tasks, input locations and the user's access token. So Krini must use only entries that the registry's admins have verified, and only over https.

Current state (rewrite-nextjs at ff1b0a0):

  • src/app/api/tasks/get-tes-servers/route.ts calls ${CLOUD_REGISTRY_URL}/services with the user's access token and returns the raw list. Reads of the Cloud Registry are public and ignore tokens, so the token is exposed for nothing; and logged-out users get a "Login to fetch TES servers" error (tes-server-list.tsx), although anonymous visitors should be able to browse.
  • The list isn't filtered: all types (TES, WES, registries, ...), unverified entries, http URLs and every environment end up in the TES selector (src/types/tasks.d.ts already has the fields).
  • The WES pages use a hard-coded URL (ecc-wes-run-wrapper.tsx).

How?

  1. Configuration (runtime, server side): the registry's base URL (e.g. KRINI_REGISTRY_URL, must be https; it is the trust anchor and never comes from user input), the accepted environment values (empty = all), the accepted API versions per type (e.g. TES 1.0, 1.1; WES 1.0, 1.1; prefix match 1.1 → 1.1.0, not 1.10), and the cache interval.
  2. Server-side registry client (Next.js route handler or server module), reading without a token:
    • GET /services and GET /verifications (Cloud Registry extension; {service_id, url, type, verified_at}).
    • Keep only entries that are verified, where the verification's url and type still match the entry (a verification is dropped when either changes, but check anyway), with type org.ga4gh tes or wes and an accepted version and environment.
    • Keep only https URLs without user info. Optionally (config, default on) drop hosts that resolve to private, loopback or link-local addresses.
    • A registry without /verifications yields no services (log an error); unverified entries are never offered.
    • Cache the filtered lists (default 300 s), keep the last good list when the registry is unreachable, retry after ≤ 30 s.
    • Optional setting for deployments that require login for reads (Cloud Registry's login-for-reads recipe): send the user's token only then; off by default.
  3. Service info: fetch GET /service-info of each listed service (cached), to show name, organization, version, supported workflow types (WES) and, for gateways, the public capabilities (see "Gateways" below).
  4. Browse view for everyone, without login: a "Services" page listing TES and WES services (name, organization, type and version, environment, "verified" badge, service-info details). This is the read-only part of the anonymous tier.
  5. One source for both selectors: the TES and WES issues use this list; remove the WES hard-coded URL and the TES "TEST SERVER" default (dev-only setting at most, see the TES issue).
  6. Gateways: a gateway (e.g. proTES) is registered as a TES like any backend. If its public /service-info advertises gateway capabilities (an extension field, e.g. gateway), mark it as a gateway in the list and allow an operator setting for the preselected service (by registry ID). Don't hard-code any service.

Acceptance criteria

  • Logged-out visitors can browse the services page; no registry request carries an Authorization header (unless the login-for-reads option is set).
  • Unverified entries, http URLs, wrong types, versions or environments never appear in any selector (unit tests with a fixture registry).
  • With the registry down, the last good list is served; on a cold start, an empty list and a clear message.
  • No registry URL, service URL or identity provider is hard-coded; configuration is documented.

Dependencies: none. Cloud Registry ≥ 0.4.0 (public reads, /verifications).

Activity

  1. added
    priority: high
    type: feature
    type: security
    workload: days
    ecp-wp4: M4.4
    on Oct 24, 2026
  2. moved this from Backlog to Ready in ELIXIR On-Cloudon Oct 24, 2026
  3. AnonymousXC commented on Nov 11, 2026

    @AnonymousXC
    Contributor

    Since staging will become the new dev branch once the rewrite is complete, we'll use the rewrite PR to track the ongoing work.

    For easier tracking and to avoid splitting discussions across multiple issues, I'm closing this issue in favour of the rewrite PR:

  4. added this to the v0.1.0 milestone on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ecp-wp4: M4.4priority: hightype: featuretype: securityworkload: days

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions