Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.deps
.dirstamp
.history
.idea

/.tags*
/aclocal.m4
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [Unreleased]
## [3.0.0]

### Added
- Support new `fail_type` parameter for determining why a login failed
Expand All @@ -12,6 +12,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Allow ja3 to be passed to the reset API command
- Add support for building amazon-2023 packages
- Use asciidoctor to build documentation not pandoc
- Add a sample grafana dashboard for monitoring wforce
- Implemented the (existing but previously always 0) `wforce_active_http_connections` metric for counting active HTTP connections

### Removed
- Removed support for Enterprise Linux 7 and Amazon 2
Expand Down
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ endif
SUBDIRS=ext docs common wforce $(BUILD_TRACKALERT) $(BUILD_DOCKER)

LOGSTASH_DIST = elk/logstash/config/logstash.conf elk/logstash/templates/wforce_template.json elk/kibana/kibana_saved_objects.ndjson
GRAFANA_DIST = grafana/grafana_dashboard.json

EXTRA_DIST= README.md LICENSE CHANGELOG.md $(LOGSTASH_DIST)
EXTRA_DIST= README.md LICENSE CHANGELOG.md $(LOGSTASH_DIST) $(GRAFANA_DIST)
1 change: 1 addition & 0 deletions builder-support/debian/wforce.docs
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ CHANGELOG.md
elk/logstash/config/logstash.conf
elk/logstash/templates/wforce_template.json
elk/kibana/kibana_saved_objects.ndjson
grafana/grafana_dashboard.json
1 change: 1 addition & 0 deletions builder-support/dockerfiles/Dockerfile.target.el-10
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@INCLUDE Dockerfile.target.rl-10
20 changes: 20 additions & 0 deletions builder-support/dockerfiles/Dockerfile.target.rl-10
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@EXEC export BUILDER_RHEL_VERSION=10
@EXEC export BUILDER_RHEL_FLAVOUR=oracle
# First do the source builds
@INCLUDE Dockerfile.target.sdist

# This defines the distribution base layer
# Put only the bare minimum of common commands here, without dev tools
FROM rockylinux/rockylinux:10 as dist-base

