mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-10-29 09:52:29 +00:00
Compare commits
9 Commits
v3.0.0
...
v2.4.0-RC4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
768c428a67 | ||
|
|
389ceb8b7d | ||
|
|
157f18c117 | ||
|
|
2538f9c768 | ||
|
|
85d998ad76 | ||
|
|
a407f2e38d | ||
|
|
d0d2be0870 | ||
|
|
78cba562e6 | ||
|
|
350df38c3f |
@@ -30,9 +30,20 @@ else()
|
||||
file(WRITE build ${BUILD_NUM})
|
||||
endif()
|
||||
|
||||
set(BUILD_SHARED_LIBS 1)
|
||||
find_package(Git QUIET)
|
||||
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always --tags
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
RESULT_VARIABLE GIT_RESULT
|
||||
OUTPUT_VARIABLE GIT_HASH)
|
||||
if(NOT GIT_RESULT EQUAL "0")
|
||||
message(FATAL_ERROR "git describe --always --tags failed with ${GIT_RESULT}")
|
||||
endif()
|
||||
string(REGEX REPLACE "\n$" "" GIT_HASH "${GIT_HASH}")
|
||||
endif()
|
||||
add_definitions(-DAWS_CUSTOM_MEMORY_MANAGEMENT)
|
||||
|
||||
add_definitions(-DAPP_VERSION="${CMAKE_PROJECT_VERSION}" -DBUILD_NUMBER="${BUILD_NUM}")
|
||||
set(BUILD_SHARED_LIBS 1)
|
||||
add_definitions(-DTIP_SECURITY_SERVICE="1")
|
||||
|
||||
set(Boost_USE_STATIC_LIBS OFF)
|
||||
@@ -50,8 +61,11 @@ find_package(Poco REQUIRED COMPONENTS JSON Crypto JWT Net Util NetSSL Data DataS
|
||||
|
||||
include_directories(/usr/local/include /usr/local/opt/openssl/include src include/kafka /usr/local/opt/mysql-client/include)
|
||||
|
||||
configure_file(src/ow_version.h.in ${PROJECT_SOURCE_DIR}/src/ow_version.h @ONLY)
|
||||
|
||||
add_executable( owsec
|
||||
build
|
||||
src/ow_version.h.in
|
||||
src/framework/CountryCodes.h
|
||||
src/framework/KafkaTopics.h
|
||||
src/framework/MicroService.h
|
||||
|
||||
@@ -56,6 +56,7 @@ RUN make install
|
||||
ADD CMakeLists.txt build /owsec/
|
||||
ADD cmake /owsec/cmake
|
||||
ADD src /owsec/src
|
||||
ADD .git /owgw/.git
|
||||
|
||||
WORKDIR /owsec
|
||||
RUN mkdir cmake-build
|
||||
|
||||
@@ -8,7 +8,7 @@ fullnameOverride: ""
|
||||
images:
|
||||
owsec:
|
||||
repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owsec
|
||||
tag: main
|
||||
tag: v2.4.0-RC4
|
||||
pullPolicy: Always
|
||||
# regcred:
|
||||
# registry: tip-tip-wlan-cloud-ucentral.jfrog.io
|
||||
|
||||
@@ -69,6 +69,8 @@ using namespace std::chrono_literals;
|
||||
#include "RESTObjects/RESTAPI_SecurityObjects.h"
|
||||
#include "nlohmann/json.hpp"
|
||||
|
||||
#include "ow_version.h"
|
||||
|
||||
namespace OpenWifi {
|
||||
|
||||
enum UNAUTHORIZED_REASON {
|
||||
@@ -1900,7 +1902,7 @@ namespace OpenWifi {
|
||||
QB_.SerialNumber = GetParameter(RESTAPI::Protocol::SERIALNUMBER, "");
|
||||
QB_.StartDate = GetParameter(RESTAPI::Protocol::STARTDATE, 0);
|
||||
QB_.EndDate = GetParameter(RESTAPI::Protocol::ENDDATE, 0);
|
||||
QB_.Offset = GetParameter(RESTAPI::Protocol::OFFSET, 1);
|
||||
QB_.Offset = GetParameter(RESTAPI::Protocol::OFFSET, 0);
|
||||
QB_.Limit = GetParameter(RESTAPI::Protocol::LIMIT, 100);
|
||||
QB_.Filter = GetParameter(RESTAPI::Protocol::FILTER, "");
|
||||
QB_.Select = GetParameter(RESTAPI::Protocol::SELECT, "");
|
||||
@@ -1912,7 +1914,7 @@ namespace OpenWifi {
|
||||
QB_.AdditionalInfo = GetBoolParameter(RESTAPI::Protocol::WITHEXTENDEDINFO,false);
|
||||
|
||||
if(QB_.Offset<1)
|
||||
QB_.Offset=1;
|
||||
QB_.Offset=0;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2673,7 +2675,7 @@ namespace OpenWifi {
|
||||
std::string MyPrivateEndPoint_;
|
||||
std::string MyPublicEndPoint_;
|
||||
std::string UIURI_;
|
||||
std::string Version_{std::string(APP_VERSION) + "("+ BUILD_NUMBER + ")"};
|
||||
std::string Version_{ OW_VERSION::VERSION + "("+ OW_VERSION::BUILD + ")" + " - " + OW_VERSION::HASH };
|
||||
BusEventManager BusEventManager_;
|
||||
std::mutex InfraMutex_;
|
||||
std::default_random_engine RandomEngine_;
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
// Created by stephane bourque on 2021-10-06.
|
||||
//
|
||||
|
||||
#ifndef OPENWIFI_STORAGE_H
|
||||
#define OPENWIFI_STORAGE_H
|
||||
#pragma once
|
||||
|
||||
#include "Poco/Data/Session.h"
|
||||
#include "Poco/Data/SessionPool.h"
|
||||
@@ -54,13 +53,13 @@ namespace OpenWifi {
|
||||
|
||||
[[nodiscard]] inline std::string ComputeRange(uint64_t From, uint64_t HowMany) {
|
||||
if(dbType_==sqlite) {
|
||||
return " LIMIT " + std::to_string(From-1) + ", " + std::to_string(HowMany) + " ";
|
||||
return " LIMIT " + std::to_string(From) + ", " + std::to_string(HowMany) + " ";
|
||||
} else if(dbType_==pgsql) {
|
||||
return " LIMIT " + std::to_string(HowMany) + " OFFSET " + std::to_string(From-1) + " ";
|
||||
return " LIMIT " + std::to_string(HowMany) + " OFFSET " + std::to_string(From) + " ";
|
||||
} else if(dbType_==mysql) {
|
||||
return " LIMIT " + std::to_string(HowMany) + " OFFSET " + std::to_string(From-1) + " ";
|
||||
return " LIMIT " + std::to_string(HowMany) + " OFFSET " + std::to_string(From) + " ";
|
||||
}
|
||||
return " LIMIT " + std::to_string(HowMany) + " OFFSET " + std::to_string(From-1) + " ";
|
||||
return " LIMIT " + std::to_string(HowMany) + " OFFSET " + std::to_string(From) + " ";
|
||||
}
|
||||
|
||||
inline std::string ConvertParams(const std::string & S) const {
|
||||
@@ -165,5 +164,3 @@ namespace OpenWifi {
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif //OPENWIFI_STORAGE_H
|
||||
|
||||
13
src/ow_version.h.in
Normal file
13
src/ow_version.h.in
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// Created by stephane bourque on 2021-12-06.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace OW_VERSION {
|
||||
inline static const std::string VERSION{"@CMAKE_PROJECT_VERSION@"};
|
||||
inline static const std::string BUILD{"@BUILD_NUM@"};
|
||||
inline static const std::string HASH{"@GIT_HASH@"};
|
||||
}
|
||||
@@ -15,23 +15,23 @@ namespace OpenWifi {
|
||||
"description varchar,"
|
||||
"avatar varchar,"
|
||||
"email varchar,"
|
||||
"validated int,"
|
||||
"validated boolean,"
|
||||
"validationEmail varchar,"
|
||||
"validationDate bigint,"
|
||||
"creationDate bigint,"
|
||||
"validationURI varchar,"
|
||||
"changePassword int,"
|
||||
"changePassword boolean,"
|
||||
"lastLogin bigint,"
|
||||
"currentLoginURI varchar,"
|
||||
"lastPasswordChange bigint,"
|
||||
"lastEmailCheck bigint,"
|
||||
"waitingForEmailCheck int,"
|
||||
"waitingForEmailCheck boolean,"
|
||||
"locale varchar,"
|
||||
"notes text,"
|
||||
"location varchar,"
|
||||
"owner varchar,"
|
||||
"suspended int,"
|
||||
"blackListed int,"
|
||||
"suspended boolean,"
|
||||
"blackListed boolean,"
|
||||
"userRole varchar,"
|
||||
"userTypeProprietaryInfo text,"
|
||||
"securityPolicy text,"
|
||||
@@ -111,23 +111,23 @@ namespace OpenWifi {
|
||||
std::string, // description;
|
||||
std::string, // avatar;
|
||||
std::string, // email;
|
||||
uint64_t, // bool validated = false;
|
||||
bool, // bool validated = false;
|
||||
std::string, // validationEmail;
|
||||
uint64_t, // validationDate = 0;
|
||||
uint64_t, // creationDate = 0;
|
||||
std::string, // validationURI;
|
||||
uint64_t, // bool changePassword = true;
|
||||
bool, // bool changePassword = true;
|
||||
uint64_t, // lastLogin = 0;
|
||||
std::string, // currentLoginURI;
|
||||
uint64_t, // lastPasswordChange = 0;
|
||||
uint64_t, // lastEmailCheck = 0;
|
||||
uint64_t, // bool waitingForEmailCheck = false;
|
||||
bool, // bool waitingForEmailCheck = false;
|
||||
std::string, // locale;
|
||||
std::string, // notes;
|
||||
std::string, // location;
|
||||
std::string, // owner;
|
||||
uint64_t, // bool suspended = false;
|
||||
uint64_t, // bool blackListed = false;
|
||||
bool, // bool suspended = false;
|
||||
bool, // bool blackListed = false;
|
||||
std::string, // userRole;
|
||||
std::string, // userTypeProprietaryInfo;
|
||||
std::string, // securityPolicy;
|
||||
|
||||
Reference in New Issue
Block a user