aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/storage/projectstore/httpprojectstore.cpp
diff options
context:
space:
mode:
authorLiam Mitchell <[email protected]>2026-01-15 17:08:03 -0800
committerLiam Mitchell <[email protected]>2026-01-15 17:08:03 -0800
commit95d1bf56a77ecbd158e828592110d57f5445ed5e (patch)
treec3416397ac8d6bb448044f31d0b66b581aadce1d /src/zenserver/storage/projectstore/httpprojectstore.cpp
parentUse well-known OidcToken paths or command line arguments to determine OidcTok... (diff)
downloadzen-95d1bf56a77ecbd158e828592110d57f5445ed5e.tar.xz
zen-95d1bf56a77ecbd158e828592110d57f5445ed5e.zip
Pass command-line OidcToken option through config rather than env variables, and add lua option
Diffstat (limited to 'src/zenserver/storage/projectstore/httpprojectstore.cpp')
-rw-r--r--src/zenserver/storage/projectstore/httpprojectstore.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/zenserver/storage/projectstore/httpprojectstore.cpp b/src/zenserver/storage/projectstore/httpprojectstore.cpp
index 3a48ef595..1e1899002 100644
--- a/src/zenserver/storage/projectstore/httpprojectstore.cpp
+++ b/src/zenserver/storage/projectstore/httpprojectstore.cpp
@@ -252,7 +252,8 @@ namespace {
size_t MaxBlockSize,
size_t MaxChunkEmbedSize,
size_t MaximumInMemoryDownloadSize,
- const std::filesystem::path& TempFilePath)
+ const std::filesystem::path& TempFilePath,
+ const std::filesystem::path& OidcTokenExePath)
{
ZEN_MEMSCOPE(GetProjectHttpTag());
@@ -318,7 +319,7 @@ namespace {
}
}
- std::filesystem::path OidcExePath = FindOidcTokenExePath("");
+ std::filesystem::path OidcExePath = FindOidcTokenExePath(OidcTokenExePath.string());
std::string_view KeyParam = Cloud["key"sv].AsString();
if (KeyParam.empty())
@@ -425,7 +426,7 @@ namespace {
AccessToken = GetEnvVariable(AccessTokenEnvVariable);
}
}
- std::filesystem::path OidcExePath = FindOidcTokenExePath("");
+ std::filesystem::path OidcExePath = FindOidcTokenExePath(OidcTokenExePath.string());
std::string_view BuildIdParam = Builds["buildsid"sv].AsString();
if (BuildIdParam.empty())
{
@@ -507,13 +508,14 @@ namespace {
//////////////////////////////////////////////////////////////////////////
-HttpProjectService::HttpProjectService(CidStore& Store,
- ProjectStore* Projects,
- HttpStatusService& StatusService,
- HttpStatsService& StatsService,
- AuthMgr& AuthMgr,
- OpenProcessCache& InOpenProcessCache,
- JobQueue& InJobQueue)
+HttpProjectService::HttpProjectService(CidStore& Store,
+ ProjectStore* Projects,
+ HttpStatusService& StatusService,
+ HttpStatsService& StatsService,
+ AuthMgr& AuthMgr,
+ OpenProcessCache& InOpenProcessCache,
+ JobQueue& InJobQueue,
+ const std::filesystem::path& InOidcTokenExePath)
: m_Log(logging::Get("project"))
, m_CidStore(Store)
, m_ProjectStore(Projects)
@@ -522,6 +524,7 @@ HttpProjectService::HttpProjectService(CidStore& Store,
, m_AuthMgr(AuthMgr)
, m_OpenProcessCache(InOpenProcessCache)
, m_JobQueue(InJobQueue)
+, m_OidcTokenExePath(InOidcTokenExePath)
{
ZEN_MEMSCOPE(GetProjectHttpTag());
@@ -2636,7 +2639,8 @@ HttpProjectService::HandleRpcRequest(HttpRouterRequest& Req)
MaxBlockSize,
MaxChunkEmbedSize,
GetMaxMemoryBufferSize(MaxBlockSize, BoostWorkerMemory),
- Oplog->TempPath());
+ Oplog->TempPath(),
+ m_OidcTokenExePath);
if (RemoteStoreResult.Store == nullptr)
{
@@ -2706,7 +2710,8 @@ HttpProjectService::HandleRpcRequest(HttpRouterRequest& Req)
MaxBlockSize,
MaxChunkEmbedSize,
GetMaxMemoryBufferSize(MaxBlockSize, BoostWorkerMemory),
- Oplog->TempPath());
+ Oplog->TempPath(),
+ m_OidcTokenExePath);
if (RemoteStoreResult.Store == nullptr)
{