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 thatReadWriteOnceis enough (see Requirements). AReadWriteManyvolume is needed only for the shared file system backend (transfer, forfile: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
storagevalue tos3and 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 itsaudnames one of the issuer'saudiences: 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_entitlementholds one of the values inauthz.policy.createEntitlements, and the service clients ofauth.issuers. The chart sends the claims inauthz.decisionService.claims(by defaulteduperson_entitlement) to the decision service. Withauthz.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 withkubectl. - 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: truelifts 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-infostays 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 toauth.issuersandauthz.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 withkubectlafterwards), and then upgrade, which starts the new API. - Upgrade with your values files, not with
helm upgrade --reuse-values, and keep the update strategyRecreate, 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.