| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
An Authorization Manager is an instance of the AuthManager class that is plugged into one of the Feast servers to extract user details from the current request and inject them into the permission framework.
{% hint style="info" %} Note: Feast does not provide authentication capabilities; it is the client's responsibility to manage the authentication token and pass it to the Feast server, which then validates the token and extracts user details from the configured authentication server. {% endhint %}
Two authorization managers are supported out-of-the-box:
These instances are created when the Feast servers are initialized, according to the authorization configuration defined in their own feature_store.yaml.
Feast servers and clients must have consistent authorization configuration, so that the client proxies can automatically inject the authorization tokens that the server can properly identify and use to enforce permission validations.
The server-side implementation of the authorization functionality is defined here. Few of the key models, classes to understand the authorization implementation on the client side can be found here.
The authorization is configured using a dedicated auth section in the feature_store.yaml configuration.
Note: As a consequence, when deploying the Feast servers with the Helm charts, the feature_store_yaml_base64 value must include the auth section to specify the authorization configuration.
This configuration applies the default no_auth authorization:
project: my-project
auth:
type: no_auth
...With OIDC authorization, the Feast client proxies retrieve the JWT token from an OIDC server (or Identity Provider) and append it in every request to a Feast server, using an Authorization Bearer Token.
The server, in turn, uses the same OIDC server to validate the token and extract the user roles from the token itself.
Some assumptions are made in the OIDC server configuration:
(*) 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:
{
"resource_access": {
"app": {
"roles": [
"reader"
]
}
}
}An example of feast OIDC authorization configuration on the server side is the following:
project: my-project
auth:
type: oidc
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:
auth:
type: oidc
...
username: _USERNAME_
password: _PASSWORD_
client_secret: _CLIENT_SECRET__Below is an example of feast full OIDC client auth configuration:
project: my-project
auth:
type: oidc
client_id: test_client_id
client_secret: test_client_secret
username: test_user_name
password: test_password
auth_discovery_url: http://localhost:8080/realms/master/.well-known/openid-configurationWith 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.
An example of Kubernetes RBAC authorization configuration is the following: {% hint style="info" %} NOTE: This configuration will only work if you deploy feast on Openshift or a Kubernetes platform. {% endhint %}
project: my-project
auth:
type: kubernetes
...In case the client cannot run on the same cluster as the servers, the client token can be injected using the LOCAL_K8S_TOKEN environment variable on the client side. The value must refer to the token of a service account created on the servers cluster and linked to the desired RBAC roles.
To ensure the Kubernetes RBAC environment aligns with Feast's RBAC configuration, follow these guidelines:
If the above rules are satisfied, the Feast service must be granted permissions to fetch RoleBinding instances from the local namespace.
| Back | FazBrowse Home | New Git URL |