You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started/architecture/overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,6 @@ typically your Offline Store). We are exploring adding a default streaming engin
18
18
19
19
* We recommend [using Python](language.md) for your Feature Store microservice. As mentioned in the document, precomputing features is the recommended optimal path to ensure low latency performance. Reducing feature serving to a lightweight database lookup is the ideal pattern, which means the marginal overhead of Python should be tolerable. Because of this we believe the pros of Python outweigh the costs, as reimplementing feature logic is undesirable. Java and Go Clients are also available for online feature retrieval.
20
20
21
-
*[Role-Based Access Control (RBAC)](rbac.md) is a security mechanism that restricts access to resources based on the roles of individual users within an organization. In the context of the Feast, RBAC ensures that only authorized users or groups can access or modify specific resources, thereby maintaining data security and operational integrity.
21
+
*[Role-Based Access Control (RBAC)](rbac.md) is a security mechanism that restricts access to resources based on the roles/groups/namespaces of individual users within an organization. In the context of the Feast, RBAC ensures that only authorized users or groups can access or modify specific resources, thereby maintaining data security and operational integrity.
Copy file name to clipboardExpand all lines: docs/getting-started/components/authz_manager.md
+3-17Lines changed: 3 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ auth:
99
99
100
100
### Kubernetes RBAC Authorization
101
101
With Kubernetes RBAC Authorization, the client uses the service account token as the authorizarion bearer token, and the
102
-
server fetches the associated roles/groups/namespaces from the Kubernetes RBAC resources.
102
+
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.
103
103
104
104
An example of Kubernetes RBAC authorization configuration is the following:
105
105
{% hint style="info" %}
@@ -109,26 +109,12 @@ An example of Kubernetes RBAC authorization configuration is the following:
109
109
project: my-project
110
110
auth:
111
111
type: kubernetes
112
+
user_token: <user_token> #Optional, else service account token Or env var is used for getting the token
112
113
...
113
114
```
114
115
115
116
In case the client cannot run on the same cluster as the servers, the client token can be injected using the `LOCAL_K8S_TOKEN`
116
117
environment variable on the client side. The value must refer to the token of a service account created on the servers cluster
117
118
and linked to the desired RBAC roles/groups/namespaces.
118
119
119
-
#### Setting Up Kubernetes RBAC for Feast
120
-
121
-
To ensure the Kubernetes RBAC environment aligns with Feast's RBAC configuration, follow these guidelines:
122
-
* The roles defined in Feast `Permission` instances must have corresponding Kubernetes RBAC `Role` names.
123
-
* The Kubernetes RBAC `Role` must reside in the same namespace as the Feast service.
124
-
* The client application can run in a different namespace, using its own dedicated `ServiceAccount`.
125
-
* Finally, the `RoleBinding` that links the client `ServiceAccount` to the RBAC `Role` must be defined in the namespace of the Feast service.
126
-
127
-
#### Kubernetes RBAC Authorization with Groups and Namespaces
128
-
129
-
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.
130
-
131
-
More details can be found in [Groups and Namespaces based Auth](../../reference/auth/groups_namespaces_auth.md)
132
-
133
-
134
-
If the above rules are satisfied, the Feast service must be granted permissions to fetch `RoleBinding` instances from the local namespace.
120
+
More details can be found in [Setting up kubernetes doc](../../reference/auth/kubernetes_auth_setup.md)
Copy file name to clipboardExpand all lines: docs/reference/auth/kubernetes_auth_setup.md
+39-29Lines changed: 39 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,34 +1,47 @@
1
-
# Groups and Namespaces Authentication Support
1
+
# Setting up the kubernetes Auth
2
2
3
-
This document describes the enhanced authentication and authorization capabilities in Feast that support groupsand namespaces extraction from Kubernetes tokens, extending the existing role-based access control (RBAC) system.
3
+
This document describes the authentication and authorization capabilities in Feast that support groups, namespaces and roles extraction from Kubernetes tokens.
4
4
5
5
## Overview
6
6
7
-
Feast now supports extracting user groupsand namespaces of both Service Account and User from Kubernetes authentication tokens using Token Access Review, in addition to the existing role-based authentication. This allows for more granular access control based on:
7
+
Feast supports extracting user groups, namespaces and roles of both Service Account and User from Kubernetes authentication tokens. This allows for more granular access control based on:
8
8
9
9
-**Groups**: User groups associated directly with User/SA and from associated namespace
10
10
-**Namespaces**: Kubernetes namespaces associated with User/SA
11
+
-**Roles**: Kubernetes roles associated with User/SA
11
12
12
13
## Key Features
13
14
14
-
### 1. Token Access Review Integration
15
+
### Setting Up Kubernetes RBAC for Feast
15
16
16
-
The system now uses Kubernetes Token Access Review API to extract detailed user information from tokens, including:
17
-
- User groups
18
-
- Associated namespaces
19
-
- User identity information
17
+
#### Role based auth setup
20
18
21
-
### 2. Enhanced User Model
19
+
To ensure the Kubernetes RBAC environment aligns with Feast's RBAC configuration, follow these guidelines:
20
+
* The roles defined in Feast `Permission` instances must have corresponding Kubernetes RBAC `Role` names.
21
+
* The Kubernetes RBAC `Role` must reside in the same namespace as the Feast service.
22
+
* The client application can run in a different namespace, using its own dedicated `ServiceAccount`.
23
+
* Finally, the `RoleBinding` that links the client `ServiceAccount` to the RBAC `Role` must be defined in the namespace of the Feast service.
22
24
23
-
The `User` class has been extended along with roles to include:
24
-
-`groups`: List of user groups
25
-
-`namespaces`: List of associated namespaces
25
+
#### Group and Namespace based auth setup
26
26
27
-
### 3. New Policy Types
27
+
To ensure the Kubernetes RBAC environment aligns with Feast's RBAC configuration, follow these guidelines:
28
+
* The groups and namespaces defined in Feast `Permission` instances must have corresponding Kubernetes `Group` and `Namespace` names.
29
+
* The user or service account must reside in the group or namespace defined in the Feast `Permission` instances.
30
+
* The client application can run in a different namespace, using its own dedicated `ServiceAccount` or user.
31
+
* Finally, the feast service grants access based on the group and namespace association defined in the Feast `Permission` instances.
28
32
29
-
Three new policy types have been introduced:
33
+
## Policy Types
30
34
31
-
#### GroupBasedPolicy
35
+
### RoleBasedPolicy
36
+
Grants access based on user role membership.
37
+
38
+
```python
39
+
from feast.permissions.policy import RoleBasedPolicy
The server automatically extracts groupsand namespaces when using Kubernetes authentication. No additional configuration is required beyond the existing Kubernetes auth setup.
78
+
The server automatically extracts groups, namespaces and roles when using Kubernetes authentication. No additional configuration is required beyond the existing Kubernetes auth setup.
66
79
67
80
### Client Configuration
68
81
69
82
For external users (not service accounts), you can provide a user token in the configuration:
70
83
71
-
72
84
Refer examples of providing the token are described in doc [User Token Provisioning](./user_token_provisioning.md)
73
85
74
86
## Usage Examples
@@ -80,11 +92,20 @@ from feast.feast_object import ALL_RESOURCE_TYPES
80
92
from feast.permissions.action importREAD, AuthzedAction, ALL_ACTIONS
81
93
from feast.permissions.permission import Permission
0 commit comments