OPNSense/core fbf9df2src/etc/inc system.inc

system: kill the SSL bundles in default locations

Neither OpenSSL base (/etc/ssl) nor ports (/usr/local/openssl) need
the bundle file now that we use the directory trust store.  The downside
is that as soon as the bundle exists OpenSSL library will read both the
directory and the bundle by default defeating the purpose of a single
location and the directory being faster.

Keep the fringe ca_root_nss location /usr/local/etc/ssl since that is
still seeded by the package but controlled and topped up by the user
configured authorities.

(cherry picked from commit 913a5caae3da0cf40087cb46fbc0bda00e69752e)
DeltaFile
+4-1src/etc/inc/system.inc
+4-11 files

OPNSense/core 1aa985fsrc/opnsense/mvc/app/controllers/OPNsense/Kea/forms generalSettings4.xml, src/opnsense/mvc/app/models/OPNsense/Kea KeaDhcpv4.xml KeaDhcpv4.php

feat(dhcp): add dhcp-socket-type option to Kea DHCP server (#8069)

* feat(dhcp): add dhcp-socket-type option to Kea DHCP server

This adds the ability to configure the DHCP socket type (UDP/Raw) in the
Kea DHCP server settings through the web UI.

- Added socket type field to model definition
- Added dropdown in general settings form
- Updated config generation to include socket type setting

* changed default value for dhcp_socket_type to raw

* bumped version number for KeaDhcpv4.xml

(cherry picked from commit 37c9deab896748e9db4187cb6b55fdc9db66750f)
DeltaFile
+9-1src/opnsense/mvc/app/models/OPNsense/Kea/KeaDhcpv4.xml
+6-0src/opnsense/mvc/app/controllers/OPNsense/Kea/forms/generalSettings4.xml
+2-1src/opnsense/mvc/app/models/OPNsense/Kea/KeaDhcpv4.php
+17-23 files

OPNSense/core eef85e5src/opnsense/scripts/firmware connection.sh config.sh

firmware: use REQUEST to print a TLS/CRL usage hint

Also create output_text and output_cmd to allow for neater
firmware scripts with less duplication and use it in the
connectivity audit.

(cherry picked from commit f36aacf08f75f2ee24d1614f61c7c481ed1403e0)
DeltaFile
+12-12src/opnsense/scripts/firmware/connection.sh
+15-0src/opnsense/scripts/firmware/config.sh
+27-122 files

OPNSense/core ac8c682src/opnsense/scripts/firmware config.sh

firmware: force CRL check on development deployment

(cherry picked from commit 0d067d973a4d7a24abd086e33fef347a44d7770b)
DeltaFile
+1-1src/opnsense/scripts/firmware/config.sh
+1-11 files

OPNSense/core 66c00a5src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes JsonKeyValueStoreField.php

mvc:model:JsonKeyValueStoreField - cache configd call for the duration of the session.

After removing the file caches in https://github.com/opnsense/core/issues/7515, we introduced the slight downside of calling configd for every field.
Using this commit, we should only call configd once per session, which prevents each record in a set calling configd.

This should increase overall performance when using these fieldtypes.

(cherry picked from commit 525481c15ba2b7f3dd90418d43b2f943e8662511)
DeltaFile
+32-19src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/JsonKeyValueStoreField.php
+32-191 files

OPNSense/core 8f270a8src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/forms dialogInstance.xml, src/opnsense/mvc/app/models/OPNsense/OpenVPN OpenVPN.xml

VPN: OpenVPN: Instances - support case insensitive strictusercn matching for instances, closes https://github.com/opnsense/core/pull/7862

(cherry picked from commit c345e01de27f196d69a275b33c223ee4f0fd6374)
DeltaFile
+8-5src/opnsense/scripts/openvpn/user_pass_verify.php
+7-2src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.xml
+2-2src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/forms/dialogInstance.xml
+17-93 files

OPNSense/core 01856a4src/opnsense/service/templates/OPNsense/IDS newsyslog.conf suricata.yaml

Services: Intrusion Detection : limit stats.log logging(#7857)

* Reduce pointless logging

Mitigates https://github.com/opnsense/core/issues/7101

* Do not compress stats.log on log rotation

This reverts https://github.com/opnsense/core/commit/55ac1715bf83ca06206e85ac679815df8d905f8a done for https://github.com/opnsense/core/issues/4085

Nothing else in OPNsense compresses the logs on rotation, the compression is very much pointless on ZFS with lz4 compression enabled by default, plus sanitizing the stats interval reduces the log size to a sane value, smaller than what was previously achieved by gzip on log rotation.

(cherry picked from commit 4c2619dead6793c15afecfc9dd8b24a5e365c085)
DeltaFile
+1-1src/opnsense/service/templates/OPNsense/IDS/newsyslog.conf
+1-1src/opnsense/service/templates/OPNsense/IDS/suricata.yaml
+2-22 files

OPNSense/core 7fd6b18src/etc/inc system.inc

interfaces: use Autoconf class to avoid raw ifctl file access

(cherry picked from commit b9b98f12ae8bc4a13e262acecfac193f7b87e1e8)
DeltaFile
+1-1src/etc/inc/system.inc
+1-11 files

OPNSense/core e204c5esrc/opnsense/mvc/app/controllers/OPNsense/Unbound/Api SettingsController.php, src/opnsense/mvc/app/controllers/OPNsense/Unbound/forms dialogDomainOverride.xml

Services: Unbound DNS: Overrides - move domain overrides to Query Forwarding, closes https://github.com/opnsense/core/issues/7243

(cherry picked from commit e33c4ab513570c95559dfed1a983fc3c68b405a2)
(cherry picked from commit aa8fe94ce078101c73ef5bfb863caaeee558829c)
(cherry picked from commit 387e75b4a5feea4b7426f3a471c8022efa629942)
(cherry picked from commit b2d26c16b599049d0df92a5a2fd048d96affe5f6)
DeltaFile
+0-71src/opnsense/mvc/app/models/OPNsense/Unbound/FieldTypes/UnboundDomainField.php
+0-67src/opnsense/mvc/app/models/OPNsense/Unbound/FieldTypes/UnboundServerField.php
+53-0src/opnsense/mvc/app/models/OPNsense/Unbound/Migrations/M1_0_11.php
+1-44src/opnsense/mvc/app/controllers/OPNsense/Unbound/Api/SettingsController.php
+0-44src/opnsense/mvc/app/controllers/OPNsense/Unbound/forms/dialogDomainOverride.xml
+0-30src/opnsense/mvc/app/views/OPNsense/Unbound/overrides.volt
+54-2568 files not shown
+96-32214 files

OPNSense/core 47ce39fsrc/opnsense/mvc/app/library/OPNsense/Auth API.php Base.php

Authentication: add a "time-loop" around authentication for failed attempts, closes https://github.com/opnsense/core/issues/8031

This commit adds a wrapper in base for the authenticate() method, which calls the protected _authenticate() method for a timed auth sequence.
When authentication is fully handled elsewhere (LDAP, RADIUS), we trust the provider for proper constraints, for local cases we move our implementations to _authenticate() in this commit.

(cherry picked from commit 4cb1f6d57d3a07f75ba2995370e5cc07714f1a01)
(cherry picked from commit 3cf5160e72a3064b22c02df2c0c3916c221a8ec3)
(cherry picked from commit d3c1dd827b3dff49ee4884582106357e49330e2c)
(cherry picked from commit 9c08cd9abdaa4d5c434cf65cd539187508e8dd0e)
(cherry picked from commit ae97263e4605feabf06a9097fc333bc2abd1ad79)
DeltaFile
+21-24src/opnsense/mvc/app/library/OPNsense/Auth/API.php
+32-0src/opnsense/mvc/app/library/OPNsense/Auth/Base.php
+2-2src/opnsense/mvc/app/library/OPNsense/Auth/TOTP.php
+1-1src/opnsense/mvc/app/library/OPNsense/Auth/Voucher.php
+1-1src/opnsense/mvc/app/library/OPNsense/Auth/Local.php
+57-285 files

OPNSense/core cb6ec88src/etc/inc interfaces.inc

Interfaces: Wireless: Devices - try to remove mac trickery for hostapd for https://github.com/opnsense/core/issues/8079

All of this stuff looks really old, it seems to originate from https://github.com/pfsense/pfsense/commit/864bf77420afb47d55bf8b84b789020182095d44, which might be an issue that doesn't actually exist anymore..
DeltaFile
+0-22src/etc/inc/interfaces.inc
+0-221 files

OPNSense/core d4378f0. plist, src/opnsense/scripts/firmware tests.sh config.sh

firmware: opnsense-update -Q now installs the tests set

Since the test set follows the kernel it would be better to just
support it in opnsense-update which is done.  "qyua" can use this
to bootstrap and we do not have to worry about fetch env for this
optional component as it cannot be installed from the GUI or console
menu.
DeltaFile
+0-43src/opnsense/scripts/firmware/tests.sh
+0-1plist
+0-1src/opnsense/scripts/firmware/config.sh
+0-453 files

OPNSense/core f8e8969. plist, src/opnsense/scripts/firmware tests.sh config.sh

firmware: add minimal tests set implementation
DeltaFile
+43-0src/opnsense/scripts/firmware/tests.sh
+1-0plist
+1-0src/opnsense/scripts/firmware/config.sh
+45-03 files

OPNSense/core 7201883src/opnsense/mvc/app/controllers/OPNsense/Auth/Api UserController.php GroupController.php, src/opnsense/mvc/app/library/OPNsense/Auth Base.php

src: style sweep
DeltaFile
+5-6src/opnsense/mvc/app/controllers/OPNsense/Auth/Api/UserController.php
+3-3src/opnsense/mvc/app/controllers/OPNsense/Auth/Api/GroupController.php
+2-4src/opnsense/mvc/app/controllers/OPNsense/Auth/Api/PrivController.php
+1-3src/opnsense/mvc/app/models/OPNsense/Auth/FieldTypes/UidField.php
+2-2src/opnsense/mvc/app/library/OPNsense/Auth/Base.php
+1-3src/opnsense/mvc/app/models/OPNsense/Auth/FieldTypes/GidField.php
+14-218 files not shown
+16-3214 files

OPNSense/core 6603fb7src/opnsense/scripts/firmware health.sh config.sh

firmware: hide PIPEFILE, LOCKFILE; some minor tweaks
DeltaFile
+45-45src/opnsense/scripts/firmware/health.sh
+22-2src/opnsense/scripts/firmware/config.sh
+12-12src/opnsense/scripts/firmware/check.sh
+9-14src/opnsense/scripts/firmware/reinstall.sh
+4-10src/opnsense/scripts/firmware/upgrade.sh
+4-9src/opnsense/scripts/firmware/update.sh
+96-927 files not shown
+119-11513 files

OPNSense/core 78cf96csrc/opnsense/mvc/app/controllers/OPNsense/Auth/Api UserController.php, src/opnsense/mvc/app/views/OPNsense/Auth user.volt

System: Access: migrate Users and Groups to MVC/API (#8046)

* System: Access: Groups - in preperation for https://github.com/opnsense/core/issues/7904, add support for comma separated member lists.

If we convert groups to a model, we will switch the nested <member> tags into comma separated fields, e.g.

        <member>1</member>
        <member>12</member>

will convert to:

        <member>1,12</member>

using this commit we support both for areas where these are being read.

* System: Access: Users - refactor to MVC (https://github.com/opnsense/core/issues/7904)

* add initial boilerplate
* unpack `<priv/>` field on first access

    [65 lines not shown]
DeltaFile
+0-1,077src/www/system_usermanager.php
+0-476src/www/system_groupmanager.php
+0-293src/www/system_usermanager_addprivs.php
+244-0src/opnsense/mvc/app/controllers/OPNsense/Auth/Api/UserController.php
+239-0src/opnsense/mvc/app/views/OPNsense/Auth/user.volt
+0-197src/www/system_usermanager_import_ldap.php
+483-2,04338 files not shown
+2,625-2,34944 files

OPNSense/core 3a78880. plist

plist
DeltaFile
+29-4plist
+29-41 files

OPNSense/core e83c60bsrc/opnsense/mvc/app/library/OPNsense/Auth Base.php

System: Access: migrate Users and Groups to MVC/API (https://github.com/opnsense/core/pull/8046)

o align "policy change for %s unlink group" with master (unlink when duplicates exists)
DeltaFile
+3-1src/opnsense/mvc/app/library/OPNsense/Auth/Base.php
+3-11 files

OPNSense/core cd9adb1src/opnsense/mvc/app/library/OPNsense/Auth AuthenticationFactory.php LDAP.php, src/opnsense/mvc/app/models/OPNsense/Auth User.xml

System: Access: Users - remove userDNmap support as it belonged to the import https://github.com/opnsense/core/issues/7904
DeltaFile
+0-30src/opnsense/mvc/app/library/OPNsense/Auth/AuthenticationFactory.php
+0-10src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php
+0-1src/opnsense/mvc/app/models/OPNsense/Auth/User.xml
+0-413 files

OPNSense/core a6fe2fasrc/opnsense/mvc/app/controllers/OPNsense/Auth/Api UserController.php, src/opnsense/mvc/app/views/OPNsense/Auth user.volt

System: Access: Users - refactor to MVC (https://github.com/opnsense/core/issues/7904)

* add initial boilerplate
* unpack `<priv/>` field on first access
* unpack '<apikeys/>' field on first access and implement key actions into ApiKeyField
* add apikey grid in user management view
* change isset() to !empty() for users disabled flag in backend code
* move user atributes into dialog
* hook PrivField type to \OPNsense\Core\ACL()
* refactor Auth/API to use new User class
* otp seed logic  with simple api call to generate new seeds and some JS glue for the frontend
* uid autonumber field
* language selector using get_locale_list() via configd (cached)
* add StoreB64Field field for authorizedkeys so we can keep the field contents backwards compatible.
* ExpiresField for custom date parsing, supporting previous input formats as well.
* group membership using a volatile custom field type, controller is responisble for persisting the configuration data to avoid entanglement between models
* add button which links to most likely user certs (based on commonname), to avoid all sorts of magic to reflect certs back into the usermanager.
* add getUserPrivs() to model so we can fetch a full list of privs for a user
* show user icons, long this might be less relevant

    [10 lines not shown]
DeltaFile
+0-1,077src/www/system_usermanager.php
+0-476src/www/system_groupmanager.php
+0-293src/www/system_usermanager_addprivs.php
+256-0src/opnsense/mvc/app/controllers/OPNsense/Auth/Api/UserController.php
+236-0src/opnsense/mvc/app/views/OPNsense/Auth/user.volt
+0-197src/www/system_usermanager_import_ldap.php
+492-2,04334 files not shown
+2,522-2,26740 files

OPNSense/core 1171fbasrc/opnsense/service/conf/actions.d actions_auth.conf

Update src/opnsense/service/conf/actions.d/actions_auth.conf
DeltaFile
+0-2src/opnsense/service/conf/actions.d/actions_auth.conf
+0-21 files

OPNSense/core dffb616src/opnsense/mvc/app/controllers/OPNsense/Auth/Api PrivController.php

System: Access: Privileges - fix updating groups dropping privileges for https://github.com/opnsense/core/pull/8046
DeltaFile
+8-5src/opnsense/mvc/app/controllers/OPNsense/Auth/Api/PrivController.php
+8-51 files

OPNSense/core 68bd3cfsrc/opnsense/mvc/app/library/OPNsense/Auth Base.php

System: Access: Groups - in preperation for https://github.com/opnsense/core/issues/7904, add support for comma separated member lists.

If we convert groups to a model, we will switch the nested <member> tags into comma separated fields, e.g.

        <member>1</member>
        <member>12</member>

will convert to:

        <member>1,12</member>

using this commit we support both for areas where these are being read.
DeltaFile
+7-11src/opnsense/mvc/app/library/OPNsense/Auth/Base.php
+7-111 files

OPNSense/core 56b4e8fsrc/opnsense/mvc/app/models/OPNsense/Core/ACL ACL.xml

System: Access: migrate Users and Groups to MVC/API (https://github.com/opnsense/core/pull/8046), review comments
DeltaFile
+4-4src/opnsense/mvc/app/models/OPNsense/Core/ACL/ACL.xml
+4-41 files

OPNSense/core a33837bsrc/opnsense/service/conf/actions.d actions_auth.conf

Update src/opnsense/service/conf/actions.d/actions_auth.conf
DeltaFile
+1-0src/opnsense/service/conf/actions.d/actions_auth.conf
+1-01 files

OPNSense/core 9f409dasrc/opnsense/mvc/app/controllers/OPNsense/Auth/Api UserController.php

System: Access: Users - hook group model for https://github.com/opnsense/core/issues/7904
DeltaFile
+17-23src/opnsense/mvc/app/controllers/OPNsense/Auth/Api/UserController.php
+17-231 files

OPNSense/core eeb434fsrc/opnsense/mvc/app/controllers/OPNsense/Auth/forms dialogGroup.xml, src/opnsense/mvc/app/views/OPNsense/Auth user.volt priv.volt

System: Access: Users - refactor to MVC (https://github.com/opnsense/core/issues/7904)

review comments from @Monviech

* "Create and Download API Key for this user" refresh apikeys bootgrid
* "Users" bootgrid, add some columns
* rename "Username" to "Group Name" in group edit
* Disable sorting the bootgrid by "Users" and "Groups" as these are aggregated/formatted columns
DeltaFile
+4-1src/opnsense/mvc/app/views/OPNsense/Auth/user.volt
+2-2src/opnsense/mvc/app/views/OPNsense/Auth/priv.volt
+1-1src/opnsense/mvc/app/controllers/OPNsense/Auth/forms/dialogGroup.xml
+7-43 files

OPNSense/core a55284fsrc/opnsense/mvc/app/models/OPNsense/Core/ACL ACL.xml

System: Access: migrate Users and Groups to MVC/API (https://github.com/opnsense/core/pull/8046)

replace page-system-groupmanager-addprivs with page-system-usermanager-addprivs
DeltaFile
+2-2src/opnsense/mvc/app/models/OPNsense/Core/ACL/ACL.xml
+2-21 files

OPNSense/core 979fa8asrc/opnsense/mvc/app/controllers/OPNsense/Auth/Api UserController.php, src/opnsense/mvc/app/models/OPNsense/Auth User.php

System: Access: migrate Users and Groups to MVC/API (https://github.com/opnsense/core/pull/8046)

refactor add user event so it utilizes our new model instead of direct config access, while performing the operation, also make sure we lock/unlock the config.xml
DeltaFile
+30-27src/opnsense/scripts/auth/add_user.php
+32-0src/opnsense/mvc/app/models/OPNsense/Auth/User.php
+1-23src/opnsense/mvc/app/controllers/OPNsense/Auth/Api/UserController.php
+63-503 files

OPNSense/core 3dfbc4fsrc/opnsense/mvc/app/controllers/OPNsense/Auth/Api UserController.php GroupController.php

System: Access: Users - add some safety fences to prevent accidental removal of rights https://github.com/opnsense/core/issues/7904
DeltaFile
+18-2src/opnsense/mvc/app/controllers/OPNsense/Auth/Api/UserController.php
+11-0src/opnsense/mvc/app/controllers/OPNsense/Auth/Api/GroupController.php
+29-22 files