|
22 | 22 | from feast.constants import FULL_REPO_CONFIGS_MODULE_ENV_NAME |
23 | 23 | from feast.data_source import DataSource |
24 | 24 | from feast.errors import FeastModuleImportError |
| 25 | +from feast.feature_service import FeatureService |
25 | 26 | from feast.infra.feature_servers.base_config import ( |
26 | 27 | BaseFeatureServerConfig, |
27 | 28 | FeatureLoggingConfig, |
28 | 29 | ) |
29 | 30 | from feast.infra.feature_servers.local_process.config import LocalFeatureServerConfig |
| 31 | +from feast.infra.offline_stores.file_source import FileSource |
30 | 32 | from feast.permissions.action import AuthzedAction |
31 | 33 | from feast.permissions.auth_model import OidcAuthConfig |
32 | 34 | from feast.permissions.permission import Permission |
@@ -488,35 +490,49 @@ def setup(self): |
488 | 490 | Permission( |
489 | 491 | name="offline_permissions_perm", |
490 | 492 | types=Permission, |
491 | | - policy=RoleBasedPolicy(roles=["reader", "writer"]), |
| 493 | + policy=RoleBasedPolicy(roles=["writer"]), |
492 | 494 | actions=[AuthzedAction.QUERY_OFFLINE, AuthzedAction.WRITE_OFFLINE], |
493 | 495 | ), |
494 | 496 | Permission( |
495 | 497 | name="offline_entities_perm", |
496 | 498 | types=Entity, |
497 | 499 | with_subclasses=False, |
498 | | - policy=RoleBasedPolicy(roles=["reader", "writer"]), |
| 500 | + policy=RoleBasedPolicy(roles=["writer"]), |
499 | 501 | actions=[AuthzedAction.QUERY_OFFLINE, AuthzedAction.WRITE_OFFLINE], |
500 | 502 | ), |
501 | 503 | Permission( |
502 | 504 | name="offline_fv_perm", |
503 | 505 | types=FeatureView, |
504 | 506 | with_subclasses=False, |
505 | | - policy=RoleBasedPolicy(roles=["reader", "writer"]), |
| 507 | + policy=RoleBasedPolicy(roles=["writer"]), |
506 | 508 | actions=[AuthzedAction.QUERY_OFFLINE, AuthzedAction.WRITE_OFFLINE], |
507 | 509 | ), |
508 | 510 | Permission( |
509 | 511 | name="offline_odfv_perm", |
510 | 512 | types=OnDemandFeatureView, |
511 | 513 | with_subclasses=False, |
512 | | - policy=RoleBasedPolicy(roles=["reader", "writer"]), |
| 514 | + policy=RoleBasedPolicy(roles=["writer"]), |
513 | 515 | actions=[AuthzedAction.QUERY_OFFLINE, AuthzedAction.WRITE_OFFLINE], |
514 | 516 | ), |
515 | 517 | Permission( |
516 | 518 | name="offline_sfv_perm", |
517 | 519 | types=StreamFeatureView, |
518 | 520 | with_subclasses=False, |
519 | | - policy=RoleBasedPolicy(roles=["reader", "writer"]), |
| 521 | + policy=RoleBasedPolicy(roles=["writer"]), |
| 522 | + actions=[AuthzedAction.QUERY_OFFLINE, AuthzedAction.WRITE_OFFLINE], |
| 523 | + ), |
| 524 | + Permission( |
| 525 | + name="offline_fs_perm", |
| 526 | + types=FeatureService, |
| 527 | + with_subclasses=False, |
| 528 | + policy=RoleBasedPolicy(roles=["writer"]), |
| 529 | + actions=[AuthzedAction.QUERY_OFFLINE, AuthzedAction.WRITE_OFFLINE], |
| 530 | + ), |
| 531 | + Permission( |
| 532 | + name="offline_filesource_perm", |
| 533 | + types=FileSource, |
| 534 | + with_subclasses=False, |
| 535 | + policy=RoleBasedPolicy(roles=["writer"]), |
520 | 536 | actions=[AuthzedAction.QUERY_OFFLINE, AuthzedAction.WRITE_OFFLINE], |
521 | 537 | ), |
522 | 538 | ] |
|
0 commit comments