16543 Commits

Author SHA1 Message Date
Ad Schellevis
15e477393f VPN: WireGuard: Status - show proper name when public keys overlap between instances. closes https://github.com/opnsense/core/issues/7265
With this commit, each peer is identified by its interface name and its public key
2024-03-16 09:42:29 +01:00
Ad Schellevis
8071c278e1 ApiControllerBase - fix ' rewind(): Stream does not support seeking (errno=2)' for configd socket. Since we start reading from the start, a rewind wouldn't do much anywy, it's only a bit strange this didn't crash earlier on stable. 2024-03-15 18:51:44 +01:00
Ad Schellevis
e172d9222d Trust - move ocsp_validate() from legacy certs.inc to Trust class and refactor its currently single user (openvpn). 2024-03-15 18:41:36 +01:00
Franco Fichtner
53e5a4f7d7 src: style sweep and plist fix 2024-03-14 20:32:36 +01:00
Ad Schellevis
cddd11ceb1 System: Trust: - cleanup legacy files and functions, closes https://github.com/opnsense/core/issues/7248
move functions that are only used in a single spot in core to that spot for clarity, certs.inc remaining functions are now:

function &lookup_ca($refid)
function &lookup_ca_by_subject($subject)
function &lookup_cert($refid)
function &lookup_crl($refid)
function ca_chain_array(&$cert)
function ca_chain(&$cert)
function cert_import(&$cert, $crt_str, $key_str)
function certs_build_name($dn)
function cert_get_subject($str_crt, $decode = true)
function cert_get_subject_array($crt)
function cert_get_issuer($str_crt, $decode = true)
function cert_get_modulus($str_crt, $decode = true, $type = 'crt')
function cert_get_purpose($str_crt, $decode = true)
function cert_get_serial($str_crt, $decode = true)
function cert_in_use($certref)
function cert_compare($cert1, $cert2)
function is_cert_revoked($cert, $crlref = "")
function ocsp_validate($ca_filename, $serial)

