Commit 7c04026
feat: Extended OIDC support to extract groups & namespaces and token injection with multiple methods (#6089)
* feat: Extract groups and namespaces claims from JWT in OidcTokenParser
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Minor formatting
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* feat: Allow Feast SDK to accept a pre-existing OIDC token without contacting the identity provider
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* fix: Raise error when configured token_env_var is empty
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Minor formatting changes
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Activate _check_mutually_exclusive groups only when all fields are set, reject stray auth_discovery_url/client_id without client_secret
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Narrow OIDC client routing to use set-based key detection and extract _is_oidc_client_config helper
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Fix .sort() assertions in test_token_parser.py that always compared None == None
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Guard against missing roles key in resource_access to prevent unhandled KeyError
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Fixed lint errors
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Fixed lint error
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Fixed lint errors
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Added support to read ServiceAccount token and Minor improvements
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Improved code readibility
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Minor reformatting
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* fix: Use exact dict-key lookup for kubernetes.io claim to satisfy CodeQL substring sanitization check
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* feat: Add verify_ssl support to OIDC auth flow for self-signed certificates
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
Made-with: Cursor
* feat: Lightweight SA token validation for OIDC auth — TokenReview only, no RBAC queries
Replace KubernetesTokenParser delegation with a lightweight
_validate_k8s_sa_token_and_extract_namespace() method in OidcTokenParser.
Validates SA tokens via TokenReview API and extracts namespace from the
authenticated identity. No RoleBinding/ClusterRoleBinding queries needed,
so the server SA only requires tokenreviews/create permission.
Also updates OIDC auth documentation with token priority, verify_ssl,
groups claim, and multi-token support sections.
Made-with: Cursor
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Minor reformatting & lint related changes
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Update sdk/python/feast/permissions/auth/oidc_token_parser.py
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* fix: Restore missing return in intra-comm check and add error handling for K8s token validation
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
Made-with: Cursor
* Minor reformatting
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Checks preferred_username first (Keycloak default), then falls back to upn (Azure AD / Entra ID)
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* feat(operator): Split server/client OIDC config and add secretKeyName, tokenEnvVar, verifySSL CRD fields
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Reverted kustomization.yaml
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* fix: Harden OIDC token parsing and make client_id optional
- Catch PyJWTError (not just InvalidTokenError) in token decode path
- Guard _get_intra_comm_user against malformed tokens (DecodeError)
- Reduce _extract_claim log noise: warning → debug for optional claims
- Make client_id optional on server config (skip roles when absent)
- Move client_id from required to optional in operator config
Made-with: Cursor
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* cache K8s client, eliminate double JWT decode, improve error messages
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Minor formatting
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* feat(odh): wire OIDC_ISSUER_URL from params.env into operator pod
- Add OIDC_ISSUER_URL to manager Deployment env (base)
- Add param to ODH/RHOAI params.env with empty default
- Kustomize replacements from feast-operator-parameters ConfigMap
- Document Open Data Hub operator integration
Pairs with opendatahub-operator injecting OIDC_ISSUER_URL at reconcile
time from GatewayConfig when the cluster uses external OIDC (RHOAIENG-55767).
Made-with: Cursor
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Add issuerUrl to OidcAuthz CRD and OIDC_ISSUER_URL env var support for Secret-less OIDC configuration
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Add caCertConfigMap to OidcAuthz CRD and ca_cert_path to SDK for self-signed OIDC provider TLS verification
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Reverted kustomization.yaml to use upstream image
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Shorten CRD field descriptions to fit maxDescLen=120 and revert kustomization.yaml to upstream default
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* fix: Remove unused param, nil deref in test, and update secrets baseline
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* fix: Remove unused secretExtractionFunc from client config chain and fix mypy attr-defined error
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Remove always-nil error from getClientRepoConfig and stop leaking ODH CA path into non-ODH OIDC config
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Remove always-nil error from getClientRepoConfig, stop leaking ODH CA path, pass ca_cert_path to client token fetch, and update secrets baseline
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Thread ODH CA bundle detection into resolveOidcCACertPath for proper 3-tier priority
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
* Provision TokenReview RBAC for OIDC auth and add SSL error logging in token parser
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
---------
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Gowtham Shanmugasundaram <gshanmug@redhat.com>1 parent daf77c6 commit 7c04026
32 files changed
Lines changed: 1614 additions & 292 deletions
File tree
- docs/getting-started/components
- infra/feast-operator
- api/v1
- bundle/manifests
- config
- crd/bases
- manager
- overlays
- odh
- rhoai
- dist
- docs
- api/markdown
- internal/controller
- authz
- services
- sdk/python
- feast
- permissions
- auth
- client
- tests/unit/permissions
- auth
- server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
937 | | - | |
| 937 | + | |
938 | 938 | | |
939 | 939 | | |
940 | 940 | | |
| |||
950 | 950 | | |
951 | 951 | | |
952 | 952 | | |
953 | | - | |
| 953 | + | |
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
957 | 957 | | |
958 | 958 | | |
959 | 959 | | |
960 | | - | |
| 960 | + | |
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
| |||
1140 | 1140 | | |
1141 | 1141 | | |
1142 | 1142 | | |
1143 | | - | |
| 1143 | + | |
1144 | 1144 | | |
1145 | 1145 | | |
1146 | 1146 | | |
1147 | 1147 | | |
1148 | 1148 | | |
1149 | 1149 | | |
1150 | | - | |
| 1150 | + | |
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
| |||
1539 | 1539 | | |
1540 | 1540 | | |
1541 | 1541 | | |
1542 | | - | |
| 1542 | + | |
1543 | 1543 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
50 | | - | |
| 49 | + | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
68 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
73 | | - | |
| 79 | + | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
77 | 83 | | |
78 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
79 | 117 | | |
| 118 | + | |
80 | 119 | | |
81 | 120 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | 121 | | |
87 | 122 | | |
88 | | - | |
| 123 | + | |
89 | 124 | | |
90 | 125 | | |
91 | 126 | | |
| |||
97 | 132 | | |
98 | 133 | | |
99 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
100 | 141 | | |
101 | 142 | | |
102 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
713 | 713 | | |
714 | 714 | | |
715 | 715 | | |
716 | | - | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
717 | 744 | | |
718 | 745 | | |
719 | 746 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
178 | 189 | | |
179 | 190 | | |
180 | 191 | | |
| |||
259 | 270 | | |
260 | 271 | | |
261 | 272 | | |
| 273 | + | |
262 | 274 | | |
263 | 275 | | |
264 | 276 | | |
| |||
0 commit comments