Disable auth

This commit is contained in:
badaix 2025-06-05 21:34:24 +02:00 committed by Johannes Pohl
parent 1a9d0b3516
commit 958310d9bd
4 changed files with 6 additions and 3 deletions

View file

@ -164,7 +164,7 @@ ErrorCode AuthInfo::authenticatePlain(const std::string& user_password)
auto ec = validateUser(username_, password); auto ec = validateUser(username_, password);
// TODO: don't log passwords // TODO: don't log passwords
LOG(INFO, LOG_TAG) << "Authorization basic: " << user_password << ", user: " << username_ << ", password: " << password << "\n"; LOG(INFO, LOG_TAG) << "Authorization basic: " << user_password << ", user: " << username_ << "\n"; // , password: " << password << "\n";
is_authenticated_ = (ec.value() == 0); is_authenticated_ = (ec.value() == 0);
return ec; return ec;
} }

View file

@ -53,7 +53,7 @@ public:
null, ///< null null, ///< null
}; };
/// @return the string representation of @p type /// @return the string representation of @p type
std::string toString(Type type) std::string toString(Type type)
{ {
switch (type) switch (type)

View file

@ -448,7 +448,8 @@ void ControlSessionHttp::on_read(beast::error_code ec, std::size_t bytes_transfe
auto authheader = req_[beast::http::field::authorization]; auto authheader = req_[beast::http::field::authorization];
if (!authheader.empty()) if (!authheader.empty())
{ {
LOG(INFO, LOG_TAG) << "Auth header: " << authheader << "\n"; // TODO: don't log passwords
// LOG(INFO, LOG_TAG) << "Auth header: " << authheader << "\n";
auto ec = authinfo.authenticate(std::string{authheader}); auto ec = authinfo.authenticate(std::string{authheader});
if (ec) if (ec)
{ {

View file

@ -322,6 +322,8 @@ int main(int argc, char* argv[])
settings.stream.sources.push_back(sourceValue->value(n)); settings.stream.sources.push_back(sourceValue->value(n));
} }
// TODO: auth
settings.auth.enabled = false;
if (settings.auth.enabled) if (settings.auth.enabled)
{ {
std::vector<std::string> roles; std::vector<std::string> roles;