Security
Secure Feast with SSL/TLS, Authentication and Authorization.
Last updated
Secure Feast with SSL/TLS, Authentication and Authorization.
Last updated
This page applies to Feast 0.7. The content may be out of date for Feast 0.8+
Feast supports the following security methods:
Important considerations when integrating Authentication/Authorization.
Feast supports SSL/TLS encrypted inter-service communication among Feast Core, Feast Online Serving, and Feast SDKs.
The following properties configure SSL/TLS. These properties are located in their corresponding application.yml
files:
Configuration Property | Description |
| Enables SSL/TLS functionality if |
| Provide the path to certificate chain. |
| Provide the to private key. |
Read more on enabling SSL/TLS in the gRPC starter docs.
To enable SSL/TLS in the Feast Python SDK or Feast CLI, set the config options via feast config
:
Configuration Option | Description |
| Enables SSL/TLS functionality on connections to Feast core if |
| Enables SSL/TLS functionality on connections to Feast Online Serving if |
| Optional. Specifies the path of the root certificate used to verify Core Service's identity. If omitted, uses system certificates. |
| Optional. Specifies the path of the root certificate used to verify Serving Service's identity. If omitted, uses system certificates. |
The Python SDK automatically uses SSL/TLS when connecting to Feast Core and Feast Online Serving via port 443.
Configure SSL/TLS on the Go SDK by passing configuration via SecurityConfig
:
Config Option | Description |
| Enables SSL/TLS functionality when connecting to Feast if |
| Optional. Provides the path of the root certificate used to verify Feast Service's identity. If omitted, uses system certificates. |
Configure SSL/TLS on the Feast Java SDK by passing configuration via SecurityConfig
:
Config Option | Description |
| Enables SSL/TLS functionality when connecting to Feast if |
| Optional. Set the path of the root certificate used to verify Feast Service's identity. If omitted, uses system certificates. |
To prevent man in the middle attacks, we recommend that SSL/TLS be implemented prior to authentication.
Authentication can be implemented to identify and validate client requests to Feast Core and Feast Online Serving. Currently, Feast uses Open ID Connect (OIDC) ID tokens (i.e. Google Open ID Connect) to authenticate client requests.
Authentication can be configured for Feast Core and Feast Online Serving via properties in their corresponding application.yml
files:
Configuration Property | Description |
| Enables Authentication functionality if |
| Authentication Provider type. Currently only supports |
| HTTPS URL used by Feast to retrieved the JWK used to verify OIDC ID tokens. |
jwkEndpointURI
is set to retrieve Google's OIDC JWK by default, allowing OIDC ID tokens issued by Google to be used for authentication.
Behind the scenes, Feast Core and Feast Online Serving authenticate by:
Extracting the OIDC ID token TOKEN
from gRPC metadata submitted with request:
Validates token's authenticity using the JWK retrieved from the jwkEndpointURI
Feast Online Serving communicates with Feast Core during normal operation. When both authentication and authorization are enabled on Feast Core, Feast Online Serving is forced to authenticate its requests to Feast Core. Otherwise, Feast Online Serving produces an Authentication failure error when connecting to Feast Core.
Properties used to configure Serving authentication via application.yml
:
Configuration Property | Description |
| Requires Feast Online Serving to authenticate when communicating with Feast Core. |
| Selects provider Feast Online Serving uses to retrieve credentials then used to authenticate requests to Feast Core. Valid providers are |
Google Provider automatically extracts the credential from the credential JSON file.
Set GOOGLE_APPLICATION_CREDENTIALS
environment variable to the path of the credential in the JSON file.
Configure the Feast Python SDK and Feast CLI to use authentication via feast config
:
Configuration Option | Description |
| Enables authentication functionality if set to |
| Use an authentication provider to obtain a credential for authentication. Currently supports |
| Manually specify a static token for use in authentication. Overrules |
Google Provider automatically finds and uses Google Credentials to authenticate requests:
Google Provider automatically uses established credentials for authenticating requests if you are already authenticated with the gcloud
CLI via:
Alternatively Google Provider can be configured to use the credentials in the JSON file viaGOOGLE_APPLICATION_CREDENTIALS
environmental variable (Google Cloud Authentication documentation):
Configure the Feast Java SDK to use authentication by specifying the credential via SecurityConfig
:
Google Credential uses Service Account credentials JSON file set viaGOOGLE_APPLICATION_CREDENTIALS
environmental variable (Google Cloud Authentication documentation) to obtain tokens for Authenticating Feast requests:
Exporting GOOGLE_APPLICATION_CREDENTIALS
Create a Google Credential with target audience.
Target audience of the credential should be set to host URL of target Service. (ie
https://localhost
if Service listens onlocalhost
):
Configure the Feast Java SDK to use authentication by setting credentials via SecurityConfig
:
GoogleAuthCredentials uses Service Account credentials JSON file set viaGOOGLE_APPLICATION_CREDENTIALS
environmental variable (Google Cloud authentication documentation) to obtain tokens for Authenticating Feast requests:
Exporting GOOGLE_APPLICATION_CREDENTIALS
Create a Google Credential with target audience.
Target audience of the credentials should be set to host URL of target Service. (ie
https://localhost
if Service listens onlocalhost
):
Authorization requires that authentication be configured to obtain a user identity for use in authorizing requests.
Authorization provides access control to FeatureTables and/or Features based on project membership. Users who are members of a project are authorized to:
Create and/or Update a Feature Table in the Project.
Retrieve Feature Values for Features in that Project.
Feast delegates Authorization grants to an external Authorization Server that implements the Authorization Open API specification.
Feast checks whether a user is authorized to make a request by making a checkAccessRequest
to the Authorization Server.
The Authorization Server should return a AuthorizationResult
with whether the user is allowed to make the request.
Authorization can be configured for Feast Core and Feast Online Serving via properties in their corresponding application.yml
Configuration Property | Description |
| Enables authorization functionality if |
| Authentication Provider type. Currently only supports |
| URL endpoint of Authorization Server to make check access requests to. |
| Optional. Name of the claim of the to extract from the ID Token to include in the check access request as Subject. |
This example of the Authorization Server with Keto can be used as a reference implementation for implementing an Authorization Server that Feast supports.
When using Authentication & Authorization, consider:
Enabling Authentication without Authorization makes authentication optional. You can still send unauthenticated requests.
Enabling Authorization forces all requests to be authenticated. Requests that are not authenticated are dropped.