mirror of
https://github.com/openappsec/openappsec.git
synced 2025-09-29 11:16:30 +03:00
My 11th 2023 update
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
class I_Socket
|
||||
{
|
||||
public:
|
||||
enum class SocketType { UNIX, TCP, UDP };
|
||||
enum class SocketType { UNIX, UNIXDG, TCP, UDP };
|
||||
using socketFd = int;
|
||||
|
||||
virtual Maybe<socketFd>
|
||||
|
@@ -16,6 +16,8 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
|
||||
@@ -27,13 +29,14 @@ public:
|
||||
virtual void uponNewTenants(const newTenantCB &cb) = 0;
|
||||
virtual bool areTenantAndProfileActive(const std::string &tenant_id, const std::string &profile_id) const = 0;
|
||||
|
||||
virtual std::vector<std::string> fetchActiveTenants() const = 0;
|
||||
virtual std::vector<std::string> fetchAllActiveTenants() const = 0;
|
||||
virtual std::vector<std::string> getInstances(
|
||||
virtual std::set<std::string> fetchAllActiveTenants() const = 0;
|
||||
virtual std::set<std::string> fetchActiveTenants() const = 0;
|
||||
virtual std::set<std::string> getInstances(
|
||||
const std::string &tenant_id,
|
||||
const std::string &profile_id
|
||||
) const = 0;
|
||||
virtual std::vector<std::string> fetchProfileIds(const std::string &tenant_id) const = 0;
|
||||
virtual std::map<std::string, std::set<std::string>> fetchActiveTenantsAndProfiles() const = 0;
|
||||
virtual std::set<std::string> fetchProfileIds(const std::string &tenant_id) const = 0;
|
||||
|
||||
virtual void deactivateTenant(const std::string &tenant_id, const std::string &profile_id) = 0;
|
||||
|
||||
@@ -41,7 +44,7 @@ public:
|
||||
|
||||
virtual std::chrono::microseconds getTimeoutVal() const = 0;
|
||||
|
||||
virtual std::vector<std::string> getProfileId(
|
||||
virtual std::set<std::string> getProfileIdsForRegionAccount(
|
||||
const std::string &tenant_id,
|
||||
const std::string ®ion,
|
||||
const std::string &account_id = ""
|
||||
|
@@ -81,6 +81,7 @@ IntelligenceQuery<UserSerializableReplyAttr>::load(cereal::JSONInputArchive &ar)
|
||||
unsigned int valid_idx = 0;
|
||||
const auto &valid_response = bulk_response.getValid();
|
||||
const auto &errors = bulk_response.getErrors();
|
||||
responses.clear();
|
||||
responses.reserve(requests.size());
|
||||
dbgTrace(D_INTELLIGENCE) << "Received response for bulk request with " << requests.size() << " items";
|
||||
for (unsigned int query_idx = 0; query_idx < requests.size(); query_idx++) {
|
||||
|
@@ -15,19 +15,20 @@ class MockTenantManager : public Singleton::Provide<I_TenantManager>::From<MockP
|
||||
public:
|
||||
MOCK_METHOD1(uponNewTenants, void(const I_TenantManager::newTenantCB &cb));
|
||||
|
||||
MOCK_CONST_METHOD0(fetchActiveTenants, std::vector<std::string>());
|
||||
MOCK_CONST_METHOD0(fetchAllActiveTenants, std::vector<std::string>());
|
||||
MOCK_CONST_METHOD1(fetchProfileIds, std::vector<std::string>(const std::string &));
|
||||
MOCK_CONST_METHOD0(fetchActiveTenantsAndProfiles, std::map<std::string, std::set<std::string>>());
|
||||
MOCK_CONST_METHOD0(fetchActiveTenants, std::set<std::string>());
|
||||
MOCK_CONST_METHOD0(fetchAllActiveTenants, std::set<std::string>());
|
||||
MOCK_CONST_METHOD1(fetchProfileIds, std::set<std::string>(const std::string &));
|
||||
MOCK_CONST_METHOD2(
|
||||
getInstances,
|
||||
std::vector<std::string>(const std::string &, const std::string &)
|
||||
std::set<std::string>(const std::string &, const std::string &)
|
||||
);
|
||||
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_METHOD3(
|
||||
getProfileId,
|
||||
std::vector<std::string>(const std::string &, const std::string &, const std::string &)
|
||||
getProfileIdsForRegionAccount,
|
||||
std::set<std::string>(const std::string &, const std::string &, const std::string &)
|
||||
);
|
||||
|
||||
MOCK_CONST_METHOD0(getTimeoutVal, std::chrono::microseconds());
|
||||
|
@@ -137,6 +137,7 @@ DEFINE_FLAG(D_COMPONENT, D_ALL)
|
||||
DEFINE_FLAG(D_NGINX_MESSAGE_READER, D_REVERSE_PROXY)
|
||||
DEFINE_FLAG(D_ERROR_REPORTER, D_REVERSE_PROXY)
|
||||
DEFINE_FLAG(D_UPSTREAM_KEEPALIVE, D_REVERSE_PROXY)
|
||||
DEFINE_FLAG(D_FORWARD_PROXY, D_REVERSE_PROXY)
|
||||
|
||||
DEFINE_FLAG(D_IDA, D_COMPONENT)
|
||||
|
||||
@@ -166,6 +167,7 @@ DEFINE_FLAG(D_COMPONENT, D_ALL)
|
||||
DEFINE_FLAG(D_URL_FILTERING, D_COMPONENT)
|
||||
DEFINE_FLAG(D_L7_ACCESS_CONTROL, D_COMPONENT)
|
||||
DEFINE_FLAG(D_IOT_ACCESS_CONTROL, D_COMPONENT)
|
||||
DEFINE_FLAG(D_HORIZON_TELEMETRY, D_COMPONENT)
|
||||
|
||||
DEFINE_FLAG(D_FLOW, D_ALL)
|
||||
DEFINE_FLAG(D_DROP, D_FLOW)
|
||||
|
@@ -62,6 +62,7 @@ enum class Tags {
|
||||
DEPLOYMENT_EMBEDDED,
|
||||
DEPLOYMENT_K8S,
|
||||
LAYER_7_ACCESS_CONTROL,
|
||||
HORIZON_TELEMETRY_METRICS,
|
||||
|
||||
COUNT
|
||||
};
|
||||
@@ -76,6 +77,7 @@ enum class AudienceTeam
|
||||
SIGNATURE_DEVELOPERS,
|
||||
FILE_UPLOAD,
|
||||
IDENTITY_AWARENESS,
|
||||
HORIZON_TELEMETRY,
|
||||
NONE,
|
||||
|
||||
COUNT
|
||||
@@ -147,7 +149,8 @@ enum class IssuingEngine {
|
||||
IOT_NEXT,
|
||||
SDWAN,
|
||||
FILE_UPLOAD,
|
||||
IDA_NEXT
|
||||
IDA_NEXT,
|
||||
HORIZON_TELEMETRY_METRICS
|
||||
};
|
||||
|
||||
} // namespace ReportIS
|
||||
|
@@ -42,6 +42,8 @@ bool deleteFile(const std::string &path);
|
||||
|
||||
std::string convertToHumanReadable(uint64_t size_in_bytes);
|
||||
|
||||
std::string getFileName(const std::string &path);
|
||||
|
||||
}// namespace Filesystem
|
||||
|
||||
namespace Regex
|
||||
|
Reference in New Issue
Block a user