Initialize the global security manager. Must be invoked at Feast server initialization time to create the `SecurityManager` instance. Args: auth_type: The authorization manager type. registry: The feature store registry.
(auth_type: AuthManagerType, fs: "feast.FeatureStore")
| 64 | |
| 65 | |
| 66 | def init_security_manager(auth_type: AuthManagerType, fs: "feast.FeatureStore"): |
| 67 | """ |
| 68 | Initialize the global security manager. |
| 69 | Must be invoked at Feast server initialization time to create the `SecurityManager` instance. |
| 70 | |
| 71 | Args: |
| 72 | auth_type: The authorization manager type. |
| 73 | registry: The feature store registry. |
| 74 | """ |
| 75 | if auth_type == AuthManagerType.NONE: |
| 76 | no_security_manager() |
| 77 | else: |
| 78 | # TODO permissions from registry |
| 79 | set_security_manager( |
| 80 | SecurityManager( |
| 81 | project=fs.project, |
| 82 | registry=fs.registry, |
| 83 | ) |
| 84 | ) |
| 85 | |
| 86 | |
| 87 | def init_auth_manager( |
no test coverage detected