Commit Graph

3768 Commits

Author SHA1 Message Date
Nikos Mavrogiannopoulos
f616475643 released 1.2.2
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
1.2.2
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
747940238d tests: added test for idle and session timeout
This checks the functionality of idle-timeout and
session-timeout as well as whether the cookies are
invalidated after the user is disconnected.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-09-19 10:41:57 +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
Dimitri Papadopoulos Orfanos
b0c9ef1e0e Merge branch 'static' into 'master'
Make functions static where it makes sense

See merge request openconnect/ocserv!370
2023-09-15 13:57:33 +00:00
Dimitri Papadopoulos Orfanos
f71538d226 Merge branch 'static_camouflage' into 'master'
Make check_camouflage_url() static

See merge request openconnect/ocserv!368
2023-09-15 13:57:00 +00: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
8f4e2de4b5 Merge branch 'rc_avpair_add' into 'master'
worker: check the return value of rc_avpair_add()

Closes #546

See merge request openconnect/ocserv!372
2023-09-15 13:29:04 +00:00
Nikos Mavrogiannopoulos
fbfbdc058a tests: use sec-mod-scale on cookie tests
This ensures we catch issues similar to !288.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-09-15 15:19:19 +02: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
fec6cc9908 worker: check the return value of rc_avpair_add()
We have been checking the return value of rc_avpair_add() in all cases,
except the PW_NAS_IP_ADDRESS/PW_NAS_IPV6_ADDRESS cases.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-09-15 13:43:27 +02:00
Dimitri Papadopoulos
61b6f0a924 Make functions static where it makes sense
Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-09-11 20:34:07 +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
Dimitri Papadopoulos
d21d2c455c Make check_camouflage_url() static
It is called only from worker-vpn.c.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-09-11 19:07:04 +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
16b86e751a Merge branch 'TODO' into 'master'
Why not delete TODO instead of only emptying it?

See merge request openconnect/ocserv!365
2023-09-02 18:52:26 +00:00
Dimitri Papadopoulos
ab8a05e4c2 Why not delete TODO instead of only emptying it?
Signed-off-by: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
2023-09-01 18:29:21 +03:00
Nikos Mavrogiannopoulos
6aad62e266 debug: increased default log-level to debug
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-08-28 20:48:02 +02:00
Nikos Mavrogiannopoulos
895a23f372 release 1.2.1
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
1.2.1
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
Nikos Mavrogiannopoulos
e665fd5a5b Account the correct number of points when proxyproto is in use
When the proxy protocol is used ensure that authentication failure
will credit the right number of points to the actual client IP
address.

Resolves: #529

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-08-19 20:51:48 +02:00
Nikos Mavrogiannopoulos
59400941cf tests: verify that address got by the proxy matches the client
Also measure whether ban points are credited to the right
address for failed attempts.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-08-17 16:14:14 +02:00
Dimitri Papadopoulos Orfanos
e269f22a43 Merge branch 'fix-user-json' into 'master'
fix(occtl): correct key for Limit TX in JSON output

See merge request openconnect/ocserv!363
2023-08-15 17:51:02 +00: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
5c738a8c45 build-aux: removed legacy gnulib files
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-27 22:41:25 +02:00
Nikos Mavrogiannopoulos
d7b07677fe release.sh: added script to do the release process
This does the release of the tarballs, the git tagging and
the release of gitlab.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-27 22:39:37 +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
02442aabbc Replaced nuttcp tests with iperf3
iperf3 is consistently included in all distributions we
are testing at, in contrast with nuttcp.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-27 15:50:33 +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
870086600c main-sec-mod: Added explicit check for too extreme length values
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-18 11:48:07 +02:00
Nikos Mavrogiannopoulos
a4b8f2a237 config: correctly set tcp port on vhosts
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-18 11:42:27 +02:00
Nikos Mavrogiannopoulos
6edfb7f104 ipc.proto: time_t is sent in 64 bit value
This prevents Y2K38 issues.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-18 11:38:23 +02:00
Nikos Mavrogiannopoulos
0cc4a469ab worker-svc: added check on cstp_printf
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-18 11:28:38 +02:00
Nikos Mavrogiannopoulos
35fd6ddf4d Merge branch 'tmp-clavister' into 'master'
Accept the clavister android client

Closes #485

See merge request openconnect/ocserv!361
2023-07-14 14:25:09 +00: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
ea7cb0a09f Added lib-link and dependencies for AC_LIB_HAVE_LINKFLAGS macro
These macros were part of the gnulib, and they are not available
by default on system. They become available pretty randomly as they
get installed by arbitrary software (e.g., gettext-devel on my system).
We now make them available unconditionally ensuring we can compile
ocserv on a freshly installed system.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-14 15:57:39 +02:00
Nikos Mavrogiannopoulos
8f4ed396c2 worker: print alerts received during TLS handshake
This also makes the tlslib macros more consistent.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-14 15:57:19 +02:00
Nikos Mavrogiannopoulos
78e25f4ff6 .gitlab-ci.yml: introduced a signoff check
This also moves any static analyzers checks early in the testing
phases ti catch basic errors faster.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-13 02:05:55 +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
b09b1b81de tests: added missing file
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-11 18:11:06 +02:00
Nikos Mavrogiannopoulos
49bee78af8 updated news for release
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
1.2.0
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
9bd97bde91 .gitlab-ci.yml: added ubuntu22.04
There is an issue with gssapi on this version of Ubuntu. While
the package exists, it doesn't work as openssl doesn't support
md4. See https://bugs.launchpad.net/ubuntu/+source/gss-ntlmssp/+bug/1995915

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-11 14:47:32 +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
Nikos Mavrogiannopoulos
9e457abda8 Merge branch 'cisco-ipphone' into 'master'
Add support for Cisco IP-Phone Enterprise firmware VPN

See merge request openconnect/ocserv!356
2023-07-11 12:46:40 +00: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
Nikos Mavrogiannopoulos
5841da06b6 .gitlab-ci.yml: static-analyzer: enable optional code
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-07 12:05:58 +02:00
Nikos Mavrogiannopoulos
58d510d0a5 vhost: corrected issue under scan-build
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-07 12:04:11 +02:00
Nikos Mavrogiannopoulos
6ba30cd781 openidconnect: corrected possible cleanup issue
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-07 12:03:47 +02:00
Nikos Mavrogiannopoulos
7ddf10e28c Merge branch 'tmp-fix-do-while-in-macro-issues' into 'master'
Replace "Macros starting with if should be enclosed by a do - while loop"

See merge request openconnect/ocserv!357
2023-07-07 06:36:54 +00:00