From 481e59a1035e77c69453ca1be7d07bf74de1a033 Mon Sep 17 00:00:00 2001 From: AlexSm Date: Mon, 17 Jun 2024 16:35:06 +0200 Subject: [PATCH 1/2] Update auth.py --- ydb/iam/auth.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ydb/iam/auth.py b/ydb/iam/auth.py index 7b4fa4e8..038d548b 100644 --- a/ydb/iam/auth.py +++ b/ydb/iam/auth.py @@ -16,6 +16,13 @@ from yandex.cloud.iam.v1 import iam_token_service_pb2_grpc from yandex.cloud.iam.v1 import iam_token_service_pb2 except ImportError: + try: + # This attempt is to enable the IAM auth inside the YDB repository on GitHub + from ydb.public.api.client.yc_public.iam import iam_token_service_pb2_grpc + from ydb.public.api.client.yc_public.iam import iam_token_service_pb2 + except ImportError: + iam_token_service_pb2_grpc = None + iam_token_service_pb2 = None iam_token_service_pb2_grpc = None iam_token_service_pb2 = None From ae761188b298c368026107553b857d7aae7c01ef Mon Sep 17 00:00:00 2001 From: AlexSm Date: Mon, 17 Jun 2024 16:36:38 +0200 Subject: [PATCH 2/2] Update auth.py --- ydb/iam/auth.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ydb/iam/auth.py b/ydb/iam/auth.py index 038d548b..dac9fb6c 100644 --- a/ydb/iam/auth.py +++ b/ydb/iam/auth.py @@ -23,8 +23,6 @@ except ImportError: iam_token_service_pb2_grpc = None iam_token_service_pb2 = None - iam_token_service_pb2_grpc = None - iam_token_service_pb2 = None try: import requests