aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/config
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/config
parentUse well-known OidcToken paths or command line arguments to determine OidcTok... (diff)
downloadzen-lm/oidctoken-exe-path.tar.xz
zen-lm/oidctoken-exe-path.zip
Pass command-line OidcToken option through config rather than env variables, and add lua optionlm/oidctoken-exe-path
Diffstat (limited to 'src/zenserver/config')
-rw-r--r--src/zenserver/config/config.cpp21
-rw-r--r--src/zenserver/config/config.h17
2 files changed, 14 insertions, 24 deletions
diff --git a/src/zenserver/config/config.cpp b/src/zenserver/config/config.cpp
index f5170add8..18187711b 100644
--- a/src/zenserver/config/config.cpp
+++ b/src/zenserver/config/config.cpp
@@ -182,7 +182,6 @@ struct ZenServerCmdLineOptions
std::string DataDir;
std::string AbsLogFile;
std::string BaseSnapshotDir;
- std::string OidcTokenExecutable;
void AddCliOptions(cxxopts::Options& options, ZenServerConfig& ServerOptions);
void ApplyOptions(cxxopts::Options& options, ZenServerConfig& ServerOptions);
@@ -375,13 +374,6 @@ ZenServerCmdLineOptions::AddCliOptions(cxxopts::Options& options, ZenServerConfi
"",
cxxopts::value<bool>(ServerOptions.StatsConfig.Enabled)->default_value("false"),
"Enable statsd reporter (localhost:8125)");
-
- options.add_option("auth",
- "",
- "oidctoken-exe-path",
- "Path to OidcToken executable",
- cxxopts::value<std::string>(OidcTokenExecutable)->default_value(""),
- "");
}
void
@@ -396,13 +388,12 @@ ZenServerCmdLineOptions::ApplyOptions(cxxopts::Options& options, ZenServerConfig
throw std::runtime_error(fmt::format("'--snapshot-dir' ('{}') must be a directory", ServerOptions.BaseSnapshotDir));
}
- ServerOptions.SystemRootDir = MakeSafeAbsolutePath(SystemRootDir);
- ServerOptions.DataDir = MakeSafeAbsolutePath(DataDir);
- ServerOptions.ContentDir = MakeSafeAbsolutePath(ContentDir);
- ServerOptions.AbsLogFile = MakeSafeAbsolutePath(AbsLogFile);
- ServerOptions.ConfigFile = MakeSafeAbsolutePath(ConfigFile);
- ServerOptions.BaseSnapshotDir = MakeSafeAbsolutePath(BaseSnapshotDir);
- ServerOptions.OidcTokenExecutable = MakeSafeAbsolutePath(OidcTokenExecutable);
+ ServerOptions.SystemRootDir = MakeSafeAbsolutePath(SystemRootDir);
+ ServerOptions.DataDir = MakeSafeAbsolutePath(DataDir);
+ ServerOptions.ContentDir = MakeSafeAbsolutePath(ContentDir);
+ ServerOptions.AbsLogFile = MakeSafeAbsolutePath(AbsLogFile);
+ ServerOptions.ConfigFile = MakeSafeAbsolutePath(ConfigFile);
+ ServerOptions.BaseSnapshotDir = MakeSafeAbsolutePath(BaseSnapshotDir);
}
//////////////////////////////////////////////////////////////////////////
diff --git a/src/zenserver/config/config.h b/src/zenserver/config/config.h
index 2d37697cd..40639da13 100644
--- a/src/zenserver/config/config.h
+++ b/src/zenserver/config/config.h
@@ -55,15 +55,14 @@ struct ZenServerConfig
bool IsDedicated = false; // Indicates a dedicated/shared instance, with larger resource requirements
bool ShouldCrash = false; // Option for testing crash handling
bool IsFirstRun = false;
- std::filesystem::path ConfigFile; // Path to Lua config file
- std::filesystem::path SystemRootDir; // System root directory (used for machine level config)
- std::filesystem::path ContentDir; // Root directory for serving frontend content (experimental)
- std::filesystem::path DataDir; // Root directory for state (used for testing)
- std::filesystem::path AbsLogFile; // Absolute path to main log file
- std::filesystem::path BaseSnapshotDir; // Path to server state snapshot (will be copied into data dir on start)
- std::filesystem::path OidcTokenExecutable; // Path to OidcToken executable to use for auth
- std::string ChildId; // Id assigned by parent process (used for lifetime management)
- std::string LogId; // Id for tagging log output
+ std::filesystem::path ConfigFile; // Path to Lua config file
+ std::filesystem::path SystemRootDir; // System root directory (used for machine level config)
+ std::filesystem::path ContentDir; // Root directory for serving frontend content (experimental)
+ std::filesystem::path DataDir; // Root directory for state (used for testing)
+ std::filesystem::path AbsLogFile; // Absolute path to main log file
+ std::filesystem::path BaseSnapshotDir; // Path to server state snapshot (will be copied into data dir on start)
+ std::string ChildId; // Id assigned by parent process (used for lifetime management)
+ std::string LogId; // Id for tagging log output
std::string Loggers[zen::logging::level::LogLevelCount];
#if ZEN_WITH_TRACE
bool HasTraceCommandlineOptions = false;