589 Commits

Author SHA1 Message Date
Dimitri Papadopoulos Orfanos
aa41bfb8fe Merge branch 'PACKAGE_NAME' into 'master'
Further improvements to arguments of AC_INIT

See merge request openconnect/ocserv!410
2024-01-07 16:28:04 +00:00
Nikos Mavrogiannopoulos
c403e2bd02 Added detection logic for new openconnect
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2024-01-06 22:21:54 +01:00
Dimitri Papadopoulos
badf9be99a Further improvements to arguments of AC_INIT
Reapply df6a3c2a, this time without regression.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2024-01-06 18:21:27 +01:00
Dimitri Papadopoulos
3a3edcfd80 Bug reports are not to be sent by mail anymore
Instead they should be filed on GitLab.

Adapt the relevant explanation to the different tpye of bug reporting mechanism.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2024-01-05 23:31:05 +01:00
Dimitri Papadopoulos
715b9b2ea1 Use proper symbol for second, prefix for kilo
The SI symbol for second is s:
https://www.bipm.org/en/si-base-units/second

The SI prefix for a multiplying factor of 10³ is k:
https://www.bipm.org/en/measurement-units/si-prefixes

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-12-24 10:40:21 +01:00
Dimitri Papadopoulos
54818f3b67 Fix logging to stderr
While each `syslog()` adds a new entry to the system log,
`fprintf(stder, ...)` does not automatically add a newline
to distinguish between entries. We need to add the newline
ourselves.

