diff options
| author | Liam Mitchell <[email protected]> | 2026-01-14 15:34:57 -0800 |
|---|---|---|
| committer | Liam Mitchell <[email protected]> | 2026-01-14 15:36:09 -0800 |
| commit | e44934cf1b4783420f5a4c6acbdbac44488d92a9 (patch) | |
| tree | 54514f3878421108ce26a1f88eafda95aa90f6aa /src/zenserver/storage/projectstore/httpprojectstore.cpp | |
| parent | added early-out check in GcManager::ScrubStorage(ScrubContext& GcCtx) (#698) (diff) | |
| download | zen-e44934cf1b4783420f5a4c6acbdbac44488d92a9.tar.xz zen-e44934cf1b4783420f5a4c6acbdbac44488d92a9.zip | |
Use well-known OidcToken paths or command line arguments to determine OidcToken executable path
Diffstat (limited to 'src/zenserver/storage/projectstore/httpprojectstore.cpp')
| -rw-r--r-- | src/zenserver/storage/projectstore/httpprojectstore.cpp | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/src/zenserver/storage/projectstore/httpprojectstore.cpp b/src/zenserver/storage/projectstore/httpprojectstore.cpp index 4e947f221..3a48ef595 100644 --- a/src/zenserver/storage/projectstore/httpprojectstore.cpp +++ b/src/zenserver/storage/projectstore/httpprojectstore.cpp @@ -23,6 +23,7 @@ #include <zenstore/oplogreferencedset.h> #include <zenstore/projectstore.h> #include <zenstore/zenstore.h> +#include <zenutil/authutils.h> #include <zenutil/openprocesscache.h> #include <zenutil/workerpools.h> @@ -101,7 +102,6 @@ CSVWriteOp(CidStore& CidStore, ////////////////////////////////////////////////////////////////////////// namespace { - void CbWriteOp(CidStore& CidStore, bool Details, bool OpDetails, @@ -317,19 +317,9 @@ namespace { AccessToken = GetEnvVariable(AccessTokenEnvVariable); } } - std::filesystem::path OidcExePath; - if (std::string_view OidcExePathString = Cloud["oidc-exe-path"].AsString(); !OidcExePathString.empty()) - { - std::filesystem::path OidcExePathMaybe(OidcExePathString); - if (IsFile(OidcExePathMaybe)) - { - OidcExePath = std::move(OidcExePathMaybe); - } - else - { - ZEN_WARN("Path to OidcToken executable '{}' can not be reached by server", OidcExePathString); - } - } + + std::filesystem::path OidcExePath = FindOidcTokenExePath(""); + std::string_view KeyParam = Cloud["key"sv].AsString(); if (KeyParam.empty()) { @@ -435,20 +425,8 @@ namespace { AccessToken = GetEnvVariable(AccessTokenEnvVariable); } } - std::filesystem::path OidcExePath; - if (std::string_view OidcExePathString = Builds["oidc-exe-path"].AsString(); !OidcExePathString.empty()) - { - std::filesystem::path OidcExePathMaybe(OidcExePathString); - if (IsFile(OidcExePathMaybe)) - { - OidcExePath = std::move(OidcExePathMaybe); - } - else - { - ZEN_WARN("Path to OidcToken executable '{}' can not be reached by server", OidcExePathString); - } - } - std::string_view BuildIdParam = Builds["buildsid"sv].AsString(); + std::filesystem::path OidcExePath = FindOidcTokenExePath(""); + std::string_view BuildIdParam = Builds["buildsid"sv].AsString(); if (BuildIdParam.empty()) { return {nullptr, "Missing build id"}; |