some of it used in plugins, mostly AcmeClient which may inherit the functions at some point when core doesn't need them anymore.
2024-03-14 19:11:28 +01:00
Ad Schellevis
62b639fced System: Trust: Certificates - work in progress for https://github.com/opnsense/core/issues/7248 2024-03-14 18:16:55 +01:00
Ad Schellevis
298fe4d306 System: Trust: Certificates - work in progress for https://github.com/opnsense/core/issues/7248
Add option to only sign a certificate using the same logic already available.
2024-03-14 16:25:38 +01:00
Franco Fichtner
cf569e81eb mvc: style sweep 2024-03-14 15:01:17 +01:00
Ad Schellevis
f89117c243 System: Trust: Revocation - work in progress for https://github.com/opnsense/core/issues/7248
add crl download button, might not be frequently used, but can be offered using existing api calls anyway.
2024-03-14 14:34:14 +01:00
Ad Schellevis
87c1d69bdb System: Trust: Revocation - work in progress for https://github.com/opnsense/core/issues/7248
add ocsp index.txt sample download to align with documentation (https://docs.opnsense.org/manual/certificates.html)
2024-03-14 14:27:37 +01:00
Ad Schellevis
0591ff28a6 System: Trust: Revocation - work in progress for https://github.com/opnsense/core/issues/7248
move download_content() to opnsense.js for easier re-use.
2024-03-14 14:27:37 +01:00
Franco Fichtner
d48dd6f9a3 dhcrelay: fine-tune service presentation and handling 2024-03-14 13:25:38 +01:00
Franco Fichtner
8b87c8caba dhcrelay: 'inet' unused now #6983 2024-03-14 13:03:51 +01:00
Franco Fichtner
0eb267f048 dhcrelay: patch the last spot for rule generation #6983 2024-03-14 13:00:13 +01:00
Franco Fichtner
e1b313852a dhcrelay: provide backend IPv6 support #6983
One complication here is that dhcrelay6 requires an interface
given to the server IP address which we do by simply looking
up the route to it.  I'm a bit pessimistic here aboutr link-local
usage which would require a user to input the interface which
very likely ends up in flames for more than one reason:

1. device names need to be used (at least from a technical POV)
2. the device names may contain "." which breaks our IP family detect
3. no no no

As a side note the agent option was not handled in IPv6 previously.
2024-03-14 11:12:13 +01:00
Franco Fichtner
b0087d5606 dhcrelay: switch ordering of bootgrids
While the main operation are the interfaces we can't add them before we have
a destination set up.  So by reordering we are hinting at this work flow and
the destination table should always be a bit shorter anyway.
2024-03-14 08:06:08 +01:00
Franco Fichtner
2a3e0a782b mvc: style sweep 2024-03-13 21:43:30 +01:00
Ad Schellevis
288dd9cb7f System: Trust: Revocation - work in progress for https://github.com/opnsense/core/issues/7248
* register menu item and acl
2024-03-13 21:05:35 +01:00
Ad Schellevis
bed2e66cf0 System: Trust: Revocation - work in progress for https://github.com/opnsense/core/issues/7248
* add raw dump button
* generate CRL and store text
* remove add/del footer buttons
2024-03-13 21:01:33 +01:00
Franco Fichtner
ad5fed3c4d dhcrelay: migrate IPv6 data, consolidation cleanups #6983
Menu, ACL and XMLRPC wer consolidated into the IPv4 flag.  IPv6 is
no longer functional and operates from the shared reimplementation
now.  Syslog doesn't work on OpenBSD dhcrelay especially since we
start it with -d so it tries to spam to stderr which is ignored by
daemon -f to background it properly with a pid file (it's a long
story, don't ask).
2024-03-13 18:00:31 +01:00
Franco Fichtner
53a95b0190 dhcrelay: split out plugin file, move some more around #6983 2024-03-13 16:56:44 +01:00
Franco Fichtner
0256a2754f dhcrelay: add bootgrid headers as requested by @adschellevis #6983 2024-03-13 15:59:35 +01:00
Franco Fichtner
972f6ce347 dhcrelay: dial this back for consistency #6983 2024-03-13 15:37:08 +01:00
Franco Fichtner
b09e5c3d22 dhcrelay: validate unqiue per address family for each interface #6983 2024-03-13 15:20:40 +01:00
Franco Fichtner
52e0dd48fa dhcrelay: custom validation to make ip4/ivp6 in the same model possible #6983
This can live in NetworkField in the future, but no reason not to test
drive this sooner.
2024-03-13 13:49:46 +01:00
Franco Fichtner
666222651c dhcrelay: minor adjustments due to discussion #6983 2024-03-13 12:59:52 +01:00
Franco Fichtner
b6352ce80d system: meh, typo 2024-03-13 09:17:48 +01:00
Franco Fichtner
c149ac2cfb system: fix syslog access for legacy moves
This reverts commit 022ab7ad75a994eb92d8e923ba904e033c593392.
2024-03-13 09:05:50 +01:00
Franco Fichtner
a38b887e29 dhcrelay: finish v4 and remove legacy page #6983 2024-03-13 08:51:29 +01:00
Franco Fichtner
6a4274a5e0 mvc: style sweep 2024-03-13 08:51:29 +01:00
Franco Fichtner
19f32d435c pluginctl: dead switch statement 2024-03-13 08:51:29 +01:00
Franco Fichtner
6fe993d187 ui: add a grid-reload helper to SimpleActionButton for #6983 2024-03-13 08:51:29 +01:00
Franco Fichtner
a87a82f2f4 ui: add a 'statusled' formatter to bootgrid for #6983
Let it just encode the colors given.  For now these are service colors
but they could be any colors, especially the bootstrap encoded ones
through the -sucess, etc. macros although for other themes this could
get a bit wild...
2024-03-13 08:51:29 +01:00
Ad Schellevis
022ab7ad75 System: Settings: Administration - possible issue when syslog container doesn't exist in the config. closes https://github.com/opnsense/core/issues/7323 2024-03-13 08:45:47 +01:00
Ad Schellevis
661e55de99 System: Trust: Revocation - work in progress for https://github.com/opnsense/core/issues/7248 2024-03-12 21:24:07 +01:00
Ad Schellevis
4dccc49525 System: Trust: Revocation - work in progress for https://github.com/opnsense/core/issues/7248
* fix self (not being $self)
* add serial and lifetime fields
2024-03-12 21:00:19 +01:00
Ad Schellevis
d3f661a74c System: Trust: Revocation - work in progress for https://github.com/opnsense/core/issues/7248
* add CRL validation when importing an existing
* hook phpseclib3 into initialize()
2024-03-12 20:46:38 +01:00
Franco Fichtner
0b4c0bcb2f mvc: style sweep/magic number avoidance 2024-03-12 20:28:34 +01:00
Franco Fichtner
895edd315f mvc: style sweep 2024-03-12 20:22:52 +01:00
Ad Schellevis
73344dfa79 System: Trust: Revocation - work in progress for https://github.com/opnsense/core/issues/7248 2024-03-12 18:28:56 +01:00
Franco Fichtner
672e8ba9e1 dhcrelay: functional replacement #6983
Since we are not ISC we can make a new menu spot.  Keep the legacy
reconfiguration spot as we end up building a complex command line
to run and this doesn't have to go into a template that just stuffs
args into a variable to start it, which then requires and rc.d file.

Though we want to move it out of dhcpd.inc at some point.

Apparently the new MVC page is missing an apply button.  ;)
2024-03-12 14:12:59 +01:00
Ad Schellevis
fd37295382 configd - session LOCAL_PEERCRED is only supported on FreeBSD at the moment. 2024-03-12 12:01:33 +01:00
Franco Fichtner
301a9b7f8e dhcrelay: first bits of GUI and tweaks along the way 2024-03-12 11:00:59 +01:00
Franco Fichtner
46ea5ba6b4 dhcp: side-by-side works fine now #6983 2024-03-12 11:00:59 +01:00
Franco Fichtner
7d80f955de dhcp: DHCRelay model migration #6983
It would be nice to have both IPv4 and IPv6 in here but it may be
less desirable in practice.  For now use a shared namespace and
only migrate IPv4 switching the binary and breaking everything
in the process.
2024-03-12 11:00:59 +01:00
Franco Fichtner
f673d7f01b systme: tweak help text
Better not line-wrap for the obvious translation reasons.
2024-03-12 09:22:59 +01:00
Ad Schellevis
ace52fa915 System: Gateways: Configuration - explain boundaries for weight, closes https://github.com/opnsense/core/issues/7321 2024-03-12 08:30:46 +01:00
Franco Fichtner
8010030d10 src: style sweep/plist 2024-03-12 06:51:33 +01:00
Ad Schellevis
06fe58ae9b System: Trust: Revocation - work in progress for https://github.com/opnsense/core/issues/7248 2024-03-11 20:42:32 +01:00
Ad Schellevis
da48440f43 System: Trust: Authorities, Certificates - work in progress for https://github.com/opnsense/core/issues/7248
cleanup volt templates
2024-03-11 19:38:20 +01:00