-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support subject validation when using OIDC AuthN mode #1784
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1784 +/- ##
==========================================
- Coverage 87.63% 87.63% -0.00%
==========================================
Files 101 101
Lines 9812 9824 +12
==========================================
+ Hits 8598 8608 +10
Misses 857 857
- Partials 357 359 +2 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Maria Ines Parnisari <[email protected]>
Hi @miparnisari Thanks for your detailed code review, all suggestions applied |
@miparnisari @Code2Life please update the docs here after this is merged https://openfga.dev/docs/getting-started/setup-openfga/configure-openfga#oidc |
Support subject validation when using OIDC AuthN mode, using OPENFGA_AUTHN_OIDC_SUBJECTS env variable or authn-oidc-subjects config.
Description
User story:
As a platform owner, I wanna limit which services could call OpenFGA, so that to avoid unexpected model or relations modifications by none eligible services.
For example, in a Kubernetes cluster, even if Kubernetes's OIDC configured as AuthN approach, any pod using any service account could call OpenFGA. It introduces security risks because no limits of subjects, namely service account.
With subjects limit feature added, platform owner could restrict services authenticated by Kuberenetes or other OIDC providers. For instance, in Kubernetes, the flag/env-var could be configured like this: "system:serviceaccount:{allowed-namespace}:{allowed-kubernetes-service-account}"
References
Review Checklist
main