nebari-dev / nebari-dev/llm-serving-pack
Internal JWT provider does not bind an audience by default
Nobody has claimed this yet.
- 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:35documents empty as "no audience check".operator/internal/controller/reconcilers/auth.go:268-269only sets the JWT provider'saudienceswhenOIDCAudienceis 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_AUDIENCErequired) 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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