Repository navigation
feat: Auth registry write grpc paths - #381
Merged
Merged
Conversation
added 4 commits
September 22, 2026 14:17
… wire _grpc_interceptors + is_auth_necessary skip AuthConfig.write_auth_only: bool = False — declared because extra=forbid would reject it in yaml otherwise. OidcAuthConfig.issuer / audience — optional; client_id still required (placeholder is fine for Okta write-auth). _grpc_interceptors now reads store.config.auth_config: NONE → [ErrorInterceptor()] OIDC + write_auth_only → [WritePathAuthInterceptor(), ErrorInterceptor()] else → [AuthInterceptor(), ErrorInterceptor()] init_security_manager still creates a SecurityManager for OIDC and passes write_auth_only through. is_auth_necessary returns False when that flag is set, so Apply can succeed with a valid JWT and no Permission rows.
- Always verifies signature and exp - Verifies iss / aud only when those fields are set on OidcAuthConfig (unset keeps Keycloak / stock OIDC working) - Username: preferred_username else sub else cid - Roles: resource_access[client_id].roles if present, else [] (no KeyError on Okta tokens) - INTRA_COMMUNICATION_BASE64 path is unchanged Added user_details_from_access_token_sync for the write interceptor
- Allowlist (19 methods) under /feast.registry.RegistryServer/: Apply/Delete for Entity, DataSource, FeatureView, FeatureService, SavedDataset, ValidationReference, Permission, Project, plus ApplyMaterialization, UpdateInfra, Commit - Writes with no/invalid Bearer → UNAUTHENTICATED (AuthenticationError) - Valid JWT → set_current_user, then the handler (is_auth_necessary still skips RBAC when the flag is on) - Not gated: Health, reflection, Get/List/Proto/GetInfra, Expedia search, Refresh
…cal RSA JWT - Flag off: unauthenticated ApplyEntity still works with no_auth; interceptor selection still uses stock AuthInterceptor when the flag is unset - Flag on: write with no token → UNAUTHENTICATED; valid RSA JWT Apply succeeds with no Permission rows; expired / wrong aud / bad signature → UNAUTHENTICATED; List/Get/Health/Refresh with no metadata succeed - Parser: Okta-shaped sub/cid claims; preferred_username wins; empty resource_access; missing identity fails; real JWT iss/aud/exp/signature checks
piket
reviewed
Sep 28, 2026
| import jwt | ||
| from cryptography.hazmat.primitives.asymmetric import rsa | ||
|
|
||
| ISSUER = "https://expediagroup.oktapreview.com/oauth2/default1" |
Collaborator
There was a problem hiding this comment.
can we make this a more generic so it's not expedia-specific even in this test?
piket
approved these changes
Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
adds opt-in write-path OIDC on feast serve_registry so registry mutations can require an Okta JWT without locking reads or existing no_auth deploys.
auth.write_auth_only (default false) plus optional issuer / audience on OIDC config
When on: Apply* / Delete* / Commit / UpdateInfra need a valid Bearer JWT; List/Get/Health/Refresh stay unauthenticated
Okta-safe parser: sync JWKS + jwt.decode (sig, exp, optional iss/aud); username from preferred_username else sub else cid; no Keycloak resource_access required
Skip Feast Permission RBAC when the flag is on so Apply works with a valid token and no Permission rows
Tests: flag-off regression; flag-on write/read/Health matrix with a local RSA JWT
Which issue(s) this PR fixes:
https://expediagroup.atlassian.net/browse/EAPC-23074
Misc