blob: 17c22787476922f249b99c7d723f3ccf16197cc2 [file] [log] [blame]
Ed Tanous40e9b922024-09-10 13:50:16 -07001// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright OpenBMC Authors
Kowalski, Kamil2b7981f2018-01-31 13:24:59 +01003#pragma once
4
Ed Tanous04e438c2020-10-03 08:06:26 -07005#include "logging.hpp"
Ed Tanous2c6ffdb2023-06-28 11:28:38 -07006#include "ossl_random.hpp"
Ed Tanous04e438c2020-10-03 08:06:26 -07007#include "utility.hpp"
Ed Tanous3ccb3ad2023-01-13 17:40:03 -08008#include "utils/ip_utils.hpp"
Ed Tanousfc76b8a2020-09-28 17:21:52 -07009
Ed Tanous1abe55e2018-09-05 08:30:59 -070010#include <nlohmann/json.hpp>
Ratan Gupta12c04ef2019-04-03 10:08:11 +053011
Xie Ning9fa06f12022-06-29 18:27:47 +080012#include <algorithm>
Gunnar Mills1214b7e2020-06-04 10:11:30 -050013#include <csignal>
Ed Tanous89cda632024-04-16 08:45:54 -070014#include <memory>
Ed Tanousbb759e32022-08-02 17:07:54 -070015#include <optional>
Gunnar Mills1214b7e2020-06-04 10:11:30 -050016#include <random>
Ed Tanousb7f3a822024-06-05 08:45:25 -070017#include <string>
Ed Tanous89cda632024-04-16 08:45:54 -070018#include <vector>
Kowalski, Kamil2b7981f2018-01-31 13:24:59 +010019
Ed Tanous1abe55e2018-09-05 08:30:59 -070020namespace persistent_data
21{
Kowalski, Kamil2b7981f2018-01-31 13:24:59 +010022
Ed Tanous51dae672018-09-05 16:07:32 -070023// entropy: 20 characters, 62 possibilities. log2(62^20) = 119 bits of
24// entropy. OWASP recommends at least 64
25// https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html#session-id-entropy
26constexpr std::size_t sessionTokenSize = 20;
27
Ed Tanous89cda632024-04-16 08:45:54 -070028enum class SessionType
Ed Tanous1abe55e2018-09-05 08:30:59 -070029{
Ed Tanous89cda632024-04-16 08:45:54 -070030 None,
31 Basic,
32 Session,
33 Cookie,
34 MutualTLS
Kowalski, Kamil2b7981f2018-01-31 13:24:59 +010035};
36
Ed Tanous1abe55e2018-09-05 08:30:59 -070037struct UserSession
38{
39 std::string uniqueId;
40 std::string sessionToken;
41 std::string username;
42 std::string csrfToken;
Ed Tanousbb759e32022-08-02 17:07:54 -070043 std::optional<std::string> clientId;
Sunitha Harish92f68222020-05-28 05:09:09 -050044 std::string clientIp;
Ed Tanous1abe55e2018-09-05 08:30:59 -070045 std::chrono::time_point<std::chrono::steady_clock> lastUpdated;
Ed Tanous89cda632024-04-16 08:45:54 -070046 SessionType sessionType{SessionType::None};
Ed Tanous7e9c08e2023-06-16 11:29:37 -070047 bool cookieAuth = false;
Joseph Reynolds3bf4e632020-02-06 14:44:32 -060048 bool isConfigureSelfOnly = false;
Ed Tanous47f29342024-03-19 12:18:06 -070049 std::string userRole;
50 std::vector<std::string> userGroups;
Joseph Reynolds3bf4e632020-02-06 14:44:32 -060051
52 // There are two sources of truth for isConfigureSelfOnly:
53 // 1. When pamAuthenticateUser() returns PAM_NEW_AUTHTOK_REQD.
54 // 2. D-Bus User.Manager.GetUserInfo property UserPasswordExpired.
55 // These should be in sync, but the underlying condition can change at any
56 // time. For example, a password can expire or be changed outside of
57 // bmcweb. The value stored here is updated at the start of each
58 // operation and used as the truth within bmcweb.
Kowalski, Kamil5cef0f72018-02-15 15:26:51 +010059
Ed Tanous1abe55e2018-09-05 08:30:59 -070060 /**
61 * @brief Fills object with data from UserSession's JSON representation
62 *
63 * This replaces nlohmann's from_json to ensure no-throw approach
64 *
65 * @param[in] j JSON object from which data should be loaded
66 *
67 * @return a shared pointer if data has been loaded properly, nullptr
68 * otherwise
69 */
Ed Tanous0bdda662023-08-03 17:27:34 -070070 static std::shared_ptr<UserSession>
71 fromJson(const nlohmann::json::object_t& j)
Ed Tanous1abe55e2018-09-05 08:30:59 -070072 {
73 std::shared_ptr<UserSession> userSession =
74 std::make_shared<UserSession>();
Ed Tanous0bdda662023-08-03 17:27:34 -070075 for (const auto& element : j)
Ed Tanous1abe55e2018-09-05 08:30:59 -070076 {
77 const std::string* thisValue =
Ed Tanous0bdda662023-08-03 17:27:34 -070078 element.second.get_ptr<const std::string*>();
Ed Tanous1abe55e2018-09-05 08:30:59 -070079 if (thisValue == nullptr)
80 {
Ed Tanous62598e32023-07-17 17:06:25 -070081 BMCWEB_LOG_ERROR(
82 "Error reading persistent store. Property {} was not of type string",
Ed Tanous0bdda662023-08-03 17:27:34 -070083 element.first);
Ed Tanousdc511aa2020-10-21 12:33:42 -070084 continue;
Ed Tanous1abe55e2018-09-05 08:30:59 -070085 }
Ed Tanous0bdda662023-08-03 17:27:34 -070086 if (element.first == "unique_id")
Ed Tanous1abe55e2018-09-05 08:30:59 -070087 {
88 userSession->uniqueId = *thisValue;
89 }
Ed Tanous0bdda662023-08-03 17:27:34 -070090 else if (element.first == "session_token")
Ed Tanous1abe55e2018-09-05 08:30:59 -070091 {
92 userSession->sessionToken = *thisValue;
93 }
Ed Tanous0bdda662023-08-03 17:27:34 -070094 else if (element.first == "csrf_token")
Ed Tanous1abe55e2018-09-05 08:30:59 -070095 {
96 userSession->csrfToken = *thisValue;
97 }
Ed Tanous0bdda662023-08-03 17:27:34 -070098 else if (element.first == "username")
Ed Tanous1abe55e2018-09-05 08:30:59 -070099 {
100 userSession->username = *thisValue;
101 }
Ed Tanous0bdda662023-08-03 17:27:34 -0700102 else if (element.first == "client_id")
Sunitha Harish08bdcc72020-05-12 05:17:57 -0500103 {
104 userSession->clientId = *thisValue;
105 }
Ed Tanous0bdda662023-08-03 17:27:34 -0700106 else if (element.first == "client_ip")
Sunitha Harish92f68222020-05-28 05:09:09 -0500107 {
108 userSession->clientIp = *thisValue;
109 }
110
Ed Tanous1abe55e2018-09-05 08:30:59 -0700111 else
112 {
Ed Tanous62598e32023-07-17 17:06:25 -0700113 BMCWEB_LOG_ERROR(
114 "Got unexpected property reading persistent file: {}",
Ed Tanous0bdda662023-08-03 17:27:34 -0700115 element.first);
Ed Tanousdc511aa2020-10-21 12:33:42 -0700116 continue;
Ed Tanous1abe55e2018-09-05 08:30:59 -0700117 }
118 }
Ed Tanousdc511aa2020-10-21 12:33:42 -0700119 // If any of these fields are missing, we can't restore the session, as
120 // we don't have enough information. These 4 fields have been present
121 // in every version of this file in bmcwebs history, so any file, even
122 // on upgrade, should have these present
123 if (userSession->uniqueId.empty() || userSession->username.empty() ||
124 userSession->sessionToken.empty() || userSession->csrfToken.empty())
125 {
Ed Tanous62598e32023-07-17 17:06:25 -0700126 BMCWEB_LOG_DEBUG("Session missing required security "
127 "information, refusing to restore");
Ed Tanousdc511aa2020-10-21 12:33:42 -0700128 return nullptr;
129 }
Ed Tanous1abe55e2018-09-05 08:30:59 -0700130
131 // For now, sessions that were persisted through a reboot get their idle
132 // timer reset. This could probably be overcome with a better
133 // understanding of wall clock time and steady timer time, possibly
134 // persisting values with wall clock time instead of steady timer, but
135 // the tradeoffs of all the corner cases involved are non-trivial, so
136 // this is done temporarily
137 userSession->lastUpdated = std::chrono::steady_clock::now();
Ed Tanous89cda632024-04-16 08:45:54 -0700138 userSession->sessionType = SessionType::Session;
Ed Tanous1abe55e2018-09-05 08:30:59 -0700139
140 return userSession;
Kowalski, Kamil5cef0f72018-02-15 15:26:51 +0100141 }
Kowalski, Kamil2b7981f2018-01-31 13:24:59 +0100142};
143
Ed Tanous3ce36882024-06-09 10:58:16 -0700144enum class MTLSCommonNameParseMode
145{
146 Invalid = 0,
147 // This section approximately matches Redfish AccountService
148 // CertificateMappingAttribute, plus bmcweb defined OEM ones.
149 // Note, IDs in this enum must be maintained between versions, as they are
150 // persisted to disk
151 Whole = 1,
152 CommonName = 2,
153 UserPrincipalName = 3,
154
155 // Intentional gap for future DMTF-defined enums
156
157 // OEM parsing modes for various OEMs
158 Meta = 100,
159};
160
161inline MTLSCommonNameParseMode getMTLSCommonNameParseMode(std::string_view name)
162{
163 if (name == "CommonName")
164 {
165 return MTLSCommonNameParseMode::CommonName;
166 }
167 if (name == "Whole")
168 {
169 // Not yet supported
170 // return MTLSCommonNameParseMode::Whole;
171 }
172 if (name == "UserPrincipalName")
173 {
174 // Not yet supported
175 // return MTLSCommonNameParseMode::UserPrincipalName;
176 }
177 if constexpr (BMCWEB_META_TLS_COMMON_NAME_PARSING)
178 {
179 if (name == "Meta")
180 {
181 return MTLSCommonNameParseMode::Meta;
182 }
183 }
184 return MTLSCommonNameParseMode::Invalid;
185}
186
Zbigniew Kurzynski78158632019-11-05 12:57:37 +0100187struct AuthConfigMethods
188{
Ed Tanous3281bcf2024-06-25 16:02:05 -0700189 // Authentication paths
Ed Tanous25b54db2024-04-17 15:40:31 -0700190 bool basic = BMCWEB_BASIC_AUTH;
191 bool sessionToken = BMCWEB_SESSION_AUTH;
192 bool xtoken = BMCWEB_XTOKEN_AUTH;
193 bool cookie = BMCWEB_COOKIE_AUTH;
194 bool tls = BMCWEB_MUTUAL_TLS_AUTH;
Zbigniew Kurzynski78158632019-11-05 12:57:37 +0100195
Ed Tanous3281bcf2024-06-25 16:02:05 -0700196 // Whether or not unauthenticated TLS should be accepted
197 // true = reject connections if mutual tls is not provided
198 // false = allow connection, and allow user to use other auth method
199 // Always default to false, because root certificates will not
200 // be provisioned at startup
201 bool tlsStrict = false;
202
Ed Tanous3ce36882024-06-09 10:58:16 -0700203 MTLSCommonNameParseMode mTLSCommonNameParsingMode =
204 getMTLSCommonNameParseMode(
205 BMCWEB_MUTUAL_TLS_COMMON_NAME_PARSING_DEFAULT);
206
Ed Tanous0bdda662023-08-03 17:27:34 -0700207 void fromJson(const nlohmann::json::object_t& j)
Zbigniew Kurzynski78158632019-11-05 12:57:37 +0100208 {
Ed Tanous0bdda662023-08-03 17:27:34 -0700209 for (const auto& element : j)
Zbigniew Kurzynski78158632019-11-05 12:57:37 +0100210 {
Ed Tanous0bdda662023-08-03 17:27:34 -0700211 const bool* value = element.second.get_ptr<const bool*>();
Ed Tanous3ce36882024-06-09 10:58:16 -0700212 if (value != nullptr)
Zbigniew Kurzynski78158632019-11-05 12:57:37 +0100213 {
Ed Tanous3ce36882024-06-09 10:58:16 -0700214 if (element.first == "XToken")
215 {
216 xtoken = *value;
217 }
218 else if (element.first == "Cookie")
219 {
220 cookie = *value;
221 }
222 else if (element.first == "SessionToken")
223 {
224 sessionToken = *value;
225 }
226 else if (element.first == "BasicAuth")
227 {
228 basic = *value;
229 }
230 else if (element.first == "TLS")
231 {
232 tls = *value;
233 }
Ed Tanous3281bcf2024-06-25 16:02:05 -0700234 else if (element.first == "TLSStrict")
235 {
236 tlsStrict = *value;
237 }
Zbigniew Kurzynski78158632019-11-05 12:57:37 +0100238 }
Ed Tanous3ce36882024-06-09 10:58:16 -0700239 const uint64_t* intValue =
240 element.second.get_ptr<const uint64_t*>();
241 if (intValue != nullptr)
Zbigniew Kurzynski78158632019-11-05 12:57:37 +0100242 {
Ed Tanous3ce36882024-06-09 10:58:16 -0700243 if (element.first == "MTLSCommonNameParseMode")
244 {
245 if (*intValue <= 2 || *intValue == 100)
246 {
247 mTLSCommonNameParsingMode =
248 static_cast<MTLSCommonNameParseMode>(*intValue);
249 }
250 else
251 {
252 BMCWEB_LOG_ERROR(
253 "Json value of {} was out of range of the enum. Ignoring",
254 *intValue);
255 }
256 }
Zbigniew Kurzynski501f1e52019-10-02 11:22:11 +0200257 }
Zbigniew Kurzynski78158632019-11-05 12:57:37 +0100258 }
259 }
260};
261
Ed Tanous1abe55e2018-09-05 08:30:59 -0700262class SessionStore
263{
264 public:
265 std::shared_ptr<UserSession> generateUserSession(
Ed Tanous26ccae32023-02-16 10:28:44 -0800266 std::string_view username, const boost::asio::ip::address& clientIp,
Ed Tanous89cda632024-04-16 08:45:54 -0700267 const std::optional<std::string>& clientId, SessionType sessionType,
Sunitha Harishd3239222021-02-24 15:33:29 +0530268 bool isConfigureSelfOnly = false)
Ed Tanous1abe55e2018-09-05 08:30:59 -0700269 {
Ed Tanous1abe55e2018-09-05 08:30:59 -0700270 // Only need csrf tokens for cookie based auth, token doesn't matter
Ed Tanousb7f3a822024-06-05 08:45:25 -0700271 std::string sessionToken =
272 bmcweb::getRandomIdOfLength(sessionTokenSize);
273 std::string csrfToken = bmcweb::getRandomIdOfLength(sessionTokenSize);
274 std::string uniqueId = bmcweb::getRandomIdOfLength(10);
Ed Tanous1abe55e2018-09-05 08:30:59 -0700275
Ed Tanousb7f3a822024-06-05 08:45:25 -0700276 //
277 if (sessionToken.empty() || csrfToken.empty() || uniqueId.empty())
Ed Tanous1abe55e2018-09-05 08:30:59 -0700278 {
Ed Tanousb7f3a822024-06-05 08:45:25 -0700279 BMCWEB_LOG_ERROR("Failed to generate session tokens");
280 return nullptr;
Ed Tanous1abe55e2018-09-05 08:30:59 -0700281 }
Jiaqing Zhao41d61c82021-12-07 13:21:47 +0800282
Patrick Williamsbd79bce2024-08-16 15:22:20 -0400283 auto session = std::make_shared<UserSession>(UserSession{
284 uniqueId,
285 sessionToken,
286 std::string(username),
287 csrfToken,
288 clientId,
289 redfish::ip_util::toString(clientIp),
290 std::chrono::steady_clock::now(),
291 sessionType,
292 false,
293 isConfigureSelfOnly,
294 "",
295 {}});
Patrick Williams41713dd2022-09-28 06:48:07 -0500296 auto it = authTokens.emplace(sessionToken, session);
Ed Tanous1abe55e2018-09-05 08:30:59 -0700297 // Only need to write to disk if session isn't about to be destroyed.
Ed Tanous89cda632024-04-16 08:45:54 -0700298 needWrite = sessionType != SessionType::Basic &&
299 sessionType != SessionType::MutualTLS;
Ed Tanous1abe55e2018-09-05 08:30:59 -0700300 return it.first->second;
Kowalski, Kamil2b7981f2018-01-31 13:24:59 +0100301 }
Ed Tanous1abe55e2018-09-05 08:30:59 -0700302
Ed Tanous26ccae32023-02-16 10:28:44 -0800303 std::shared_ptr<UserSession> loginSessionByToken(std::string_view token)
Ed Tanous1abe55e2018-09-05 08:30:59 -0700304 {
305 applySessionTimeouts();
Ed Tanous51dae672018-09-05 16:07:32 -0700306 if (token.size() != sessionTokenSize)
307 {
308 return nullptr;
309 }
Ed Tanous1abe55e2018-09-05 08:30:59 -0700310 auto sessionIt = authTokens.find(std::string(token));
311 if (sessionIt == authTokens.end())
312 {
313 return nullptr;
314 }
315 std::shared_ptr<UserSession> userSession = sessionIt->second;
316 userSession->lastUpdated = std::chrono::steady_clock::now();
317 return userSession;
318 }
319
Ed Tanous26ccae32023-02-16 10:28:44 -0800320 std::shared_ptr<UserSession> getSessionByUid(std::string_view uid)
Ed Tanous1abe55e2018-09-05 08:30:59 -0700321 {
322 applySessionTimeouts();
323 // TODO(Ed) this is inefficient
324 auto sessionIt = authTokens.begin();
325 while (sessionIt != authTokens.end())
326 {
327 if (sessionIt->second->uniqueId == uid)
328 {
329 return sessionIt->second;
330 }
331 sessionIt++;
332 }
333 return nullptr;
334 }
335
Ed Tanousb5a76932020-09-29 16:16:58 -0700336 void removeSession(const std::shared_ptr<UserSession>& session)
Ed Tanous1abe55e2018-09-05 08:30:59 -0700337 {
338 authTokens.erase(session->sessionToken);
339 needWrite = true;
340 }
341
Ed Tanous89cda632024-04-16 08:45:54 -0700342 std::vector<std::string> getAllUniqueIds()
Ed Tanous1abe55e2018-09-05 08:30:59 -0700343 {
344 applySessionTimeouts();
Ed Tanous89cda632024-04-16 08:45:54 -0700345 std::vector<std::string> ret;
Ed Tanous1abe55e2018-09-05 08:30:59 -0700346 ret.reserve(authTokens.size());
347 for (auto& session : authTokens)
348 {
Ed Tanous89cda632024-04-16 08:45:54 -0700349 ret.push_back(session.second->uniqueId);
350 }
351 return ret;
352 }
353
354 std::vector<std::string> getUniqueIdsBySessionType(SessionType type)
355 {
356 applySessionTimeouts();
357
358 std::vector<std::string> ret;
359 ret.reserve(authTokens.size());
360 for (auto& session : authTokens)
361 {
362 if (type == session.second->sessionType)
Ed Tanous1abe55e2018-09-05 08:30:59 -0700363 {
Ed Tanous89cda632024-04-16 08:45:54 -0700364 ret.push_back(session.second->uniqueId);
Ed Tanous1abe55e2018-09-05 08:30:59 -0700365 }
366 }
367 return ret;
368 }
369
Ed Tanous89cda632024-04-16 08:45:54 -0700370 std::vector<std::shared_ptr<UserSession>> getSessions()
371 {
372 std::vector<std::shared_ptr<UserSession>> sessions;
373 sessions.reserve(authTokens.size());
374 for (auto& session : authTokens)
375 {
376 sessions.push_back(session.second);
377 }
378 return sessions;
379 }
380
Xie Ning9fa06f12022-06-29 18:27:47 +0800381 void removeSessionsByUsername(std::string_view username)
382 {
383 std::erase_if(authTokens, [username](const auto& value) {
384 if (value.second == nullptr)
385 {
386 return false;
387 }
388 return value.second->username == username;
389 });
390 }
391
Ravi Tejae518ef32024-05-16 10:33:08 -0500392 void removeSessionsByUsernameExceptSession(
393 std::string_view username, const std::shared_ptr<UserSession>& session)
394 {
395 std::erase_if(authTokens, [username, session](const auto& value) {
396 if (value.second == nullptr)
397 {
398 return false;
399 }
400
401 return value.second->username == username &&
402 value.second->uniqueId != session->uniqueId;
403 });
404 }
405
Zbigniew Kurzynski78158632019-11-05 12:57:37 +0100406 void updateAuthMethodsConfig(const AuthConfigMethods& config)
407 {
Zbigniew Kurzynski009c2a42019-11-14 13:37:15 +0100408 bool isTLSchanged = (authMethodsConfig.tls != config.tls);
Zbigniew Kurzynski78158632019-11-05 12:57:37 +0100409 authMethodsConfig = config;
410 needWrite = true;
Zbigniew Kurzynski009c2a42019-11-14 13:37:15 +0100411 if (isTLSchanged)
412 {
413 // recreate socket connections with new settings
414 std::raise(SIGHUP);
415 }
Zbigniew Kurzynski78158632019-11-05 12:57:37 +0100416 }
417
418 AuthConfigMethods& getAuthMethodsConfig()
419 {
420 return authMethodsConfig;
421 }
422
Ed Tanous9eb808c2022-01-25 10:19:23 -0800423 bool needsWrite() const
Ed Tanous1abe55e2018-09-05 08:30:59 -0700424 {
425 return needWrite;
426 }
Ed Tanous271584a2019-07-09 16:24:22 -0700427 int64_t getTimeoutInSeconds() const
Ed Tanous1abe55e2018-09-05 08:30:59 -0700428 {
Manojkiran Edaf2a4a602020-08-27 16:04:26 +0530429 return std::chrono::seconds(timeoutInSeconds).count();
430 }
431
432 void updateSessionTimeout(std::chrono::seconds newTimeoutInSeconds)
433 {
434 timeoutInSeconds = newTimeoutInSeconds;
435 needWrite = true;
Ed Tanous23a21a12020-07-25 04:45:05 +0000436 }
Ed Tanous1abe55e2018-09-05 08:30:59 -0700437
Ed Tanous1abe55e2018-09-05 08:30:59 -0700438 static SessionStore& getInstance()
439 {
440 static SessionStore sessionStore;
441 return sessionStore;
442 }
443
Ed Tanous1abe55e2018-09-05 08:30:59 -0700444 void applySessionTimeouts()
445 {
446 auto timeNow = std::chrono::steady_clock::now();
Manojkiran Edaf2a4a602020-08-27 16:04:26 +0530447 if (timeNow - lastTimeoutUpdate > std::chrono::seconds(1))
Ed Tanous1abe55e2018-09-05 08:30:59 -0700448 {
449 lastTimeoutUpdate = timeNow;
450 auto authTokensIt = authTokens.begin();
451 while (authTokensIt != authTokens.end())
452 {
453 if (timeNow - authTokensIt->second->lastUpdated >=
Manojkiran Edaf2a4a602020-08-27 16:04:26 +0530454 timeoutInSeconds)
Ed Tanous1abe55e2018-09-05 08:30:59 -0700455 {
456 authTokensIt = authTokens.erase(authTokensIt);
Ratan Gupta07386c62019-12-14 14:06:09 +0530457
Ed Tanous1abe55e2018-09-05 08:30:59 -0700458 needWrite = true;
459 }
460 else
461 {
462 authTokensIt++;
463 }
464 }
465 }
466 }
Gunnar Mills83cf8182020-11-11 15:37:34 -0600467
468 SessionStore(const SessionStore&) = delete;
469 SessionStore& operator=(const SessionStore&) = delete;
Ed Tanousecd6a3a2022-01-07 09:18:40 -0800470 SessionStore(SessionStore&&) = delete;
471 SessionStore& operator=(const SessionStore&&) = delete;
472 ~SessionStore() = default;
Gunnar Mills83cf8182020-11-11 15:37:34 -0600473
474 std::unordered_map<std::string, std::shared_ptr<UserSession>,
Ed Tanous724985f2024-06-05 09:19:06 -0700475 std::hash<std::string>, bmcweb::ConstantTimeCompare>
Gunnar Mills83cf8182020-11-11 15:37:34 -0600476 authTokens;
477
478 std::chrono::time_point<std::chrono::steady_clock> lastTimeoutUpdate;
479 bool needWrite{false};
480 std::chrono::seconds timeoutInSeconds;
481 AuthConfigMethods authMethodsConfig;
482
483 private:
Patrick Williams89492a12023-05-10 07:51:34 -0500484 SessionStore() : timeoutInSeconds(1800) {}
Kowalski, Kamil2b7981f2018-01-31 13:24:59 +0100485};
486
Ed Tanous1abe55e2018-09-05 08:30:59 -0700487} // namespace persistent_data