Skip to content

v2.1.0

Choose a tag to compare

@github-actions github-actions released this 01 Dec 22:03
· 3 commits to dev since this release
Immutable release. Only release title and notes can be modified.
v2.1.0
23b754c

TESK API 2.1.0 redesigns authentication and authorisation, so deployments of 2.0.0 must change their settings before they upgrade. TESK API now checks access tokens itself, against the keys of the configured issuers, instead of asking the user info endpoint, and identifies callers by issuer and subject. The group model is gone: a decision service (AuthZEN, e.g. tes-authz 0.1.0) decides who may create tasks, and by default every caller sees only its own tasks. Service clients are listed per issuer, and each client's tokens must name the client's own ID as audience. The release also adds security contexts for task pods (unset by default), which namespaces that enforce the restricted Pod Security Standard need, sets resources for the taskmaster and a default CPU for executors so that tasks are admitted in namespaces with CPU quotas, runs the taskmaster and filer of tesk-core 0.13.0 by default, and removes the /v2/api-docs alias. With the auth profile, tasks created by earlier versions are unreachable after the upgrade. Read the upgrade notes before you upgrade; with the Helm chart of TESK, use a chart release that renders the new settings.

Breaking changes

  • Access tokens are checked locally against the keys of the configured issuers (TESK_API_AUTH_ISSUERS_<i>_*); the user info endpoint no longer validates tokens, and SECURITY_OAUTH2_RESOURCE_USER_INFO_URI is ignored. User tokens must be JWT access tokens of a configured issuer with one of its audiences, and delegated tokens (with an act claim) are refused (#222, #221, #227, #228)
  • The default profile is auth, which needs at least one issuer; noauth must be set explicitly (#227, #228)
  • Owners are <iss>|<sub> for users and service clients alike; with the auth profile, tasks created by earlier versions belong to nobody and are unreachable (404), while with noauth the tasks of anonymousUser stay reachable (#227, #228)
  • The settings TESK_API_AUTHORISATION_SERVICE_CLIENTS_* are replaced by service clients per issuer (TESK_API_AUTH_ISSUERS_<i>_SERVICECLIENTS_<j>_*); a client's token needs the client's own ID as audience, unless …_ALLOWANYAUDIENCE is set for testing; with a removed setting still set, TESK API doesn't start (#215, #220, #227, #228)
  • The group model is removed (groups, teams, team admins, super admins and all TESK_API_AUTHORISATION_* settings): with the auth profile, a decision service (TESK_API_AUTHZ_DECISIONSERVICE_URL, required) decides who may create tasks, with the claims in TESK_API_AUTHZ_DECISIONSERVICE_CLAIMS (#225, #226, #229, #230)
  • By default, every caller gets, lists and cancels only the tasks that it created; other users' tasks give 404 Not Found instead of 403 Forbidden and are left out of lists. A decision service can grant more for the operations in TESK_API_AUTHZ_OPERATIONS (#218, #219)
  • /v2/api-docs, the alias of the API description deprecated in 2.0.0, is removed; use /v3/api-docs (#188, #206)

Features

  • Getting, listing and cancelling tasks can each be decided by the decision service as well (TESK_API_AUTHZ_OPERATIONS), failing closed or open per operation (TESK_API_AUTHZ_FAILURE_<OPERATION>); the default decides only creation (#199, #231, #232)
  • Settings for security contexts of the taskmaster's and the executors' pods and containers, unset by default; namespaces that enforce the restricted Pod Security Standard need them set (#209, #210)
  • The taskmaster requests CPU 100m and memory 128Mi and is limited to CPU 500m and memory 256Mi, and executors without resources.cpu_cores request and are limited to 1 CPU, so that tasks are admitted in namespaces with CPU quotas; both are configurable (TESK_API_TASKMASTER_RESOURCES, TESK_API_TASKMASTER_EXECUTOR_DEFAULT_CPU) (#209, #210)
  • The taskmaster and filer of tesk-core 0.13.0 are the default images, instead of 0.11.0 (#211, #213)
  • 503 Service Unavailable answers a token whose issuer's keys can't be fetched, so that clients retry (#227, #228)

Security

  • Callers are identified by the issuer and the subject of their token together, so that equal subjects of different issuers never share tasks (#227, #228)

Fixes

  • Executors of tasks that set resources.ram_gb get it as their memory limit also when the task sets resources.cpu_cores, so that a namespace's default limit below the request no longer keeps them from starting (#209, #210, #234)
  • Public endpoints (service info, the API description and the Swagger UI) ignore tokens, so an invalid token no longer gives 401 there (#227, #228)

Documentation

  • The configuration docs explain resource limits under namespace LimitRanges (#234, #235)
  • The README cites the release DOI (#207, #208)

Maintenance

  • Tests pin the access matrix of the redesign (#224, #223)
  • google-java-format updated, with the reformat ignored in git blame (#163, #201, #203, #204)
  • Releases notify Pubgrade with its notify action, and only once the repository is registered there (#157, #205, #238, #242)
  • Maven 3.10.1 (#202)
  • Release preparation (#212, #243)

Commits

  • style: update google-java-format by @uniqueg in #201
  • chore: ignore the #201 reformat in git blame by @uniqueg in #204
  • build(deps): bump org.apache.maven:apache-maven from 3.10.0 to 3.10.1 in the maven group across 1 directory by @dependabot[bot] in #202
  • feat!: remove the /v2/api-docs alias by @uniqueg in #206
  • ci: notify Pubgrade with its notify action by @uniqueg in #205
  • docs: cite the release DOI by @uniqueg in #208
  • feat: make task pods restricted-ready by @uniqueg in #210
  • fix: encode team names in Kubernetes labels by @uniqueg in #217
  • feat!: show tasks to their owner only by @uniqueg in #219
  • feat!: check audiences per service client by @uniqueg in #220
  • test: pin the access matrix of the redesign by @uniqueg in #223
  • feat: validate JWT access tokens by @uniqueg in #221
  • feat!: remove the group model by @uniqueg in #226
  • feat!: authenticate with the token validator by @uniqueg in #228
  • feat!: ask the decision service on create by @uniqueg in #230
  • feat: decide further operations per config by @uniqueg in #232
  • docs: explain limits under namespace LimitRanges by @uniqueg in #235
  • feat: default to the tesk-core 0.13.0 images by @uniqueg in #213
  • ci: notify Pubgrade only once registered by @uniqueg in #242
  • build: prepare the 2.1.0 release by @uniqueg in #243

Full Changelog: v2.0.0...v2.1.0