Back to Feast

RBAC demo

examples/rbac-local/README.md

0.63.02.7 KB
Original Source

RBAC demo

RBAC demo with local environment.

System Requirements

  • Clone of the Feast repo
  • Docker
  • yq

Architecture

The demo creates the following components:

  • An OIDC authorization server using a Keycloak docker container and initialized for demo purposes with a sample realm.
  • A sample feature store using feast init, later adapted to use the oidc authorization against the sample realm.
  • Three servers running the registry, online and offline stores.
  • A client application connected to the servers to run test code.

Setup the environment

Run the sample notebooks to setup the environment:

Note: For MacOs users, you must set this environment variable before launching the notebook server:

bash
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

Goal

Once the environment is defined, we can use the client.ipynb notebook to verify how the behavior changes according to the configured user.

In particular, given the configured permissions:

PermissionTypesName patternActionsRoles
read_permissionALLDESCRIBEreader
write_fresh_permissionFeatureView1.*_freshWRITE_ONLINEfresh_writer
offline_permissionFeatureView, OnDemandFeatureView, FeatureServiceCRUD, WRITE_OFFLINE, QUERY_OFFLINEbatch_admin
admin_permissionALLALLstore_admin

and the user roles defined in Keycloak:

UserRoles
readerreader
writerfresh_writer
batch_adminbatch_admin
adminstore_admin

We should expect the following behavior for each test section of the client notebook:

UserBasic validationHistoricalMaterializationOnlineStream push
readerOkDeniedDeniedDeniedDenied
writerEmptyDeniedOkDeniedDenied
batch_adminNo Entities and PermissionsOkDeniedDeniedDenied
adminOkOkOkOkOk