Skip to content

TESK

TESK is a GA4GH TES service for Kubernetes. It runs each task as a Kubernetes Job.

Role in the deployment

TESK is the TES service for Nodes with a Kubernetes or OpenShift cluster. After you deploy it, register it in the Cloud Registry (see Onboarding). End every upgrade or change of it by checking that sync updated its entry (see After a deployment or an upgrade).

Docs

Notes for the deployment

  • TESK runs on Kubernetes and OpenShift (see OpenShift and other restricted clusters).
  • The cluster needs a default storage class (or the chart's storageClass). TESK uses persistent volume claims as temporary storage for the files of a task; from chart 0.3.0 on, the TESK docs say that ReadWriteOnce is enough (see Requirements). A ReadWriteMany volume is needed only for the shared file system backend (transfer, for file: URLs; see Shared file system).
  • From chart 0.3.0, set the service info in the chart's values (serviceInfo), so that the registry can import and sync it (see Prepare Your Service Info).
  • For a step-by-step setup, see the Node onboarding tutorial.
  • To use the Node's S3 storage (see Onboarding), set the chart's storage value to s3 and follow S3 in the TESK docs.

Access control

TESK's access control was redesigned in tesk-api 2.1.0. The Helm chart configures it from chart 0.5.0 on; chart 0.4.0 configures only the old model of tesk-api 2.0.0. With auth.mode: auth:

  • Tokens: tesk-api checks JWT access tokens itself, against the keys of the issuers in auth.issuers. A user's token is accepted only if its aud names one of the issuer's audiences: the client IDs of the front ends through which users get tokens for your TESK, such as a portal or the Swagger UI. tesk-api no longer validates tokens at the provider's user info endpoint; it asks it only for the claims that the decision service needs.
  • Who may create tasks: a decision service decides (OpenID AuthZEN). By default, the chart runs tes-authz 0.1.0 as a sidecar in the API's pod, which lets those create tasks whose claim eduperson_entitlement holds one of the values in authz.policy.createEntitlements, and the service clients of auth.issuers. The chart sends the claims in authz.decisionService.claims (by default eduperson_entitlement) to the decision service. With authz.deploy.enabled: false, you run a decision service of your own and set its URL (authz.decisionService.url).
  • Ownership: each task belongs to its creator, identified by the issuer and the subject of the token. Every caller gets, lists and cancels only its own tasks, also after losing the right to create tasks; other users' tasks are not found (404). There are no groups, team admins or admin view any more: operators handle other users' tasks with kubectl.
  • Service clients: clients whose own tokens (client credentials grant) are accepted, such as the gateway, are listed per issuer in auth.issuers[].serviceClients. A client's token must name the client's own ID as audience. allowAnyAudience: true lifts that check for one client. It is opt-in, for tests or while a federation is being set up: it also accepts tokens that the client got for other services, which then work at your TESK if they leak or are replayed. Leave it off in production.
  • Public endpoints: GET /service-info stays public by default (auth.serviceInfoPublic), so that the registry can import and sync it.

The values for the policy of the ELIXIR On-Cloud (only members of ECP_CLN:EOC-Compute create tasks; see Access control for compute) are in Enable LS Login and ECP_CLN access, and the gateway's service client in Get added behind the gateway. For all details, see Authentication and authorisation in the TESK docs and Access control in the docs of tesk-api.

Upgrading from chart 0.4.0

The upgrade to chart 0.5.0 and tesk-api 2.1.0 is breaking for deployments with auth.mode: auth; follow the upgrade notes:

  • The values of the old model (auth.userInfoUri, auth.groups, auth.envBaseGroup, auth.envSubgroup, auth.claim, auth.tokenClients, auth.legacyUserLabels) are removed, and the chart fails if one of them is set. Convert them to auth.issuers and authz.policy, as the upgrade notes show.
  • Tasks created before tesk-api 2.1.0 belong to nobody afterwards: no caller gets, lists or cancels them through the API. So that no task is created in the old format during the upgrade, stop the old API first (kubectl scale deployment/<prefix>-api --replicas=0), wait until no task runs (or delete the old tasks with kubectl afterwards), and then upgrade, which starts the new API.
  • Upgrade with your values files, not with helm upgrade --reuse-values, and keep the update strategy Recreate, so that no old pod answers with the old rules during the rollout.
  • The tes-authz sidecar adds CPU and memory requests (100m, 128Mi) and limits (500m, 384Mi) to the API's pod, which count against the quotas of your namespace.

Then check the deployment as in Check it with a test task, and that sync updated the registry entry.