Compare commits

...

31 Commits

Author SHA1 Message Date
TIP Automation User
08df7ff714 Chg: update image tag in helm values to v2.7.0 2022-10-05 11:32:49 +00:00
TIP Automation User
ad4ac98d1a Chg: update image tag in helm values to v2.7.0-RC5 2022-10-05 02:45:49 +00:00
jaspreetsachdev
6633a23635 Merge pull request #87 from Telecominfraproject/main
Fixes for WIFI-10942
2022-10-04 22:41:15 -04:00
stephb9959
e398d3cf4b Merge remote-tracking branch 'origin/main' 2022-10-04 08:10:32 -07:00
stephb9959
f53cc82df1 https://telecominfraproject.atlassian.net/browse/WIFI-10942
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-10-04 08:10:24 -07:00
Johann Hoffmann
3f9edc80e0 Add userRole argument to createuser and createuser_v functions
Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2022-10-04 13:15:30 +02:00
TIP Automation User
c3a1d84bcd Chg: update image tag in helm values to v2.7.0-RC4 2022-10-03 11:14:18 +00:00
Dmitry Dunaev
a34d8eb625 Merge pull request #84 from Telecominfraproject/main
[WIFI-10581] Add: postgresql-client in Dockerfile
2022-10-03 14:04:49 +03:00
Dmitry Dunaev
6ae42fe206 [WIFI-10581] Fix: Helm image to main
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
2022-10-03 12:11:37 +03:00
Dmitry Dunaev
4539bfb53b Merge pull request #83 from Telecominfraproject/fix/wifi-10581--postgres-client
[WIFI-10581] Add: postgresql-client in Dockerfile
2022-10-03 11:22:33 +03:00
Dmitry Dunaev
dc57a94416 [WIFI-10581] Add: postgresql-client in Dockerfile
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
2022-10-03 11:22:14 +03:00
Stephane Bourque
68e2d20264 Merge pull request #82 from Telecominfraproject/main
https://telecominfraproject.atlassian.net/browse/WIFI-10942
2022-10-02 23:02:28 -07:00
stephb9959
6025b7a74e https://telecominfraproject.atlassian.net/browse/WIFI-10942
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-10-02 23:00:31 -07:00
stephb9959
3fcf6114c0 https://telecominfraproject.atlassian.net/browse/WIFI-10942
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-10-02 22:36:33 -07:00
stephb9959
de0c1423af Merge remote-tracking branch 'origin/main' 2022-10-02 22:21:37 -07:00
stephb9959
f4984247d2 https://telecominfraproject.atlassian.net/browse/WIFI-10942
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-10-02 22:21:30 -07:00
stephb9959
e0b80a2640 Merge remote-tracking branch 'origin/main' 2022-10-02 22:09:02 -07:00
stephb9959
f2c36882be https://telecominfraproject.atlassian.net/browse/WIFI-10942
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-10-02 22:08:54 -07:00
stephb9959
3a1e4d66b4 https://telecominfraproject.atlassian.net/browse/WIFI-10942 2022-10-02 21:51:32 -07:00
stephb9959
6ea62c12c5 https://telecominfraproject.atlassian.net/browse/WIFI-10942 2022-10-02 14:35:59 -07:00
stephb9959
517b46d275 Merge remote-tracking branch 'origin/main' 2022-10-02 14:22:10 -07:00
Stephane Bourque
2503cb842e https://telecominfraproject.atlassian.net/browse/WIFI-10942 2022-10-02 14:22:01 -07:00
Stephane Bourque
3310b7c565 Merge pull request #81 from Telecominfraproject/main
https://telecominfraproject.atlassian.net/browse/WIFI-10942
2022-10-02 11:03:57 -07:00
Stephane Bourque
2878e2aa25 Merge branch 'release/v2.7.0' into main 2022-10-02 11:03:35 -07:00
Stephane Bourque
3b7e6da952 Merge pull request #80 from Telecominfraproject/WIFI-10942
https://telecominfraproject.atlassian.net/browse/WIFI-10942
2022-10-02 11:00:03 -07:00
TIP Automation User
06267690fc Chg: update image tag in helm values to v2.7.0-RC3 2022-09-30 16:31:27 +00:00
Stephane Bourque
db751e31a3 Merge pull request #79 from Telecominfraproject/WIFI-10942
https://telecominfraproject.atlassian.net/browse/WIFI-10942
2022-09-30 08:52:49 -07:00
stephb9959
49b8664dc0 https://telecominfraproject.atlassian.net/browse/WIFI-10942 2022-09-30 08:44:56 -07:00
TIP Automation User
26e54f8433 Chg: update image tag in helm values to v2.7.0-RC2 2022-09-29 23:27:33 +00:00
jaspreetsachdev
a4ebfdc2e9 Merge pull request #78 from Telecominfraproject/main
Fixes for WIFI-10245 and others
2022-09-29 19:17:40 -04:00
TIP Automation User
4b1fbf055f Chg: update image tag in helm values to v2.7.0-RC1 2022-09-16 19:54:50 +00:00
6 changed files with 65 additions and 51 deletions

