mirror of
https://github.com/openappsec/openappsec.git
synced 2025-09-29 19:24:26 +03:00
Feb 15th 2023 update
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "i_socket_is.h"
|
||||
#include "component.h"
|
||||
#include "i_agent_details.h"
|
||||
#include "i_shell_cmd.h"
|
||||
|
||||
class LoggingComp
|
||||
:
|
||||
@@ -35,7 +36,8 @@ class LoggingComp
|
||||
Singleton::Consume<I_TimeGet>,
|
||||
Singleton::Consume<I_Logging>,
|
||||
Singleton::Consume<I_Socket>,
|
||||
Singleton::Consume<I_AgentDetails>
|
||||
Singleton::Consume<I_AgentDetails>,
|
||||
Singleton::Consume<I_ShellCmd>
|
||||
{
|
||||
public:
|
||||
LoggingComp();
|
||||
|
@@ -79,7 +79,7 @@ public:
|
||||
}
|
||||
|
||||
std::string
|
||||
getPfofileId() const
|
||||
getProfileId() const
|
||||
{
|
||||
return profile_id;
|
||||
}
|
||||
|
@@ -25,7 +25,11 @@ public:
|
||||
using GeneralModifier = std::function<void(LogBulkRest &)>;
|
||||
|
||||
virtual bool addStream(ReportIS::StreamType type) = 0;
|
||||
virtual bool addStream(ReportIS::StreamType type, const std::string &log_server_url) = 0;
|
||||
virtual bool addStream(
|
||||
ReportIS::StreamType type,
|
||||
const std::string &log_server_url,
|
||||
const std::string &protocol
|
||||
) = 0;
|
||||
virtual bool delStream(ReportIS::StreamType type) = 0;
|
||||
|
||||
virtual void sendLog(const Report &msg) = 0;
|
||||
|
@@ -41,6 +41,8 @@ public:
|
||||
|
||||
virtual std::chrono::microseconds getTimeoutVal() const = 0;
|
||||
|
||||
virtual std::string getProfileId(const std::string &tenant_id, const std::string ®ion) const = 0;
|
||||
|
||||
private:
|
||||
friend class LoadNewTenants;
|
||||
friend class LoadNewTenantsAndProfiles;
|
||||
|
@@ -10,7 +10,7 @@ class MockLogging : public Singleton::Provide<I_Logging>::From<MockProvider<I_Lo
|
||||
public:
|
||||
MOCK_METHOD1(sendLog, void (const Report &));
|
||||
MOCK_METHOD1(addStream, bool (ReportIS::StreamType));
|
||||
MOCK_METHOD2(addStream, bool (ReportIS::StreamType, const std::string &));
|
||||
MOCK_METHOD3(addStream, bool (ReportIS::StreamType, const std::string &, const std::string &));
|
||||
MOCK_METHOD1(delStream, bool (ReportIS::StreamType));
|
||||
MOCK_METHOD0(getCurrentLogId, uint64_t ());
|
||||
MOCK_METHOD1(addGeneralModifier, void (const GeneralModifier &));
|
||||
|
@@ -25,6 +25,7 @@ public:
|
||||
MOCK_CONST_METHOD2(areTenantAndProfileActive, bool(const std::string &, const std::string &));
|
||||
MOCK_METHOD2(addActiveTenantAndProfile, void(const std::string &, const std::string &));
|
||||
MOCK_METHOD2(deactivateTenant, void(const std::string &, const std::string &));
|
||||
MOCK_CONST_METHOD2(getProfileId, std::string(const std::string &, const std::string &));
|
||||
|
||||
MOCK_CONST_METHOD0(getTimeoutVal, std::chrono::microseconds());
|
||||
|
||||
|
@@ -74,6 +74,7 @@ DEFINE_FLAG(D_COMPONENT, D_ALL)
|
||||
DEFINE_FLAG(D_WAAP_SCANNER, D_WAAP)
|
||||
DEFINE_FLAG(D_WAAP_DEEP_PARSER, D_WAAP)
|
||||
DEFINE_FLAG(D_WAAP_BASE64, D_WAAP)
|
||||
DEFINE_FLAG(D_WAAP_JSON, D_WAAP)
|
||||
DEFINE_FLAG(D_WAAP_BOT_PROTECTION, D_WAAP)
|
||||
DEFINE_FLAG(D_WAAP_PARSER, D_WAAP)
|
||||
DEFINE_FLAG(D_WAAP_PARSER_XML, D_WAAP_PARSER)
|
||||
@@ -122,6 +123,7 @@ DEFINE_FLAG(D_COMPONENT, D_ALL)
|
||||
DEFINE_FLAG(D_HEALTH_CHECK, D_ORCHESTRATOR)
|
||||
DEFINE_FLAG(D_AGENT_DETAILS, D_ORCHESTRATOR)
|
||||
DEFINE_FLAG(D_K8S_POLICY, D_ORCHESTRATOR)
|
||||
DEFINE_FLAG(D_NGINX_POLICY, D_ORCHESTRATOR)
|
||||
|
||||
DEFINE_FLAG(D_GRADUAL_DEPLOYMENT, D_COMPONENT)
|
||||
DEFINE_FLAG(D_C8_CONTROLLER, D_COMPONENT)
|
||||
|
@@ -23,6 +23,7 @@ enum class StreamType {
|
||||
JSON_DEBUG,
|
||||
JSON_FOG,
|
||||
JSON_LOG_FILE,
|
||||
JSON_K8S_SVC,
|
||||
SYSLOG,
|
||||
CEF,
|
||||
|
||||
@@ -55,6 +56,7 @@ enum class Tags {
|
||||
HTTP_GEO_FILTER,
|
||||
FILE_UPLOAD,
|
||||
IDENTITY_AWARENESS,
|
||||
RATE_LIMIT,
|
||||
|
||||
COUNT
|
||||
};
|
||||
|
@@ -199,21 +199,6 @@ private:
|
||||
RangeType end;
|
||||
};
|
||||
|
||||
class IPAddressConfig
|
||||
{
|
||||
public:
|
||||
IPAddressConfig() = default;
|
||||
IPAddressConfig(const std::string &ip_string);
|
||||
|
||||
void load(cereal::JSONInputArchive &ar);
|
||||
const IPAddr & getAddress() const { return address; }
|
||||
|
||||
operator IPAddr() const { return address; }
|
||||
|
||||
private:
|
||||
IPAddr address;
|
||||
};
|
||||
|
||||
// Specialization of std::hash<> for IPAddr
|
||||
namespace std
|
||||
{
|
||||
|
Reference in New Issue
Block a user