We tried to make _oc_syslog() as atomic as possible in the
context of a multi-process daemonn by keeping a single
`fprtinf()` call. Probably not perfect, but the best we
can do when printing to stderr instead of using the system
logger. Works only with the GNU C or compatible compiler.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-12-23 23:17:41 +01:00
Dimitri Papadopoulos
8a61a68f06 More missing entries in NEWS
Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-12-22 15:59:13 +01:00
Dimitri Papadopoulos
2f2346c625 Add missing entry in NEWS
For ff57a148 / !397.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-12-20 22:09:58 +01:00
Nikos Mavrogiannopoulos
675c1280a8 added missing NEWS entry [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-12-17 21:50:36 +01:00
Nikos Mavrogiannopoulos
0f5ba83f76 released 1.2.3
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-12-17 12:26:58 +01:00
Nikos Mavrogiannopoulos
f0067ae0ea Cleanup of the logging subsystem; allow logging to stderr only
Separated the logging logically from any remaining debugging
features. Introduced command line option for logging to stderr
only (for systemd and containers). The default log level is set
to (2) info.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-12-15 13:04:40 +01:00
Nikos Mavrogiannopoulos
39f274fb01 doc update [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-12-14 14:16:05 +01:00
Dimitri Papadopoulos
8ada82ff5c bin/ocserv-fw → libexec/ocserv-fw
Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-11-28 21:57:02 +01:00
Dimitri Papadopoulos Orfanos
a3ff6864b9 Merge branch 'fix_clean_all_rules' into 'master'
Fix clean_all_rules bug on multiple devices

See merge request openconnect/ocserv!384
2023-11-27 21:35:39 +00:00
Gennady Sadchikov
392a6542d3 Fixed clean_all_rules logic on multiple similar devices
Signed-off-by: Gennady Sadchikov <dessolo@mail.ru>
2023-11-27 15:29:42 +03:00
Dimitri Papadopoulos
86ea13b213 A few RADIUS changes
* Use the exact names used in RFC 2548.
* Warn in case Radius sends more than 2 DNS server IPv6 addresses.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-11-26 12:36:53 +01:00
Nikos Mavrogiannopoulos
80d6a32d11 doc update
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-10-03 12:29:47 +02:00
Florian Domain
ec6c48da4e occtl: add machine-readable "raw_connected_at" field for user stats
* useful for machines reading JSON to get directly the unix timestamp of
  the users connection start time

Signed-off-by: Florian Domain <f.domain@criteo.com>
2023-09-22 18:49:27 +02:00
Nikos Mavrogiannopoulos
f616475643 released 1.2.2
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-09-21 21:14:05 +02:00
Nikos Mavrogiannopoulos
ac49187a7c doc update
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-09-20 22:10:53 +02:00
Nikos Mavrogiannopoulos
049d9e520e worker: do not account ICMP/IGMP data for idle detection
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-09-19 10:34:17 +02:00
Nikos Mavrogiannopoulos
a12873af21 Merge branch 'codespell' into 'master'
Fix misspelling newly reported by codespell

See merge request openconnect/ocserv!369
2023-09-15 13:29:41 +00:00
Nikos Mavrogiannopoulos
26258d7cb1 Revert "Fixing issue: Authentication requests from the same IP address are not load balanced among security modules"
Each cookie is valid for its IP address and when reconnected it must
reach the same sec-mod that contains the corresponding session
information.

This reverts commit 4ec99609ca.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-09-15 15:19:13 +02:00
Dimitri Papadopoulos
b29d915699 Fix misspelling newly reported by codespell
Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-09-11 19:18:37 +02:00
Nikos Mavrogiannopoulos
6dd533a10c bumped version
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-09-02 20:54:15 +02:00
Nikos Mavrogiannopoulos
895a23f372 release 1.2.1
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-08-22 15:10:32 +02:00
Nikos Mavrogiannopoulos
b2ab415f7a doc update
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-08-22 15:09:34 +02:00
Florian Domain
2c375721c1 fix(occtl): correct key for Limit TX in JSON output
* `TX` key is present twice in `occtl --json show users` output, the first
  key turns out to be the Limit TX configured.

Signed-off-by: Florian Domain <f.domain@criteo.com>
2023-08-14 11:01:49 +02:00
Nikos Mavrogiannopoulos
1c5c02b057 doc update
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-27 15:53:16 +02:00
Nikos Mavrogiannopoulos
c393d4d7b4 vhost: do not require setting device per vhost
It is not necessary to specify the device config directive on
each virtual host configuration. Ensure that we don't require it
by mistake. This also introduces a traffic test when operating
with virtual hosts.

Resolves: #480

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-18 16:32:34 +02:00
Nikos Mavrogiannopoulos
66a1fc8de3 worker: accept clavister's VPN connect request
The clavister oneconnect VPN client for android issues an
incorrect URL for the connection. Accept it.

Resolves: #485

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-14 15:57:39 +02:00
Nikos Mavrogiannopoulos
7c8abd2e2c NEWS: updated for next release
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-11 19:39:09 +02:00
Nikos Mavrogiannopoulos
49bee78af8 updated news for release
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-11 17:04:33 +02:00
Nikos Mavrogiannopoulos
70ceee36d6 sample.config: corrected documentation [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-11 14:54:57 +02:00
Nikos Mavrogiannopoulos
42b125a32f configure: bumped version
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-11 14:47:23 +02:00
Gareth Palmer
996d021e1b Add support for Cisco IP-Phone Enterprise firmware VPN client.
The VPN client that comes with the Cisco IP-Phone Enterprise
firmware is based on AnyConnect but was unable to authenticate
with ocserv.

The phone makes an initial GET request and looks for a cookie
named 'webvpn' that has an expiry attribute and a cookie named
'webvpnlogin' containing a non-empty value.

When username+password mode is configured, the phone will then
send a POST request containing those credentials. When using
certificate authentication an empty POST request is sent.

A handler that implements this new behaviour has been added
under the '/svc' path.

To use DTLS 'dtls-legacy' must be enabled and 'udp-port' must
be 443, a new 'cisco-svc-client-compat' option automatically
checks those settings.

New test cases test-pass-svc and test-cert-svc check the above
behaviour.

Older versions of the phone's firmware will fail to create the
DTLS tunnel if the cipher negotiated for HTTPS does not match
that selected for DTLS.

To work-around this either disable DTLS or only allow the
RSA-AES-256-CBC/SHA1 or RSA-AES-128-CBC/SHA1 cipher to be used.

doc/README-cisco-svc.md includes additional information.

Note: 'Enterprise' here is used to differentiate between that
firmware and the MPP (Multi-Platform) firmware which uses the
same hardware.

Signed-off-by: Gareth Palmer <gareth.palmer3@gmail.com>
2023-07-11 22:48:22 +12:00
Dimitri Papadopoulos
8139e78697 Call print_single_value_int() with has_more = 1
This is not the last print. The "0" had been introduced by 722e030e.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-06-17 09:27:18 +02:00
Dimitri Papadopoulos
813690b9c2 radius: groups defined over multiple AVPs
This helps circumvent the 253 characters limit of RADIUS string values.

We distinguish between value strings that start with "OU=" and the rest:
* Value strings that start with "OU=" define multiple groups in a single
  AVP. Here, we update the previous logic by taking into account all the
  AVPs. We emit a warning when discarding subsequent AVPs, but also when
  discarding groups within the current AVP because we have reached the
  maximum number of groups.
* Other value strings define a single group. Here, we change the
  previous logic. We append to the list of groups instead of silently
  discarding subsequent value strings.
  We emit a warning when discarding AVPs because we have reached the
  maximum number of groups.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-06-17 00:25:50 +02:00
Dimitri Papadopoulos
ea23edd453 seccomp: GnuTLS 3.7.3 requires open() and openat()
We have added open() unconditionally, to be able to open system priority
and FIPS complicance configuration files from workers.

We had already added openat() unconditionally.

Therefore there is no need to re-add them to read XML config files.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-06-16 17:16:27 +02:00
Dimitri Papadopoulos
e2afd99c96 seccomp: GnuTLS 3.7.3 requires open() unconditionally
Required on some version of Suse with GnuTLS 3.7.3, reportedly to open
system priority and FIPS compliance configuration files:
	/etc/crypto-policies/back-ends/gnutls.config
	/proc/sys/crypto/fips_enabled

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-06-16 17:16:27 +02:00
Nikos Mavrogiannopoulos
1ca50d7337 Removed gnulib
Supporting gnulib brought a whole class of problems due to its complexity.
Removing its support eliminates this class of problems and simplifies the
code significantly.

This sets the locale explicitly on server startup to eliminate the
need for custom string comparison functions.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-06-13 16:54:38 +02:00
Nikos Mavrogiannopoulos
5c253125c8 doc update
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-06-11 13:07:38 +02:00
Kirill Ovchinnikov
85fdf7d2e6 Camouflage functionality
This adds a "camouflage" functionality (looking and acting like an ordinary web server),
to prevent OCserv installations from being automatically scanned or blocked with active probing techniques.

Signed-off-by: Kirill Ovchinnikov <kirill.ovchinn@gmail.com>
2023-06-09 15:08:25 +02:00
Nikos Mavrogiannopoulos
1ecdf35494 NEWS: added entry for 1.1.8 [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-06-06 14:41:15 +02:00
Nikos Mavrogiannopoulos
2bdbf7927c Revert "Update CCAN code snippets"
This reverts commit d78f57994a.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-05-07 14:23:33 +02:00
Nikos Mavrogiannopoulos
1bc33ad612 released 1.1.7
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-05-07 14:07:55 +02:00
Dimitri Papadopoulos
b43d4ce174 Fix new typo found by codespell
Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-04-11 22:53:34 +02:00
Dimitri Papadopoulos
87e69fbfb7 CCAN hex: src/occtl/ → src/ccan/str/
Make clear hex.c and hex.h are vendored files from CCAN:
	https://github.com/rustyrussell/ccan

At the same time, update to commit ba79e21 committed on 9 January 2023,
for consistency with the rest of CCAN vendored files.

Additionally, by including <ccan/str/hex/hex.h> instead of "hex.h",
this fixes my Ubuntu 22.04 build, where including "hex.h" would include
the system Kerberos file /usr/include/heimdal/hex.h instead of
our local CCAN file hex.h.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-01-29 19:32:46 +01:00
Dimitri Papadopoulos
d78f57994a Update CCAN code snippets
Latest current commit ba79e21 commited on 9 January 2023:
	https://github.com/rustyrussell/ccan

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-01-22 12:20:44 +01:00
Dimitri Papadopoulos
a0334733dd Print message in case of plain authentication error
Message would be emitted at LOG_NOTICE level and go unnoticed.
Change to LOG_ERR.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-01-12 10:28:51 +01:00