Skip to content

Token Exchange Testbed

The token exchange testbed tries per-hop OAuth 2.0 token exchange with LS Login, for the chain of ELIXIR On-Cloud services from a front end through a WES and the proTES gateway to the TES nodes: each service exchanges the token that it received for one that is only good for the next service. It tests the design proposed in [proTES issue

391]protes-391, a proposal that isn't decided yet, with a small client,

gateway and node as stand-ins for the real services.

Local mock only

So far, the testbed has run against a local mock of LS Login only. The mock accepts almost everything, so the testbed enforces LS Login's rules itself. A passing run shows that the testbed works, not how LS Login behaves. See the testbed's limits. Never use it in production or with real accounts.

What you need

  • Docker with Compose, on Linux, macOS or WSL. It has been run on Linux only so far.
  • Nothing else for the mock: no Python on your computer, no free ports, no account.

Steps

  1. Clone the repository, build the images and run all scenarios against the mock:

    git clone https://github.com/elixir-cloud-aai/token-exchange-flow-testbed.git
    cd token-exchange-flow-testbed
    docker compose build
    docker compose run --rm e2e
    
  2. Check the output. After the build, in under a minute, it ends with a line like N/N checks passed in S s, with the same number N twice. If a check fails, FAILED: and the failed checks follow, and the command exits with status 1.

  3. Remove the containers:

    docker compose down -v
    

The repository's CI runs the same scenarios on every change.

What you see

The run goes through the scenarios of the tests: one sign-in, then one token per hop up to the node; requests that must be refused, and which service refuses them; groups and entitlements; token lifetimes and refresh; and what a node can tell about the path of a request. It also runs the commands of the testbed's docs and scans all output for tokens and secrets. The section MOCK GAP lists what the mock lets through when the testbed's own checks are off.

Where to go next