Skip to content

Service clients: audiences per client #215

Done

Description

@uniqueg

Part of elixir-cloud-aai/TESK#336 (the chart owns the auth.tokenClients schema; this issue is the tesk-api side). Both PRs are released together, before tesk-api 2.1.0 and the next chart.

Current behaviour

AuthorisationProperties.ServiceClients holds clientIds and one audience; ServiceClientTokenServices.java:170 and :410 check every listed client's token against that single value (or any audience with allowAnyAudience). So all service clients must carry the same audience, and a flat audience list would accept every client at every audience.

Proposal

  • Per-client settings: a map from client ID to {audiences: [...]} (room for more per-client settings later).
  • A token is accepted if its client claim names a listed client and its aud holds one of that client's audiences; requireAtJwt, requireClientSubject, issuer and signature checks stay unchanged.
  • The env/property format is this PR's choice (e.g. one JSON variable, since client IDs don't bind well to Spring map keys from env); the chart renders it (TESK#336).
  • Clean break, no compatibility layer (the flat form has been out only since 2.0.0; the next chart release is breaking anyway). Upgrade notes say how to convert.
  • allowAnyAudience: per client (default false) or removed; decided in the PR together with TESK#336.

Acceptance criteria

  • Client A's token with client B's audience is refused; each client's token with its own audience is accepted.
  • A client without audiences is refused at startup (unless the PR keeps a per-client allowAnyAudience).
  • Existing user-token paths unchanged.
  • ServiceClientTokenServicesTest (per-client audiences, cross-client refusal) and ServiceClientAuthIT cover the above.
  • Configuration reference and upgrade notes updated.

Long term, RFC 8693 token exchange (a token per backend audience) is the proper fix for gateways like proTES.

Activity

  1. added
    priority: high
    status: triage
    type flag: breaking change
    type: auth
    workload: days
    ecp-wp4: M4.4
    on Nov 23, 2026
  2. added
    status: in progress
    and removed
    status: triage
    on Nov 23, 2026
  3. self-assigned this
    on Nov 23, 2026
  4. moved this from Backlog to In progress in ELIXIR On-Cloudon Nov 23, 2026
  5. moved this from In progress to In review in ELIXIR On-Cloudon Nov 23, 2026
  6. added this to the v2.1.0 milestone on Nov 23, 2026
  7. moved this from In review to Done in ELIXIR On-Cloudon Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ecp-wp4: M4.4priority: highstatus: in progresstype flag: breaking changetype: authworkload: days

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions