nebari-dev / nebari-dev/llm-serving-pack
Extract OIDC JWT provider name as a constant in auth.go
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3
- Forks
- 3
- Avg merge
- 16h 31m
- Merged PRs (30d)
- 11
Description
Follow-up from #47.
operator/internal/controller/reconcilers/auth.go uses the string "oidc" as the JWT provider name in two places:
buildInternalSecurityPolicy:provider["name"] = "oidc"(line ~155).buildGroupAuthorization:principal.jwt.provider = "oidc"(line ~234).
Envoy Gateway matches the authorization rule to the provider by this name. If a future change renames the provider in one spot without updating the other, the gateway will silently default-deny every request on the internal endpoint. Nothing in our unit tests or in EG's admission validation catches the mismatch.
Suggested fix
const internalJWTProviderName = "oidc"
at the top of auth.go, reference it from both call sites. Optionally add a table case asserting jwt.providers[0].name == principal.jwt.provider so the invariant is guarded by the test suite.
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
Start in operator/internal/controller/reconcilers/auth.go, reading buildInternalSecurityPolicy and buildGroupAuthorization. Replace both provider-name literals with the shared constant, then run the relevant auth reconciler unit tests and verify that the JWT provider name matches the group authorization principal; add the invariant case if the test structure supports it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- authentication
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100