View File

@@ -78,6 +78,7 @@ add_executable( owsec
src/framework/orm.h src/framework/orm.h
src/framework/StorageClass.h src/framework/StorageClass.h
src/framework/ow_constants.h src/framework/ow_constants.h
src/framework/MicroServiceErrorHandler.h
src/framework/WebSocketClientNotifications.h src/framework/WebSocketClientNotifications.h
src/seclibs/qrcode/qrcodegen.hpp src/seclibs/qrcode/qrcodegen.cpp src/seclibs/qrcode/qrcodegen.hpp src/seclibs/qrcode/qrcodegen.cpp
src/seclibs/cpptotp/bytes.cpp src/seclibs/cpptotp/bytes.h src/seclibs/cpptotp/bytes.cpp src/seclibs/cpptotp/bytes.h

View File

@@ -81,6 +81,9 @@ RUN mkdir cmake-build
WORKDIR cmake-build WORKDIR cmake-build
RUN cmake .. -DBUILD_ONLY="sns;s3" \ RUN cmake .. -DBUILD_ONLY="sns;s3" \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DUSE_OPENSSL=ON \
-DCPP_STANDARD=17 \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_CXX_FLAGS="-Wno-error=stringop-overflow -Wno-error=uninitialized" \ -DCMAKE_CXX_FLAGS="-Wno-error=stringop-overflow -Wno-error=uninitialized" \
-DAUTORUN_UNIT_TESTS=OFF -DAUTORUN_UNIT_TESTS=OFF
RUN cmake --build . --config Release -j8 RUN cmake --build . --config Release -j8
@@ -108,9 +111,7 @@ COPY --from=fmtlib-build /usr/local/lib /usr/local/lib
WORKDIR /owsec WORKDIR /owsec
RUN mkdir cmake-build RUN mkdir cmake-build
WORKDIR /owsec/cmake-build WORKDIR /owsec/cmake-build
RUN cmake .. \ RUN cmake ..
-Dcrypto_LIBRARY=/usr/lib/libcrypto.so \
-DBUILD_SHARED_LIBS=ON
RUN cmake --build . --config Release -j8 RUN cmake --build . --config Release -j8
FROM debian:$DEBIAN_VERSION FROM debian:$DEBIAN_VERSION
@@ -127,7 +128,7 @@ RUN mkdir -p "$OWSEC_ROOT" "$OWSEC_CONFIG" && \
RUN apt-get update && apt-get install --no-install-recommends -y \ RUN apt-get update && apt-get install --no-install-recommends -y \
librdkafka++1 gosu gettext ca-certificates bash jq curl wget \ librdkafka++1 gosu gettext ca-certificates bash jq curl wget \
libmariadb-dev-compat libpq5 unixodbc libmariadb-dev-compat libpq5 unixodbc postgresql-client
COPY readiness_check /readiness_check COPY readiness_check /readiness_check
COPY test_scripts/curl/cli /cli COPY test_scripts/curl/cli /cli

2
build
View File

@@ -1 +1 @@
20 23

View File

@@ -9,7 +9,7 @@ fullnameOverride: ""
images: images:
owsec: owsec:
repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owsec repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owsec
tag: main tag: v2.7.0
pullPolicy: Always pullPolicy: Always
# regcred: # regcred:
# registry: tip-tip-wlan-cloud-ucentral.jfrog.io # registry: tip-tip-wlan-cloud-ucentral.jfrog.io

View File

@@ -3075,7 +3075,7 @@ namespace OpenWifi {
private: private:
std::vector<std::unique_ptr<Poco::Net::HTTPServer>> RESTServers_; std::vector<std::unique_ptr<Poco::Net::HTTPServer>> RESTServers_;
Poco::ThreadPool Pool_{"x-rest",32,128}; Poco::ThreadPool Pool_{"x-rest",8,128};
RESTAPI_GenericServer Server_; RESTAPI_GenericServer Server_;
RESTAPI_ExtServer() noexcept: RESTAPI_ExtServer() noexcept:
@@ -3209,7 +3209,7 @@ namespace OpenWifi {
const Poco::ThreadPool & Pool() { return Pool_; } const Poco::ThreadPool & Pool() { return Pool_; }
private: private:
std::vector<std::unique_ptr<Poco::Net::HTTPServer>> RESTServers_; std::vector<std::unique_ptr<Poco::Net::HTTPServer>> RESTServers_;
Poco::ThreadPool Pool_{"i-rest",32,96}; Poco::ThreadPool Pool_{"i-rest",4,64};
RESTAPI_GenericServer Server_; RESTAPI_GenericServer Server_;
RESTAPI_IntServer() noexcept: RESTAPI_IntServer() noexcept:
@@ -3406,7 +3406,7 @@ namespace OpenWifi {
bool NoBuiltInCrypto_=false; bool NoBuiltInCrypto_=false;
Poco::JWT::Signer Signer_; Poco::JWT::Signer Signer_;
Poco::Logger &Logger_; Poco::Logger &Logger_;
Poco::ThreadPool TimerPool_{"timer:pool",2,16}; Poco::ThreadPool TimerPool_{"timer:pool",2,32};
std::unique_ptr<BusEventManager> BusEventManager_; std::unique_ptr<BusEventManager> BusEventManager_;
}; };
@@ -3602,14 +3602,14 @@ namespace OpenWifi {
FileChannel->setProperty("archive", "timestamp"); FileChannel->setProperty("archive", "timestamp");
FileChannel->setProperty("path", LoggingLocation); FileChannel->setProperty("path", LoggingLocation);
Poco::AutoPtr<Poco::AsyncChannel> Async_File(new Poco::AsyncChannel(FileChannel)); Poco::AutoPtr<Poco::AsyncChannel> Async_File(new Poco::AsyncChannel(FileChannel));
Poco::AutoPtr<Poco::AsyncChannel> Async_Muxer(new Poco::AsyncChannel(LogMuxer())); // Poco::AutoPtr<Poco::AsyncChannel> Async_Muxer(new Poco::AsyncChannel(LogMuxer()));
Poco::AutoPtr<Poco::SplitterChannel> Splitter(new Poco::SplitterChannel); // Poco::AutoPtr<Poco::SplitterChannel> Splitter(new Poco::SplitterChannel);
Splitter->addChannel(Async_File); // Splitter->addChannel(Async_File);
Splitter->addChannel(Async_Muxer); // Splitter->addChannel(Async_Muxer);
Poco::AutoPtr<Poco::PatternFormatter> Formatter(new Poco::PatternFormatter); Poco::AutoPtr<Poco::PatternFormatter> Formatter(new Poco::PatternFormatter);
Formatter->setProperty("pattern", LoggingFormat); Formatter->setProperty("pattern", LoggingFormat);
Poco::AutoPtr<Poco::FormattingChannel> FormattingChannel( Poco::AutoPtr<Poco::FormattingChannel> FormattingChannel(
new Poco::FormattingChannel(Formatter, Splitter)); new Poco::FormattingChannel(Formatter, Async_File));
Poco::Logger::root().setChannel(FormattingChannel); Poco::Logger::root().setChannel(FormattingChannel);
} }
auto Level = Poco::Logger::parseLevel(MicroService::instance().ConfigGetString("logging.level", "debug")); auto Level = Poco::Logger::parseLevel(MicroService::instance().ConfigGetString("logging.level", "debug"));

View File

@@ -179,13 +179,19 @@ getlogo() {
} }
createuser() { createuser() {
payload="{ \"id\": \"0\", \"email\" : \"$1\", \"currentPassword\" : \"$2\", \"changePassword\" : true}" case $3 in
root|admin|subscriber|csr|system|installer|noc|accounting)
payload="{ \"id\": \"0\", \"email\" : \"$1\", \"currentPassword\" : \"$2\", \"changePassword\" : true, \"userRole\" : \"$3\" }"
curl ${FLAGS} -X POST "https://${OWSEC}/api/v1/user/0" \ curl ${FLAGS} -X POST "https://${OWSEC}/api/v1/user/0" \
-H "Accept: application/json" \ -H "Accept: application/json" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-H "Authorization: Bearer ${token}" \ -H "Authorization: Bearer ${token}" \
-d "$payload" > ${result_file} -d "$payload" > ${result_file}
jq < ${result_file} jq < ${result_file} ;;
*)
echo "Error: userRole has to be one of root|admin|subscriber|csr|system|installer|noc|accounting"
exit 1 ;;
esac
} }
createsub() { createsub() {
@@ -199,13 +205,19 @@ createsub() {
} }
createuser_v() { createuser_v() {
payload="{ \"id\": \"0\", \"email\" : \"$1\", \"currentPassword\" : \"$2\", \"changePassword\" : true}" case $3 in
root|admin|subscriber|csr|system|installer|noc|accounting)
payload="{ \"id\": \"0\", \"email\" : \"$1\", \"currentPassword\" : \"$2\", \"changePassword\" : true, \"userRole\" : \"$3\" }"
curl ${FLAGS} -X POST "https://${OWSEC}/api/v1/user/0?email_verification=true" \ curl ${FLAGS} -X POST "https://${OWSEC}/api/v1/user/0?email_verification=true" \
-H "Accept: application/json" \ -H "Accept: application/json" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-H "Authorization: Bearer ${token}" \ -H "Authorization: Bearer ${token}" \
-d "$payload" > ${result_file} -d "$payload" > ${result_file}
jq < ${result_file} jq < ${result_file} ;;
*)
echo "Error: userRole has to be one of root|admin|subscriber|csr|system|installer|noc|accounting"
exit 1 ;;
esac
} }
deleteuser() { deleteuser() {
@@ -447,7 +459,7 @@ test_service() {
echo "----------------" echo "----------------"
echo "Create test user" echo "Create test user"
echo "----------------" echo "----------------"
createuser testuser@mail.telecominfraproject.com 'Test123!' createuser testuser@mail.telecominfraproject.com 'Test123!' accounting
check_response $result_file check_response $result_file
USER_ID="$(jq -r '.id' < $result_file)" USER_ID="$(jq -r '.id' < $result_file)"
@@ -484,8 +496,8 @@ help() {
echo "listendpoints Get all the system endpoints." echo "listendpoints Get all the system endpoints."
echo "emailtest Generate a forgot Password e-amil to the logged in user." echo "emailtest Generate a forgot Password e-amil to the logged in user."
echo "me Show information about the logged user." echo "me Show information about the logged user."
echo "createuser <email> <password> Create a user with an initial password and force the user to change password." echo "createuser <email> <password> <userrole> Create a user with an initial password and force the user to change password."
echo "createuser_v <email> <password> Same as create user but also force an e-mail verification." echo "createuser_v <email> <password> <userrole> Same as create user but also force an e-mail verification."
echo "deleteuser <user UUID> Delete the user." echo "deleteuser <user UUID> Delete the user."
echo "getuser <user UUID> Get the user information." echo "getuser <user UUID> Get the user information."
echo "listusers List users." echo "listusers List users."
@@ -507,9 +519,9 @@ help() {
shopt -s nocasematch shopt -s nocasematch
case "$1" in case "$1" in
"createuser") login; createuser "$2" "$3"; logout;; "createuser") login; createuser "$2" "$3" "$4"; logout;;
"createsub") login; createsub "$2" "$3"; logout;; "createsub") login; createsub "$2" "$3"; logout;;
"createuser_v") login; createuser_v "$2" "$3"; logout;; "createuser_v") login; createuser_v "$2" "$3" "$4"; logout;;
"createsub_v") login; createsub_v "$2" "$3"; logout;; "createsub_v") login; createsub_v "$2" "$3"; logout;;
"deleteuser") login; deleteuser "$2" ; logout;; "deleteuser") login; deleteuser "$2" ; logout;;
"deletesub") login; deletesub "$2" ; logout;; "deletesub") login; deletesub "$2" ; logout;;