feat(Core/Authserver): TOTP rewrite (#5620)

This commit is contained in:
Kargatum
2021-05-13 07:57:10 +07:00
committed by GitHub
parent 681c3237df
commit 26f2abaaa9
61 changed files with 6049 additions and 211 deletions

View File

@@ -15,6 +15,7 @@
#include "Database/DatabaseEnv.h"
#include "Log.h"
#include "Master.h"
#include "SharedDefines.h"
#include <ace/Version.h>
#include <openssl/crypto.h>
#include <openssl/opensslv.h>
@@ -56,6 +57,8 @@ void usage(const char* prog)
/// Launch the Trinity server
extern int main(int argc, char** argv)
{
acore::Impl::CurrentServerProcessHolder::_type = SERVER_PROCESS_WORLDSERVER;
///- Command line parsing to get the configuration file name
std::string configFile = sConfigMgr->GetConfigPath() + std::string(_ACORE_CORE_CONFIG);
int c = 1;

View File

@@ -30,6 +30,7 @@
#include "WorldSocket.h"
#include "WorldSocketMgr.h"
#include "DatabaseLoader.h"
#include "SecretMgr.h"
#include <ace/Sig_Handler.h>
#ifdef _WIN32
@@ -136,6 +137,7 @@ int Master::Run()
sConfigMgr->LoadModulesConfigs();
///- Initialize the World
sSecretMgr->Initialize();
sWorld->SetInitialWorldSettings();
sScriptMgr->OnStartup();

View File

@@ -11,6 +11,7 @@
# PERFORMANCE SETTINGS
# SERVER LOGGING
# SERVER SETTINGS
# CRYPTOGRAPHY
# WARDEN SETTINGS
# PLAYER INTERACTION
# CREATURE SETTINGS
@@ -1215,6 +1216,25 @@ IsPreloadedContinentTransport.Enabled = 0
#
###################################################################################################
###################################################################################################
# CRYPTOGRAPHY
#
# TOTPMasterSecret
# Description: The key used by authserver to decrypt TOTP secrets from database storage.
# You only need to set this here if you plan to use the in-game 2FA
# management commands (.account 2fa), otherwise this can be left blank.
#
# The server will auto-detect if this does not match your authserver setting,
# in which case any commands reliant on the secret will be disabled.
#
# Default: <blank>
#
TOTPMasterSecret =
#
###################################################################################################
###################################################################################################
# WARDEN SETTINGS
#