20#ifndef ORES_VARIABILITY_DOMAIN_SYSTEM_SETTINGS_HPP
21#define ORES_VARIABILITY_DOMAIN_SYSTEM_SETTINGS_HPP
37 std::string_view name;
38 std::string_view data_type;
39 std::string_view default_value;
40 std::string_view description;
51 .name =
"system.bootstrap_mode",
52 .data_type =
"boolean",
53 .default_value =
"true",
54 .description =
"Indicates whether the system is in bootstrap mode "
55 "(waiting for initial admin account)."
58 .name =
"system.user_signups",
59 .data_type =
"boolean",
60 .default_value =
"false",
61 .description =
"Controls whether user self-registration is allowed."
64 .name =
"system.signup_requires_authorization",
65 .data_type =
"boolean",
66 .default_value =
"false",
67 .description =
"Controls whether new signups require admin authorization. "
68 "NOT YET IMPLEMENTED - enabling will cause signup to fail."
71 .name =
"system.disable_password_validation",
72 .data_type =
"boolean",
73 .default_value =
"false",
74 .description =
"When enabled, disables strict password validation. "
75 "FOR TESTING/DEVELOPMENT ONLY."
78 .name =
"system.synthetic_data_generation",
79 .data_type =
"boolean",
80 .default_value =
"false",
81 .description =
"Enables synthetic test data generation in the UI. "
82 "FOR TESTING/DEVELOPMENT ONLY."
88 .name =
"iam.token.access_lifetime_seconds",
89 .data_type =
"integer",
90 .default_value =
"1800",
91 .description =
"Lifetime in seconds of every issued JWT access token. "
92 "Default is 1800 (30 minutes)."
95 .name =
"iam.token.party_selection_lifetime_seconds",
96 .data_type =
"integer",
97 .default_value =
"300",
98 .description =
"Lifetime in seconds of the short-lived party-selection "
99 "step token. Default is 300 (5 minutes)."
102 .name =
"iam.token.max_session_seconds",
103 .data_type =
"integer",
104 .default_value =
"28800",
105 .description =
"Hard ceiling in seconds after which a session must "
106 "re-authenticate regardless of refresh activity. Default is 28800 (8 hours)."
109 .name =
"iam.token.refresh_threshold_pct",
110 .data_type =
"integer",
111 .default_value =
"80",
112 .description =
"Percentage of token lifetime at which the client "
113 "proactively requests a token refresh. Default is 80 (80%)."
122[[nodiscard]]
inline const system_setting_definition&
125 if (def.name == name)
128 throw std::out_of_range(
129 std::string(
"System setting definition not found: ") + std::string(name));
137[[nodiscard]]
inline std::string_view
Domain types for system variability.
Definition ores.variability.api.domain.hpp:27
const system_setting_definition & get_setting_definition(std::string_view name)
Looks up a setting definition by name.
Definition system_settings.hpp:123
std::string_view get_setting_default(std::string_view name)
Returns the default value for a registered setting name.
Definition system_settings.hpp:138
constexpr std::array system_setting_definitions
Compile-time registry of all well-known system settings.
Definition system_settings.hpp:49
Metadata for a well-known system setting.
Definition system_settings.hpp:36