From e44934cf1b4783420f5a4c6acbdbac44488d92a9 Mon Sep 17 00:00:00 2001 From: Liam Mitchell Date: Wed, 14 Jan 2026 15:34:57 -0800 Subject: Use well-known OidcToken paths or command line arguments to determine OidcToken executable path --- .../storage/projectstore/httpprojectstore.cpp | 34 ++++------------------ 1 file changed, 6 insertions(+), 28 deletions(-) (limited to 'src/zenserver/storage/projectstore/httpprojectstore.cpp') 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 #include #include +#include #include #include @@ -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"}; -- cgit v1.2.3