diff --git a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/conda-store/config/conda_store_config.py b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/conda-store/config/conda_store_config.py index f14c352973..8e193578b9 100644 --- a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/conda-store/config/conda_store_config.py +++ b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/conda-store/config/conda_store_config.py @@ -10,8 +10,10 @@ from pathlib import Path import requests + from conda_store_server import api from conda_store_server._internal import schema +from conda_store_server.server import schema as auth_schema from conda_store_server._internal.server.dependencies import get_conda_store from conda_store_server.server.auth import GenericOAuthAuthentication from conda_store_server.storage import S3Storage @@ -357,7 +359,7 @@ def _get_conda_store_client_roles_for_user( return client_roles_rich def _get_current_entity_bindings(self, username): - entity = schema.AuthenticationToken( + entity = auth_schema.AuthenticationToken( primary_namespace=username, role_bindings={} ) self.log.info(f"entity: {entity}") @@ -387,7 +389,7 @@ async def authenticate(self, request): # superadmin gets access to everything if "conda_store_superadmin" in user_data.get("roles", []): - return schema.AuthenticationToken( + return auth_schema.AuthenticationToken( primary_namespace=username, role_bindings={"*/*": {"admin"}}, ) @@ -425,7 +427,7 @@ async def authenticate(self, request): if _namespace is None: api.ensure_namespace(db, name=namespace) - return schema.AuthenticationToken( + return auth_schema.AuthenticationToken( primary_namespace=username, role_bindings=role_bindings, )