Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
493a6b9
feat: Extract groups and namespaces claims from JWT in OidcTokenParser
aniketpalu Mar 10, 2026
3db6db3
Minor formatting
aniketpalu Mar 10, 2026
0d59eca
feat: Allow Feast SDK to accept a pre-existing OIDC token without con…
aniketpalu Mar 10, 2026
36a5b06
fix: Raise error when configured token_env_var is empty
aniketpalu Mar 10, 2026
a478a80
Minor formatting changes
aniketpalu Mar 10, 2026
1483c6c
Activate _check_mutually_exclusive groups only when all fields are se…
aniketpalu Mar 10, 2026
34474af
Narrow OIDC client routing to use set-based key detection and extract…
aniketpalu Mar 11, 2026
505d6de
Fix .sort() assertions in test_token_parser.py that always compared N…
aniketpalu Mar 11, 2026
5c79fcf
Guard against missing roles key in resource_access to prevent unhandl…
aniketpalu Mar 11, 2026
e0359db
Fixed lint errors
aniketpalu Mar 11, 2026
7453349
Fixed lint error
aniketpalu Mar 11, 2026
4b4c1dd
Fixed lint errors
aniketpalu Mar 11, 2026
1353482
Added support to read ServiceAccount token and Minor improvements
aniketpalu Mar 11, 2026
86c9d76
Improved code readibility
aniketpalu Mar 11, 2026
5621f07
Minor reformatting
aniketpalu Mar 11, 2026
b5db157
fix: Use exact dict-key lookup for kubernetes.io claim to satisfy Cod…
aniketpalu Mar 12, 2026
1331057
feat: Add verify_ssl support to OIDC auth flow for self-signed certif…
aniketpalu Mar 20, 2026
a875169
feat: Lightweight SA token validation for OIDC auth — TokenReview onl…
aniketpalu Mar 23, 2026
7e59a53
Minor reformatting & lint related changes
aniketpalu Mar 23, 2026
611607b
Update sdk/python/feast/permissions/auth/oidc_token_parser.py
aniketpalu Mar 23, 2026
3c1e36b
fix: Restore missing return in intra-comm check and add error handlin…
aniketpalu Mar 23, 2026
c2c4863
Minor reformatting
aniketpalu Mar 23, 2026
eed8b02
Checks preferred_username first (Keycloak default), then falls back t…
aniketpalu Mar 23, 2026
593b95d
feat(operator): Split server/client OIDC config and add secretKeyName…
aniketpalu Mar 24, 2026
a1c75de
Reverted kustomization.yaml
aniketpalu Mar 24, 2026
88a389b
fix: Harden OIDC token parsing and make client_id optional
aniketpalu Mar 25, 2026
f632686
cache K8s client, eliminate double JWT decode, improve error messages
aniketpalu Apr 1, 2026
45666da
Minor formatting
aniketpalu Apr 1, 2026
0a59ad2
feat(odh): wire OIDC_ISSUER_URL from params.env into operator pod
GowthamShanmugam Mar 31, 2026
3557a15
Add issuerUrl to OidcAuthz CRD and OIDC_ISSUER_URL env var support fo…
aniketpalu Apr 6, 2026
30a04c2
Add caCertConfigMap to OidcAuthz CRD and ca_cert_path to SDK for self…
aniketpalu Apr 6, 2026
a967bc6
Reverted kustomization.yaml to use upstream image
aniketpalu Apr 6, 2026
c1d7c11
Shorten CRD field descriptions to fit maxDescLen=120 and revert kusto…
aniketpalu Apr 6, 2026
8aae62a
fix: Remove unused param, nil deref in test, and update secrets baseline
aniketpalu Apr 7, 2026
cacd649
fix: Remove unused secretExtractionFunc from client config chain and …
aniketpalu Apr 7, 2026
9200dd3
Merge branch 'master' into oidc-support
aniketpalu Apr 7, 2026
141c871
Remove always-nil error from getClientRepoConfig and stop leaking ODH…
aniketpalu Apr 7, 2026
bd81904
Remove always-nil error from getClientRepoConfig, stop leaking ODH CA…
aniketpalu Apr 7, 2026
66c3677
Thread ODH CA bundle detection into resolveOidcCACertPath for proper …
aniketpalu Apr 7, 2026
bb6fb52
Provision TokenReview RBAC for OIDC auth and add SSL error logging in…
aniketpalu Apr 7, 2026
2f3e7b9
Merge upstream/master into oidc-support and regenerate secrets baseline
aniketpalu Apr 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@
"filename": "infra/feast-operator/api/v1/featurestore_types.go",
"hashed_secret": "44e17306b837162269a410204daaa5ecee4ec22c",
"is_verified": false,
"line_number": 734
"line_number": 761
}
],
"infra/feast-operator/api/v1/zz_generated.deepcopy.go": [
Expand All @@ -950,14 +950,14 @@
"filename": "infra/feast-operator/api/v1/zz_generated.deepcopy.go",
"hashed_secret": "44e17306b837162269a410204daaa5ecee4ec22c",
"is_verified": false,
"line_number": 1261
"line_number": 754
},
{
"type": "Secret Keyword",
"filename": "infra/feast-operator/api/v1/zz_generated.deepcopy.go",
"hashed_secret": "c2028031c154bbe86fd69bef740855c74b927dcf",
"is_verified": false,
"line_number": 1266
"line_number": 1300
}
],
"infra/feast-operator/api/v1alpha1/featurestore_types.go": [
Expand Down Expand Up @@ -1140,14 +1140,14 @@
"filename": "infra/feast-operator/internal/controller/services/repo_config.go",
"hashed_secret": "44e17306b837162269a410204daaa5ecee4ec22c",
"is_verified": false,
"line_number": 109
"line_number": 114
},
{
"type": "Secret Keyword",
"filename": "infra/feast-operator/internal/controller/services/repo_config.go",
"hashed_secret": "e2fb052132fd6a07a56af2013e0b62a1f510572c",
"is_verified": false,
"line_number": 148
"line_number": 205
}
],
"infra/feast-operator/internal/controller/services/services.go": [
Expand Down Expand Up @@ -1539,5 +1539,5 @@
}
]
},
"generated_at": "2026-04-04T12:08:20Z"
"generated_at": "2026-04-07T15:56:56Z"
}
69 changes: 55 additions & 14 deletions docs/getting-started/components/authz_manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,52 +40,87 @@ auth:
With OIDC authorization, the Feast client proxies retrieve the JWT token from an OIDC server (or [Identity Provider](https://openid.net/developers/how-connect-works/))
and append it in every request to a Feast server, using an [Authorization Bearer Token](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#bearer).

The server, in turn, uses the same OIDC server to validate the token and extract the user roles from the token itself.
The server, in turn, uses the same OIDC server to validate the token and extract user details — including username, roles, and groups — from the token itself.

Some assumptions are made in the OIDC server configuration:
* The OIDC token refers to a client with roles matching the RBAC roles of the configured `Permission`s (*)
* The roles are exposed in the access token that is passed to the server
* The roles are exposed in the access token under `resource_access.<client_id>.roles`
* The JWT token is expected to have a verified signature and not be expired. The Feast OIDC token parser logic validates for `verify_signature` and `verify_exp` so make sure that the given OIDC provider is configured to meet these requirements.
* The preferred_username should be part of the JWT token claim.

* The `preferred_username` should be part of the JWT token claim.
* For `GroupBasedPolicy` support, the `groups` claim should be present in the access token (requires a "Group Membership" protocol mapper in Keycloak).

(*) Please note that **the role match is case-sensitive**, e.g. the name of the role in the OIDC server and in the `Permission` configuration
must be exactly the same.

For example, the access token for a client `app` of a user with `reader` role should have the following `resource_access` section:
For example, the access token for a client `app` of a user with `reader` role and membership in the `data-team` group should have the following claims:
```json
{
"preferred_username": "alice",
"resource_access": {
"app": {
"roles": [
"reader"
]
}
}
},
"groups": [
"data-team"
]
}
```

An example of feast OIDC authorization configuration on the server side is the following:
#### Server-Side Configuration

The server requires `auth_discovery_url` and `client_id` to validate incoming JWT tokens via JWKS:
```yaml
project: my-project
auth:
type: oidc
client_id: _CLIENT_ID__
client_id: _CLIENT_ID_
auth_discovery_url: _OIDC_SERVER_URL_/realms/master/.well-known/openid-configuration
...
```

In case of client configuration, the following settings username, password and client_secret must be added to specify the current user:
When the OIDC provider uses a self-signed or untrusted TLS certificate (e.g. internal Keycloak on OpenShift), set `verify_ssl` to `false` to disable certificate verification:
```yaml
auth:
type: oidc
client_id: _CLIENT_ID_
auth_discovery_url: https://keycloak.internal/realms/master/.well-known/openid-configuration
verify_ssl: false
```

{% hint style="warning" %}
Setting `verify_ssl: false` disables TLS certificate verification for all OIDC provider communication (discovery, JWKS, token endpoint). Only use this in development or internal environments where you accept the security risk.
{% endhint %}

#### Client-Side Configuration

The client supports multiple token source modes. The SDK resolves tokens in the following priority order:

1. **Intra-communication token** — internal server-to-server calls (via `INTRA_COMMUNICATION_BASE64` env var)
2. **`token`** — a static JWT string provided directly in the configuration
3. **`token_env_var`** — the name of an environment variable containing the JWT
4. **`client_secret`** — fetches a token from the OIDC provider using client credentials or ROPC flow (requires `auth_discovery_url` and `client_id`)
5. **`FEAST_OIDC_TOKEN`** — default fallback environment variable
6. **Kubernetes service account token** — read from `/var/run/secrets/kubernetes.io/serviceaccount/token` when running inside a pod

**Token passthrough** (for use with external token providers like [kube-authkit](https://github.com/opendatahub-io/kube-authkit)):
```yaml
project: my-project
auth:
type: oidc
token_env_var: FEAST_OIDC_TOKEN
```

Or with a bare `type: oidc` (no other fields) — the SDK falls back to the `FEAST_OIDC_TOKEN` environment variable or a mounted Kubernetes service account token:
```yaml
project: my-project
auth:
type: oidc
...
username: _USERNAME_
password: _PASSWORD_
client_secret: _CLIENT_SECRET__
```

Below is an example of feast full OIDC client auth configuration:
**Client credentials / ROPC flow** (existing behavior, unchanged):
```yaml
project: my-project
auth:
Expand All @@ -97,6 +132,12 @@ auth:
auth_discovery_url: http://localhost:8080/realms/master/.well-known/openid-configuration
```

When using client credentials or ROPC flows, the `verify_ssl` setting also applies to the discovery and token endpoint requests.

#### Multi-Token Support (OIDC + Kubernetes Service Account)

When the Feast server is configured with OIDC auth and deployed on Kubernetes, the `OidcTokenParser` can handle both Keycloak JWT tokens and Kubernetes service account tokens. Incoming tokens that contain a `kubernetes.io` claim are validated via the Kubernetes Token Access Review API and the namespace is extracted from the authenticated identity — no RBAC queries are performed, so the server service account only needs `tokenreviews/create` permission. All other tokens follow the standard OIDC/Keycloak JWKS validation path. This enables `NamespaceBasedPolicy` enforcement for service account tokens while using `GroupBasedPolicy` and `RoleBasedPolicy` for OIDC user tokens.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we support OIDC token passing from ODH Notebook instead of service account token ? This we alreayd support for kubernetes token.

Not a blocker though, just for consistency.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this PR enables that. When a workbench notebook uses auth: {type: oidc}, the SDK's get_token() supports multiple token sources:

  • FEAST_OIDC_TOKEN env var: the user (or kube-authkit) sets this with a Keycloak JWT. The human user's identity, groups, and roles flow through to the Feast server.
  • SA token file fallback: if no env var is set, the workbench pod's SA token at var/run/secrets/kubernetes.io/serviceaccount/token is read automatically.

The server handles both. OIDC JWTs are validated against Keycloak JWKS, and SA tokens are detected via the kubernetes.io claim and validated via TokenReview. So both human OIDC tokens and SA tokens work from ODH Notebooks.


### Kubernetes RBAC Authorization
With Kubernetes RBAC Authorization, the client uses the service account token as the authorizarion bearer token, and the
server fetches the associated roles from the Kubernetes RBAC resources. Feast supports advanced authorization by extracting user groups and namespaces from Kubernetes tokens, enabling fine-grained access control beyond simple role matching. This is achieved by leveraging Kubernetes Token Access Review, which allows Feast to determine the groups and namespaces associated with a user or service account.
Expand Down
29 changes: 28 additions & 1 deletion infra/feast-operator/api/v1/featurestore_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,34 @@ type KubernetesAuthz struct {
// OidcAuthz defines the authorization settings for deployments using an Open ID Connect identity provider.
// https://auth0.com/docs/authenticate/protocols/openid-connect-protocol
type OidcAuthz struct {
SecretRef corev1.LocalObjectReference `json:"secretRef"`
// OIDC issuer URL. The operator appends /.well-known/openid-configuration to derive the discovery endpoint.
// +optional
// +kubebuilder:validation:Pattern=`^https://\S+$`
IssuerUrl string `json:"issuerUrl,omitempty"`
// Secret with OIDC properties (auth_discovery_url, client_id, client_secret). issuerUrl takes precedence.
// +optional
SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
// Key in the Secret containing all OIDC properties as a YAML value. If unset, each key is a property.
// +optional
SecretKeyName string `json:"secretKeyName,omitempty"`
// Env var name for client pods to read an OIDC token from. Sets token_env_var in client config.
// +optional
TokenEnvVar *string `json:"tokenEnvVar,omitempty"`
// Verify SSL certificates for the OIDC provider. Defaults to true.
// +optional
VerifySSL *bool `json:"verifySSL,omitempty"`
// ConfigMap with the CA certificate for self-signed OIDC providers. Auto-detected on RHOAI/ODH.
// +optional
CACertConfigMap *OidcCACertConfigMap `json:"caCertConfigMap,omitempty"`
}

// OidcCACertConfigMap references a ConfigMap containing a CA certificate for OIDC provider TLS.
type OidcCACertConfigMap struct {
// ConfigMap name.
Name string `json:"name"`
// Key in the ConfigMap holding the PEM certificate. Defaults to "ca-bundle.crt".
// +optional
Key string `json:"key,omitempty"`
}

// TlsConfigs configures server TLS for a feast service. in an openshift cluster, this is configured by default using service serving certificates.
Expand Down
38 changes: 36 additions & 2 deletions infra/feast-operator/api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ metadata:
}
]
capabilities: Basic Install
createdAt: "2026-03-10T20:00:10Z"
createdAt: "2026-04-07T13:49:25Z"
operators.operatorframework.io/builder: operator-sdk-v1.38.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
name: feast-operator.v0.61.0
Expand Down Expand Up @@ -175,6 +175,17 @@ spec:
- get
- patch
- update
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- create
- delete
- get
- list
- patch
- watch
- apiGroups:
- policy
resources:
Expand Down Expand Up @@ -259,6 +270,7 @@ spec:
value: quay.io/feastdev/feature-server:0.61.0
- name: RELATED_IMAGE_CRON_JOB
value: quay.io/openshift/origin-cli:4.17
- name: OIDC_ISSUER_URL
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 OIDC_ISSUER_URL env var missing value: field in bundle CSV makes OLM deployment spec invalid

In the operator's OLM bundle CSV at line 273, the OIDC_ISSUER_URL env entry is missing a value: key. Compare the correct form in config/manager/manager.yaml:82-83 which has value: "". Without value:, the YAML parser treats the next line (image: quay.io/...) as a key within the env var map entry rather than a sibling container-level field. This makes the container spec structurally invalid: the container loses its image field entirely. OLM deployments using this CSV will fail to create the operator pod.

Expected vs actual YAML structure

Expected (from config/manager/manager.yaml):

- name: OIDC_ISSUER_URL
  value: ""
image: quay.io/feastdev/feast-operator:0.61.0

Actual (bundle CSV):

- name: OIDC_ISSUER_URL
image: quay.io/feastdev/feast-operator:0.61.0
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

operator-sdk generate bundle strips value: "" from env vars by design. This is a known operator-sdk behavior as it considers value: "" equivalent to absent and removes it during YAML serialization. The source manager.yaml has value: "", kustomize build (install.yaml) preserves it, but operator-sdk (CSV) strips it.

image: quay.io/feastdev/feast-operator:0.61.0
livenessProbe:
httpGet:
Expand Down
Loading
Loading