Skip to content

Commit

Permalink
Adding missing permissions for offline store test cases - classes Fil…
Browse files Browse the repository at this point in the history
…eSource, FeatureService classes. (feast-dev#64)

Signed-off-by: Lokesh Rangineni <19699092+lokeshrangineni@users.noreply.github.com>
Signed-off-by: Abdul Hameed <ahameed@redhat.com>
  • Loading branch information
lokeshrangineni authored and redhatHameed committed Aug 7, 2024
1 parent a95c234 commit 0a3a3ba
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions sdk/python/tests/integration/feature_repos/repo_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
from feast.constants import FULL_REPO_CONFIGS_MODULE_ENV_NAME
from feast.data_source import DataSource
from feast.errors import FeastModuleImportError
from feast.feature_service import FeatureService
from feast.infra.feature_servers.base_config import (
BaseFeatureServerConfig,
FeatureLoggingConfig,
)
from feast.infra.feature_servers.local_process.config import LocalFeatureServerConfig
from feast.infra.offline_stores.file_source import FileSource
from feast.permissions.action import AuthzedAction
from feast.permissions.auth_model import OidcAuthConfig
from feast.permissions.permission import Permission
Expand Down Expand Up @@ -488,35 +490,49 @@ def setup(self):
Permission(
name="offline_permissions_perm",
types=Permission,
policy=RoleBasedPolicy(roles=["reader", "writer"]),
policy=RoleBasedPolicy(roles=["writer"]),
actions=[AuthzedAction.QUERY_OFFLINE, AuthzedAction.WRITE_OFFLINE],
),
Permission(
name="offline_entities_perm",
types=Entity,
with_subclasses=False,
policy=RoleBasedPolicy(roles=["reader", "writer"]),
policy=RoleBasedPolicy(roles=["writer"]),
actions=[AuthzedAction.QUERY_OFFLINE, AuthzedAction.WRITE_OFFLINE],
),
Permission(
name="offline_fv_perm",
types=FeatureView,
with_subclasses=False,
policy=RoleBasedPolicy(roles=["reader", "writer"]),
policy=RoleBasedPolicy(roles=["writer"]),
actions=[AuthzedAction.QUERY_OFFLINE, AuthzedAction.WRITE_OFFLINE],
),
Permission(
name="offline_odfv_perm",
types=OnDemandFeatureView,
with_subclasses=False,
policy=RoleBasedPolicy(roles=["reader", "writer"]),
policy=RoleBasedPolicy(roles=["writer"]),
actions=[AuthzedAction.QUERY_OFFLINE, AuthzedAction.WRITE_OFFLINE],
),
Permission(
name="offline_sfv_perm",
types=StreamFeatureView,
with_subclasses=False,
policy=RoleBasedPolicy(roles=["reader", "writer"]),
policy=RoleBasedPolicy(roles=["writer"]),
actions=[AuthzedAction.QUERY_OFFLINE, AuthzedAction.WRITE_OFFLINE],
),
Permission(
name="offline_fs_perm",
types=FeatureService,
with_subclasses=False,
policy=RoleBasedPolicy(roles=["writer"]),
actions=[AuthzedAction.QUERY_OFFLINE, AuthzedAction.WRITE_OFFLINE],
),
Permission(
name="offline_filesource_perm",
types=FileSource,
with_subclasses=False,
policy=RoleBasedPolicy(roles=["writer"]),
actions=[AuthzedAction.QUERY_OFFLINE, AuthzedAction.WRITE_OFFLINE],
),
]
Expand Down

0 comments on commit 0a3a3ba

Please sign in to comment.