RUN touch /var/lib/rpm/* && dnf install -y epel-release && \
crb enable

RUN dnf -y install clang llvm-devel

# Do the actual rpm build
@INCLUDE Dockerfile.rpmbuild

# Do a test install and verify
# Can be skipped with skiptests=1 in the environment
@EXEC [ "$skiptests" = "" ] && include Dockerfile.rpmtest
2 changes: 1 addition & 1 deletion builder-support/dockerfiles/Dockerfile.wforce
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RUN cd drogon && git checkout tags/v1.9.1 -b v1.9.1
RUN cd drogon && git submodule init && git submodule update && mkdir _build && cd _build && cmake .. -DBUILD_REDIS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_ORM=OFF && make && make install

ADD CHANGELOG.md configure.ac ext LICENSE Makefile.am README.md NOTICE /wforce/
@EXEC sdist_dirs=(m4 ext docs regression-tests wforce common trackalert docker elk)
@EXEC sdist_dirs=(m4 ext docs regression-tests wforce common trackalert docker elk grafana)
@EXEC for d in ${sdist_dirs[@]} ; do echo "COPY $d/ /wforce/$d/" ; done
ADD builder/helpers/set-configure-ac-version.sh /wforce/builder/helpers/

Expand Down
1 change: 1 addition & 0 deletions builder-support/specs/wforce.spec
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ mv %{buildroot}/etc/%{name}/%{name}.conf.example %{buildroot}/%{_docdir}/%{name}
mv elk/logstash/config/logstash.conf %{buildroot}/%{_docdir}/%{name}-%{version}/
mv elk/logstash/templates/wforce_template.json %{buildroot}/%{_docdir}/%{name}-%{version}/
mv elk/kibana/kibana_saved_objects.ndjson %{buildroot}/%{_docdir}/%{name}-%{version}/
mv grafana/grafana_dashboard.json %{buildroot}/%{_docdir}/%{name}-%{version}/

%clean
rm -rf %{buildroot}
Expand Down
2 changes: 1 addition & 1 deletion common/prometheus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void PrometheusMetrics::incWebhookMetric(unsigned int id, bool success, bool cus
}
}

void setPrometheusActiveConns(int value)
void setPrometheusActiveConns(size_t value)
{
if (prom_metrics)
prom_metrics->setActiveConns(value);
Expand Down
4 changes: 2 additions & 2 deletions common/prometheus.hh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public:
worker_response_duration->Observe(duration);
}

void setActiveConns(int value)
void setActiveConns(size_t value)
{
active_connections->Set(value);
}
Expand Down Expand Up @@ -164,7 +164,7 @@ protected:

void initPrometheusMetrics(std::shared_ptr<PrometheusMetrics> pmp);

void setPrometheusActiveConns(int value);
void setPrometheusActiveConns(size_t value);

void addPrometheusCommandMetric(const std::string& name);
void incPrometheusCommandMetric(const std::string& name);
Expand Down
5 changes: 0 additions & 5 deletions common/wforce-webserver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ NetmaskGroup WforceWebserver::getACL()
return d_ACL.getCopy();
}

size_t WforceWebserver::getNumConns()
{
return 0; // XXX - investigate if this can be retrieved from drogon
}

bool WforceWebserver::registerFunc(const std::string& command, HTTPVerb verb, const WforceWSFunc& wsf)
{
return registerFuncInternal(command, verb, wsf, true);
Expand Down
13 changes: 12 additions & 1 deletion common/wforce-webserver.hh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "drogon/drogon.h"
#include "prometheus.hh"
#include "perf-stats.hh"
#include "ext/threadname.hh"

using WforceWSFuncPtr = void (*)(const drogon::HttpRequestPtr& req,
const std::string& command,
Expand Down Expand Up @@ -110,7 +111,9 @@ public:

NetmaskGroup getACL();

size_t getNumConns();
size_t getNumConns() {
return static_cast<size_t>(drogon::app().getConnectionCount());
}

// set the basic-auth password
void setBasicAuthPassword(const std::string& password)
Expand Down Expand Up @@ -269,6 +272,14 @@ public:
},
{drogon::Delete, "ACLFilter", "LoginFilter"});
}
std::thread connCountThread([this] {
setThreadName("wf/conn-count");
for (;;) {
sleep(1);
setPrometheusActiveConns(getNumConns());
}
});
connCountThread.detach();
}

static void start(WforceWebserver* wws)
Expand Down
2 changes: 2 additions & 0 deletions docker/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Ignore .docker file
/.docker
/redis
/tmp
2 changes: 2 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ services:
dockerfile: docker/regression/Dockerfile
args:
- MAXMIND_LICENSE_KEY=${MAXMIND_LICENSE_KEY}
ports:
- "18084:8084"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:ro"
- ./tmp:/var/tmp/testlog
Expand Down
1 change: 1 addition & 0 deletions docker/regression/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ COPY common/ /wforce/common/
COPY trackalert/ /wforce/trackalert/
COPY docker/ /wforce/docker/
COPY elk/ /wforce/elk/
COPY grafana/ /wforce/grafana/

RUN rm -rf regression-tests/.venv

Expand Down
1 change: 1 addition & 0 deletions docker/wforce_image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ COPY docker/Makefile.am /wforce/docker/
RUN mkdir /wforce/docker/wforce_image
COPY docker/wforce_image/Makefile.am /wforce/docker/wforce_image
COPY elk/ /wforce/elk/
COPY grafana/ /wforce/grafana/

RUN autoreconf -ivf
RUN ./configure --prefix /usr --enable-trackalert --disable-systemd --disable-sodium --disable-docker --with-luajit --sysconfdir=/etc/wforce CC=clang CXX=clang++
Expand Down
1 change: 1 addition & 0 deletions docker/wforce_image/Dockerfile.minimal
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ COPY docker/Makefile.am /wforce/docker/
RUN mkdir /wforce/docker/wforce_image
COPY docker/wforce_image/Makefile.am /wforce/docker/wforce_image
COPY elk/ /wforce/elk/
COPY grafana/ /wforce/grafana/

RUN autoreconf -ivf
RUN ./configure --prefix /usr --enable-trackalert --disable-systemd --disable-sodium --disable-docker --with-luajit --sysconfdir=/etc/wforce
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/*.amd
/*.mmd
/*.fmd
/*.header
2 changes: 2 additions & 0 deletions docs/release_notes/ReleaseNotes-3.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* Allow ja3 to be passed to the reset API command
* Add support for building amazon-2023 packages
* Use asciidoctor to build documentation not pandoc
* Add a sample grafana dashboard for monitoring wforce
* Implemented the (existing but previously always 0) `wforce_active_http_connections` metric for counting active HTTP connections

## Removed
* Removed support for Enterprise Linux 7 and Amazon 2
Expand Down
Empty file.
8 changes: 0 additions & 8 deletions docs/trackalert_api.7.header

This file was deleted.

8 changes: 0 additions & 8 deletions docs/wforce_api.7.header

This file was deleted.

Loading
Loading