diff options
author | qrort <qrort@yandex-team.com> | 2022-11-30 23:47:12 +0300 |
---|---|---|
committer | qrort <qrort@yandex-team.com> | 2022-11-30 23:47:12 +0300 |
commit | 22f8ae0e3f5d68b92aecccdf96c1d841a0334311 (patch) | |
tree | bffa27765faf54126ad44bcafa89fadecb7a73d7 /library/cpp/monlib/service/auth/tvm/auth.h | |
parent | 332b99e2173f0425444abb759eebcb2fafaa9209 (diff) | |
download | ydb-22f8ae0e3f5d68b92aecccdf96c1d841a0334311.tar.gz |
validate canons without yatest_common
Diffstat (limited to 'library/cpp/monlib/service/auth/tvm/auth.h')
-rw-r--r-- | library/cpp/monlib/service/auth/tvm/auth.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/library/cpp/monlib/service/auth/tvm/auth.h b/library/cpp/monlib/service/auth/tvm/auth.h new file mode 100644 index 0000000000..432beff9d6 --- /dev/null +++ b/library/cpp/monlib/service/auth/tvm/auth.h @@ -0,0 +1,33 @@ +#pragma once + +#include <library/cpp/monlib/service/mon_service_http_request.h> +#include <library/cpp/monlib/service/auth.h> +#include <library/cpp/tvmauth/client/facade.h> + +namespace NMonitoring { + struct ITvmManager { + virtual ~ITvmManager() = default; + virtual bool IsAllowedClient(NTvmAuth::TTvmId clientId) = 0; + virtual NTvmAuth::TCheckedServiceTicket CheckServiceTicket(TStringBuf ticket) = 0; + }; + + THolder<ITvmManager> CreateDefaultTvmManager( + NTvmAuth::NTvmApi::TClientSettings settings, + TVector<NTvmAuth::TTvmId> allowedClients, + NTvmAuth::TLoggerPtr logger = NTvmAuth::TDevNullLogger::IAmBrave()); + + THolder<ITvmManager> CreateDefaultTvmManager( + NTvmAuth::NTvmTool::TClientSettings settings, + TVector<NTvmAuth::TTvmId> allowedClients, + NTvmAuth::TLoggerPtr logger = NTvmAuth::TDevNullLogger::IAmBrave()); + + THolder<ITvmManager> CreateDefaultTvmManager( + TAtomicSharedPtr<NTvmAuth::TTvmClient> client, + TVector<NTvmAuth::TTvmId> allowedClients); + + THolder<ITvmManager> CreateDefaultTvmManager( + std::shared_ptr<NTvmAuth::TTvmClient> client, + TVector<NTvmAuth::TTvmId> allowedClients); + + THolder<IAuthProvider> CreateTvmAuth(THolder<ITvmManager> tvmManager); +} // namespace NMonitoring |