Repository navigation
Description
Why?
The dashboard will use ELIXIR Cloud Components to talk to TES and WES (elixir-cloud-aai/tes-dashboard#31, elixir-cloud-aai/tes-dashboard#32). Those calls must carry the user's LS Login access token (elixir-cloud-aai/tes-dashboard#34). Currently no package in packages/ can send an Authorization header:
@elixir-cloud/wes(packages/ecc-client-ga4gh-wes, 2.0.0-alpha):RestWesProvidercallsfetch()with no auth headers. The components accept a customprovider(WesProviderinterface), so a consumer could subclass, but there is no built-in way to inject a token.@elixir-cloud/tes(packages/ecc-client-ga4gh-tes, 1.0.1, still on the older architecture):src/API/Task/tesGet.tsand thepostTaskpath call the API directly with only abaseURLproperty.
Without this, the components cannot be used against any authenticated deployment. That includes proTES once elixir-cloud-aai/protes#201 enables bearer validation, as well as WESkit and Conquest.
How?
-
Agree on the API surface in this issue before coding. Suggested options:
- (a) an optional
headers/getAuthHeaders: () => Promise<Record<string,string>>constructor option on the REST providers, so tokens can be refreshed per request; - (b) an optional
fetchoverride.
Recommendation: (a), with a callback so expiring tokens are handled by the host app.
- (a) an optional
-
WES: add it to
RestWesProviderand thread it throughecc-client-ga4gh-wes-runs,-run, and-run-create. Add a matching property, e.g.authToken/headers(attribute: false), for consumers that don't construct providers themselves. -
TES: add the equivalent to the functions in
src/API/Task/*.tsand theruns/create-runcomponents. If this turns out to be cleaner after migrating TES to the provider pattern, do Cloud Components: migrate@elixir-cloud/testo the v2 provider architecture #443 first. -
Apply the same pattern to the other v2 packages (service-registry, trs, drs) if cheap. It is not required for this issue.
-
Tests: unit tests asserting the header is sent. Update the docs app (
apps/documentation) with an example. -
Release new versions so that the dashboard can consume them.
Acceptance criteria
- A consumer can supply a bearer token (static or via callback) to the TES and WES components, and it is sent on every request.
- Without a token, behaviour is unchanged (backwards compatible).
- Tests and docs are updated, and a release is published to npm.
Dependencies: none. #443 is optional and may be done first.
Part of the ELIXIR Compute Platform WP4 sprint (M&Ds due end of December 2026).
If you want to work on this issue:
- Assign yourself (if someone is already assigned, ask them first or pick another one)
- Move the issue to "In progress" on the project board
- Start working 🚀
Activity
salihudickson commentedon Oct 21, 2026
Hey @uniqueg, I'd like to work on this and the TES migration. I also agree that option A makes more sense for the API.
Also are there any public GA4GH compliant APIs we can use to test the component functionality? That was a bit of an issue for me while I was trying to reorient myself with the project, had to build a local REST API.
uniqueg commentedon Oct 21, 2026
That would be lovely, @salihudickson. Please join the #elixir-on-cloud channel on our Slack and coordinate with Chitransh (@AnonymousXC), who is working on integrating the components into a new version of the Krini portal. He also knows about public TES instances. For WES, we still need to deploy.
anuragxxd commentedon Oct 22, 2026
Quick context before we build anything new: the v2 packages (WES, TRS, TRS-Filer, DRS, DRS-Filer, Service Registry, Cloud Registry) were designed so that the component doesn't own the auth flow; the app using it does. Every component accepts a
providerproperty. You build the provider in your app with whatever auth you need (LS Login, Keycloak, an API key, a proxy that adds headers, or no auth) and pass it in. The component never needs to know which one.That was deliberate: different deployments will use different auth flows, and the components shouldn't lock anyone into one.
Docs and example: https://elixir-cloud-components.vercel.app/docs/wes/providers (see "Custom Providers")
It is already there for WES (and tested too), #443 will make this available for TES.
salihudickson commentedon Oct 27, 2026
@anuragxxd, the
RestWesProviderdoes not have a fetch method, and it uses the browser's generic fetch for request so the component does not send any headers and cannot send an auth token.Please let me know if I'm missing something?
anuragxxd commentedon Oct 27, 2026
You're right, thanks for catching it! The REST providers called the global
fetchdirectly, so overriding it did nothing. That's fixed in #485, now merged todev. Every REST provider now sends its requests through an overridableprotected fetch(input, init):Pass it to the components via
provider; no per-component token property is needed. The fix will be in the next alpha release.uniqueg commentedon Oct 28, 2026
Closing this one: Anurag's provider design already covers it. Apps add their own login (e.g. the access token) through a custom provider, and since #485 that works for every request. For TES, the same will come with #443. If I've misjudged this and something is still missing, please reopen. I will update the issues in the portal to make sure that providers are used when integrating the cloud components.