Repository navigation
Description
Problem
tesk-api validates tokens at the user info endpoint of the OIDC provider and reads group memberships from a claim of the user info, with a prefix and suffix around the group names. All of this is configurable in tesk-api, but the chart sets only some of it, so deployments with another provider than tesk-api's default (ELIXIR AAI), e.g., LS Login, can't configure it through values:
- User info endpoint:
SECURITY_OAUTH2_RESOURCE_USER_INFO_URI, defaulthttps://login.elixir-czech.org/oidc/userinfo(application.properties L17, configuration). The chart has no value for it. - Group naming:
TESK_API_AUTHORISATION_GROUPS_CLAIM,…_GROUP_PREFIX(defaulturn:geant:elixir-europe.org:group:elixir:),…_GROUP_SUFFIX(default#perun.elixir-czech.cz),…_DELIMITER,…_PARENT_GROUPand…_ADMIN_SUBGROUP(application.properties L34–L47, access control). The chart sets only…_ENV_SUBGROUPand…_BASE_GROUP(auth.envSubgroup,auth.envBaseGroup; tesk-deployment.yaml L109–L112), so the group model only matches the group names of ELIXIR AAI. - Swagger UI client:
TESK_API_SWAGGER_OAUTH_AUTHORIZATION_ENDPOINTand…_TOKEN_ENDPOINTdefault to ELIXIR AAI (application.properties L66–L67); the chart sets the client ID but not the endpoints or scopes.
The chart has no generic way to add environment variables to the API container either (values.yaml L161–L201). Also, the comment above auth.envSubgroup calls the group model that of "LS Login (ELIXIR AAI)", while the defaults are those of ELIXIR AAI.
Proposed solution
Add optional values under auth, each passed to tesk-api only when set, so that tesk-api's defaults apply otherwise:
auth:
# User info endpoint of the OIDC provider (SECURITY_OAUTH2_RESOURCE_USER_INFO_URI)
userInfoUri: ""
groups:
claim: "" # TESK_API_AUTHORISATION_GROUPS_CLAIM
prefix: "" # …_GROUP_PREFIX
suffix: "" # …_GROUP_SUFFIX
parentGroup: "" # …_PARENT_GROUP
adminSubgroup: "" # …_ADMIN_SUBGROUP
swaggerOauth:
authorizationEndpoint: "" # TESK_API_SWAGGER_OAUTH_AUTHORIZATION_ENDPOINT
tokenEndpoint: "" # …_TOKEN_ENDPOINT
scopes: "" # …_SCOPESwith chart tests, the configuration reference and an example for a provider other than ELIXIR AAI (e.g., LS Login: user info https://login.aai.lifescience-ri.eu/oidc/userinfo, entitlement claim eduperson_entitlement), and a fix of the comment above.
Alternatives
- A generic
tesk.extraEnvlist for the API container. Useful anyway, but leaves operators to find the variable names in the tesk-api docs; named values are easier to validate and document. Both could be added. - Authorisation by a claim (
auth.claim.*, feat(chart): authorise by a claim of the user info #265) avoids the group model, but token validation still needs the user info endpoint.
Additional context
Needed to enable LS Login on TESK deployments; see the TESK deployment docs, Token validation.
Activity