nebari-dev / nebari-dev/llm-serving-pack

Internal JWT provider does not bind an audience by default

Open
#136 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: high 🔥 security type: enhancement 💅🏼
Dominant language
Go
Stars
3
Forks
3
Avg merge
16h 31m
Merged PRs (30d)
11

Description

Reported as H-03 in the PR #117 security assessment. Distinct from #66, which covers JWKS discovery.

What

OIDCAudience is optional and empty by default:

  • operator/internal/config/config.go:35 documents empty as "no audience check".
  • operator/internal/controller/reconcilers/auth.go:268-269 only sets the JWT provider's audiences when OIDCAudience is non-empty.

So out of the box the internal endpoint's JWT check accepts any valid token from the issuer regardless of which client it was minted for. Group authorization still applies, but the token is not bound to this service's audience, so a token obtained for an unrelated Keycloak client is accepted.

Why it matters

Audience binding is what ties a token to the service it was issued for. Without it, the internal endpoint trusts any issuer-signed token that satisfies the group check, which widens the set of tokens that authenticate beyond what most operators would expect from a default install.

Fix

  • Set a sensible default audience (or make LLM_OIDC_AUDIENCE required) and document the expected client/audience wiring.
  • Confirm the Keycloak client provisioning actually issues tokens carrying that audience so the check does not lock out legitimate callers.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read operator/internal/config/config.go:35 and operator/internal/controller/reconcilers/auth.go:268-269 to trace the empty OIDC audience default and JWT provider configuration. Inspect the Keycloak client provisioning referenced by the issue, then ensure the chosen default or required setting matches issued token audiences and does not block legitimate callers.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication, authorization, backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.