15942 Commits

Author SHA1 Message Date
Franco Fichtner
4de945bdae interfaces: routing configuration on changed interfaces only 2024-09-12 22:17:15 +02:00
Franco Fichtner
0d951209e5 interfaces: 6RD/6to4 route creation should be limited to IPv6 2024-09-12 22:15:07 +02:00
Franco Fichtner
a85bd197c2 system: make system_routing_configure() deal with interface maps 2024-09-12 22:13:26 +02:00
Franco Fichtner
bb9353dba9 plugins: add plugins_argument_map() helper
This helper parses "mapped" arguments for batch reloads of e.g.
interfaces or devices or items related to that (like gateway
names).  The rules are simple:

o If the mapped argument is null reload in full (return true)
o If the mapped argument is an array handle it under later conditionals (return true)
o If the mapped argument is of an unsupported type do nothing (return false)
o If the mapped argument is not null but empty do nothing (return false)
o If the argument is a string convert it to an array, splitting the string
  by comma (return true)
o Modify the $map argument to be either null or a non-empty array to normalize
  the passed map (also for backwards-compatible reasons of newwanip_map
  and vpn_map intermediate steps).
2024-09-12 22:06:41 +02:00
Stephan de Wit
3327890ab4
dashboard: add Picture widget (#7860)
---------

Co-authored-by: Franco Fichtner <franco@opnsense.org>
2024-09-12 16:54:53 +02:00
Franco Fichtner
c31f22f23f
system: render header for failed active widgets to allow removal (#7858)
* system: render header for failed active widgets to allow removal

If there is a syntax error in the widget JS code we will not be
able to remove it from the dashboard.  This is only a POC as it
doesn't fully work for varying reasons, but details where the
problem lies.

* dashboard: account for failed module imports or class instantiations

---------

Co-authored-by: Stephan de Wit <stephan.de.wit@deciso.com>
2024-09-12 12:02:59 +02:00
Franco Fichtner
a610cf8ed2 plugins: make an important note 2024-09-12 10:09:33 +02:00
Franco Fichtner
3dd3c9fe6f interfaces: annotate future plans 2024-09-12 09:49:56 +02:00
Franco Fichtner
194fb1ba0c firmware: fix PHP warning 2024-09-11 14:50:10 +02:00
Franco Fichtner
e8212a6116 src: more whitespace 2024-09-11 06:55:15 +02:00
Franco Fichtner
5497d27ba1 src: whitespace 2024-09-11 06:50:46 +02:00
Franco Fichtner
76f84fdf67 src: style and stuff 2024-09-10 21:43:38 +02:00
Ad Schellevis
0378c650d4
Add System: Trust: Settings page (#7854)
* System: Trust: Settings - add boilerplate and move existing store_intermediate_certs setting to new module including migration

* System: Trust: Settings - add configuration constraints and glue to flush CRL's to local trust store when requested.

This implements the following options:

* Enable/Disable legacy providers (enabled by default, which is the current default)
* Option to write specific configuration constraints, when enabled, CipherString, Ciphersuites and MinProtocol[DTS] can be configured

One last piece of the puzzle is the "crl" event action, which should deploy to the local trust store as well ehen requested.

* Update src/opnsense/mvc/app/models/OPNsense/Core/Menu/Menu.xml

Co-authored-by: Franco Fichtner <franco@opnsense.org>

* System: Trust: Settings - process review comments https://github.com/opnsense/core/pull/7854

* System: Trust: Settings - flush CRL's when "Store CRL's" is selected

---------

Co-authored-by: Franco Fichtner <franco@opnsense.org>
2024-09-10 21:15:11 +02:00
Ad Schellevis
72472c37be System: Trust: Revocation - add missing CRL changed event
Although the current impact is likely low, when CRL's are updated, they should trigger this event to update the consumers of this information (as it was pre-migration)
2024-09-10 20:38:35 +02:00
Ad Schellevis
fb9cb1e4ca System: Trust: Certificates - store private key when creating a csr, closes https://github.com/opnsense/core/issues/7856 2024-09-10 20:19:00 +02:00
Ad Schellevis
c4d0dd6154 core / trust - add support for certificate bundles in our certctl.py script.
Since we deploy ca_root_nss in a directory with less priority, we can exclude the certificates already part of the base install.
When ca_root_nss contains a certificate not yet known in base, it will copy the certificate from the bundle in the "hashed" file, which also gurantees our packed bundles contain the same content as openssl would use by default.

While here, also include /usr/share/certs/untrusted, which contains the base blacklisted certs.
2024-09-09 20:14:07 +02:00
Stephan de Wit
e415eb8230 interfaces: prevent CARP IP removal when VHID group is in use by IP alias 2024-09-09 14:53:25 +02:00
Ad Schellevis
ebddde95f4 System: Trust - temporary disable validation of multiple certs in a ca, as discussed in 76228b0a45 (r146422317) with @fichtner 2024-09-09 12:27:05 +02:00
Stephan de Wit
f954d5f889 dashboard: bail on invalid CARP configuration 2024-09-09 12:06:00 +02:00
Stephan de Wit
4cf0e7f133 ui: allow style tag on headers 2024-09-09 10:13:52 +02:00
Franco Fichtner
2c2a2dbcc2 system: remove unused $bootup flag in dpinger_configure_do() 2024-09-09 09:52:49 +02:00
Franco Fichtner
d08069699f openvpn|wireguard: close-on-exec 2024-09-06 08:34:32 +02:00
Ad Schellevis
033402265e core / trust - missed a spot in 76228b0a45 (not removing crl's) 2024-09-05 11:28:19 +02:00
Ad Schellevis
fc5714b1de Lobby: Dashboard - small experiment for https://github.com/opnsense/core/issues/7837 inspired by the 'Refused to load the image 'data:image/svg+xml;...' message. 2024-09-04 21:07:50 +02:00
Ad Schellevis
c9cd11c978 core:cookies - explicitly set SameSite=Lax which is the default when not set, prevents some notices in Firefox being thrown
Although Strict would likely be suitable as well, Lax is merely making the current default explicit.

* https://developers.google.com/search/blog/2020/01/get-ready-for-new-samesitenone-secure
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
2024-09-04 20:33:25 +02:00
Ad Schellevis
76228b0a45 core / trust - cleanup certctl.py script and move to python cryptography for generic functionality.
This commit adds support for deployment of CRL's, as the original implementation also does (but these files don't exist at our end at the moment).
Secondly it fixes a minor omission where cert files with more than one cert in them where not omitted.
2024-09-04 18:34:17 +02:00
Stephan de Wit
095e26f809 dashboard: restructure previous 2024-09-04 11:06:50 +02:00
Stephan de Wit
ae2f17957f dashboard: do not save x/y coordinates on smaller screens 2024-09-04 11:01:57 +02:00
Franco Fichtner
4421914442 system: update comment on temperature stats collection 2024-09-03 20:57:09 +02:00
Franco Fichtner
6f21218193 system: remove RRD temp read from temperature.sh 2024-09-03 14:48:07 +02:00
Monviech
9a71a3919e
dashboard: Construct Wireguard.js row ID from if+public-key (#7838)
* dashboard: Construct Wireguard.js row ID from if+public-key to ensure uniqueness when public keys are reused.

* dashboard: Wireguard.js use concatenated string for uniqueId
2024-09-03 13:41:49 +02:00
Franco Fichtner
87b8999d99 network time: reduce diff with previous, change to query property 2024-09-03 12:48:57 +02:00
doktornotor
7f0871c21f
Enable restrict noquery by default for ntpd (#7830)
See #7832
2024-09-03 10:59:18 +02:00
Franco Fichtner
40db484e07 interfaces: minimize reload exposure on interface apply
Refine this after consulting @adschellevis on the main concern of the
code here.
2024-09-03 10:04:11 +02:00
Franco Fichtner
6fb56e5668 intrusion detection: since we add Required=Y we better bump the version 2024-09-03 08:22:51 +02:00
Franco Fichtner
c1609c9055 interfaces: replace 'newwanip_map' from interface apply
This always bugged me: 'newwanip_map' is called when e.g. DHCP is
done but here we just do it async to start something.  This doesn't
make sense, because eventually it triggers twice.

What rc.reload_all and setports.php do is call 'local' and I think
that makes sense.
2024-09-03 08:18:12 +02:00
Franco Fichtner
2dbd793dfe reporting: add executable flag for lint reasons 2024-09-03 08:01:33 +02:00
Franco Fichtner
3476d11a0a reporting: scrub rrd.inc use 2024-09-02 21:27:26 +02:00
Franco Fichtner
89a97ddb28 system: remove rrd_create_gateway_quality(), it's gone? ;) 2024-09-02 21:15:59 +02:00
Franco Fichtner
fcd54e4549 shell: configuration is static here, no need to restart cron/rrd 2024-09-02 21:10:16 +02:00
Franco Fichtner
ecf987820d reporting: style sweep 2024-09-02 21:06:03 +02:00
Ad Schellevis
895e58ff25
Reporting / rrd - refactor existing code (#7836)
Add RRD package with a simple factory class and a basic construct to define different rrd output types we support.
This package contains the following:

* RRD/Types -- Output definitions, responsible for generating RRD structures and feeding data
* RRD/Stats -- Statistics gathering classes
* Factory -- binds types and statistics together. 

On my end on a simple test this is roughly 40% faster than running /var/db/rrd/updaterrd.sh, which makes caching of metadata (config access) less relevant.

The new script should be able to replace all existing rrd cruft and supports a debug mode to find discrepanties between defined outputs in types and collected data in stats.

```
Usage: updaterrd.php [-h] [-d]
            -d debug mode, output errors to stdout
```
2024-09-02 16:40:47 +02:00
Franco Fichtner
54ccb747cd system: handle stale "pfsyncinterfaces" and improve workflow
PR: https://forum.opnsense.org/index.php?topic=42549.0
2024-09-02 12:03:24 +02:00
Franco Fichtner
4c07de7e34 interfaces: remove deprecated "vpn" event
Everything has been converted and plugins do not ship with a
"vpn" event.  "newwanip" is similar and the plugins have been
ensured to be moved to the new one in 24.7.3 already.
2024-09-02 09:25:58 +02:00
Ad Schellevis
f29d93198d System: Trust: Certificates - map derivative field cert_type to expose purpose to the userinterface. closes https://github.com/opnsense/core/issues/7835 2024-09-02 09:18:30 +02:00
Franco Fichtner
0e2812220d interfaces: drop the unmapped events from newwanip scripts 2024-09-02 09:17:29 +02:00
Franco Fichtner
f24d93b8ea openvpn: forgot to switch to mapped event 2024-09-02 09:16:50 +02:00
Franco Fichtner
c17d021b4c interfaces: add proper validation for 6RD and 6to4
Also bring in 947e61b1a5e6fe5 done on stable and refine it further.
So it turns out these run on IPv4 but are immune to "IPv4 connectivity"
switch for better or worse.

PR: https://forum.opnsense.org/index.php?topic=42081.msg211015#msg211015
2024-09-02 09:04:30 +02:00
Ad Schellevis
7d5d2f26b5 VPN: OpenVPN: Connection Status - add username field to the grid, closes https://github.com/opnsense/core/issues/7834
Although we recommend using matching CN's and usernames, it is possible to share a certificate. Since the datafeed already contains the username, let's add the field to the grid.
2024-09-01 21:05:53 +02:00
Ad Schellevis
0227780bbe Reporting / rrd - remove non existing 3g statistics 2024-09-01 14:00:54 +02:00