Visitar URL original
addresses feedback on rbac doc · feast-dev/feast@09893af · GitHub
Skip to content

Commit 09893af

Browse files
committed
addresses feedback on rbac doc
Signed-off-by: Abdul Hameed <ahameed@redhat.com>
1 parent 5534044 commit 09893af

4 files changed

Lines changed: 19 additions & 93 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
[![License](https://img.shields.io/badge/License-Apache%202.0-blue)](https://github.com/feast-dev/feast/blob/master/LICENSE)
1717
[![GitHub Release](https://img.shields.io/github/v/release/feast-dev/feast.svg?style=flat&sort=semver&color=blue)](https://github.com/feast-dev/feast/releases)
1818

19+
## Join us on Slack!
20+
👋👋👋 [Come say hi on Slack!](https://join.slack.com/t/feastopensource/signup)
21+
1922
## Overview
2023

2124
Feast (**Fea**ture **St**ore) is an open source feature store for machine learning. Feast is the fastest path to manage existing infrastructure to productionize analytic data for model training and online inference.

‎docs/SUMMARY.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* [Feature retrieval](getting-started/concepts/feature-retrieval.md)
1717
* [Point-in-time joins](getting-started/concepts/point-in-time-joins.md)
1818
* [Registry](getting-started/concepts/registry.md)
19-
* [Permissions](getting-started/concepts/permissions.md)
19+
* [Role-Based Access Control (RBAC)](getting-started/architecture/rbac.md)
2020
* [\[Alpha\] Saved dataset](getting-started/concepts/dataset.md)
2121
* [Architecture](getting-started/architecture/README.md)
2222
* [Overview](getting-started/architecture/overview.md)

‎docs/getting-started/architecture/overview.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ typically your Offline Store). We are exploring adding a default streaming engin
1818

1919
* 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.
2020

21-
* Role-Based Access Control (RBAC)[rbac.md](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 Feature Store, 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 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.
2222

2323

Lines changed: 14 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
# Role-Based Access Control (RBAC) in Feast Feature Store
1+
# Role-Based Access Control (RBAC) in Feast
22

33
## Introduction
44

5-
Role-Based Access Control (RBAC) 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 Feature Store, RBAC ensures that only authorized users or groups can access or modify specific resources, thereby maintaining data security and operational integrity.
5+
Role-Based Access Control (RBAC) 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.
66

77
## Functional Requirements
88

9-
The RBAC implementation in Feast Feature Store is designed to:
9+
The RBAC implementation in Feast is designed to:
1010

1111
- **Assign Permissions**: Allow administrators to assign permissions for various operations and resources to users or groups based on their roles.
1212
- **Seamless Integration**: Integrate smoothly with existing business code without requiring significant modifications.
1313
- **Backward Compatibility**: Maintain support for non-authorized models as the default to ensure backward compatibility.
1414

1515
## Business Goals
1616

17-
The primary business goals of implementing RBAC in the Feast Feature Store are:
18-
19-
1. **Feature Sharing**: Enable multiple teams to share the feature store while ensuring controlled access to data partitions. This allows for collaborative work without compromising data security.
17+
The primary business goals of implementing RBAC in the Feast are:
2018

19+
1. **Feature Sharing**: Enable multiple teams to share the feature store while ensuring controlled access. This allows for collaborative work without compromising data security.
2120
2. **Access Control Management**: Prevent unauthorized access to team-specific resources and spaces, governing the operations that each user or group can perform.
2221

2322
## Reference Architecture
2423

25-
The Feast Feature Store operates as a collection of connected services, each enforcing authorization permissions. The architecture is designed as a distributed microservices system with the following key components:
24+
Feast operates as a collection of connected services, each enforcing authorization permissions. The architecture is designed as a distributed microservices system with the following key components:
2625

2726
- **Service Endpoints**: These enforce authorization permissions, ensuring that only authorized requests are processed.
28-
- **Client Integration**: Clients interact with the feature store by automatically adding authorization headers to their requests, simplifying the process for users.
29-
- **Service-to-Service Communication**: This is always granted, ensuring smooth operation across the distributed system.
27+
- **Client Integration**: Clients authenticate with feature servers by attaching authorization token to each request.
28+
- **Service-to-Service Communication**: This is always granted.
29+
3030
![rbac.jpg](rbac.jpg)
3131

3232
## Permission Model
@@ -37,97 +37,20 @@ The RBAC system in Feast uses a permission model that defines the following conc
3737
- **Action**: A logical operation performed on a resource, such as Create, Describe, Update, Delete, query, or write operations.
3838
- **Policy**: A set of rules that enforce authorization decisions on resources. The default implementation uses role-based policies.
3939

40-
### Configuring Permissions
41-
42-
Permissions in Feast are configured as follows:
43-
44-
- **Resource Identification**: Resources are identified by type, optional name patterns, and tags.
45-
- **Allowed Operations**: Defined by the `AuthzedAction` enumeration, which specifies the actions that can be performed on the resource.
46-
- **RBAC Policies**: These are specified by the list of required roles, which are then registered in the Feast Registry.
47-
48-
Example:
49-
```python
50-
Permission(
51-
name="ds-writer",
52-
types=[DataSource],
53-
required_tags={"risk_level": "hi"},
54-
actions=[AuthzedAction.WRITE_ONLINE, AuthzedAction.WRITE_OFFLINE],
55-
policy=RoleBasedPolicy(roles=["admin", "data_team"]),
56-
)
57-
```
58-
59-
### Enforcing Permission Policy
60-
61-
Authorization is enforced using assert-style code within service endpoint functions. Unauthorized requests result in a `PermissionError` or an HTTP 403-Forbidden response.
62-
63-
Example:
64-
```python
65-
assert_permissions(
66-
resource=feature_service,
67-
actions=[AuthzedAction.QUERY_ONLINE]
68-
)
69-
```
70-
71-
## Use Cases
72-
73-
### Tag-Based Permission
74-
Permit team1 to access feature views `fv1` and `fv2` with role `role1`:
75-
```python
76-
Permission(
77-
name="team1-fvs",
78-
types=[FeatureView],
79-
required_tags={"team": "team1"},
80-
actions=[CRUD, WRITE, QUERY],
81-
policy=RoleBasedPolicy(roles=["role1"]),
82-
)
83-
```
84-
85-
### Name-Based Permission
86-
Permit team1 to access feature views `fv1` and `fv2` with role `role1` using explicit name matching:
87-
```python
88-
Permission(
89-
name="team1-fv1",
90-
types=[FeatureView],
91-
name_filter="fv1",
92-
actions=[CRUD, WRITE, QUERY],
93-
policy=RoleBasedPolicy(roles=["role1"]),
94-
)
95-
```
40+
9641

9742
## Authorization Architecture
9843

9944
The authorization architecture in Feast is built with the following components:
10045

101-
1. **Token Extractor**: Extracts the authorization token from the request header.
102-
2. **Token Parser**: Parses the token to retrieve user details.
103-
3. **Policy Enforcer**: Validates the secured endpoint against the retrieved user details.
104-
4. **Token Injector**: Adds the authorization token to each secured request header.
105-
106-
### OIDC Authorization
107-
108-
OpenID Connect (OIDC) authorization in Feast is supported by configuring the OIDC server to export user roles within a JWT token. The client then connects to the OIDC server to fetch this token, which is parsed by the server to extract the user's roles.
46+
- **Token Extractor**: Extracts the authorization token from the request header.
47+
- **Token Parser**: Parses the token to retrieve user details.
48+
- **Policy Enforcer**: Validates the secured endpoint against the retrieved user details.
49+
- **Token Injector**: Adds the authorization token to each secured request header.
10950

110-
Example configuration:
111-
```yaml
112-
auth:
113-
type: oidc
114-
client_id: _CLIENT_ID_
115-
client_secret: _CLIENT_SECRET_
116-
username: _USERNAME_
117-
password: _PASSWORD_
118-
realm: _REALM_
119-
auth_server_url: _OIDC_SERVER_URL_
120-
```
12151

122-
### Kubernetes Authorization
12352

124-
In Kubernetes environments, all clients and servers run in the same cluster. The policy roles are mapped one-to-one with Kubernetes RBAC roles. The client injects the JWT token of its ServiceAccount, and the server extracts the service account name parsed from the token to look for the associated Role and ClusterRole.
12553

126-
Example configuration:
127-
```yaml
128-
auth:
129-
type: kubernetes
130-
```
13154

13255

13356

0 commit comments

Comments
 (0)