792 Commits

Author SHA1 Message Date
Franco Fichtner
a08b79edbc firmware: switch to 25.7 development mode 2025-01-29 07:41:40 +01:00
Stephan de Wit
f37256980e system: fix plist 2025-01-23 14:57:27 +01:00
Ad Schellevis
18fc1f0797 Services: Monit - flag overwrites when they exist (https://docs.opnsense.org/manual/monit.html#advanced-configurations) 2025-01-23 14:43:26 +01:00
Ad Schellevis
e43bca743b Services: Unbound DNS - flag overwrites when they exists (https://docs.opnsense.org/manual/unbound.html#advanced-configurations) 2025-01-23 13:38:52 +01:00
Stephan de Wit
43e6bdb205 system: upgrade ChartJS to v4
A couple of notes:

- the streaming plugin is not officially supported with ChartJS v4. Instead, a fork
has been used (https://socket.dev/npm/package/@robloche/chartjs-plugin-streaming/overview/3.1.0).
This fork required a oneline-fix which has as of yet not been applied to the
minified or regular .js file, only to the .esm.js file
(see https://socket.dev/npm/package/@robloche/chartjs-plugin-streaming/diff/3.1.0).
- Only the .umd.js version of ChartJSv4 seems to work out of the box.
- The colorschemes plugin is also a fork (https://github.com/MaximBelov/chartjs-plugin-colorschemes)
- adapter-moment works out of the box.
- This commit has not been thoroughly tested across all usages of ChartJS in the UI.
- The responsive resizing nature of canvas elements using ChartJS don't seem to work
anymore when expanding a widget.
2025-01-22 14:40:43 +01:00
Ad Schellevis
5d596601d4 VPN: IPsec - add banner message when using custom configuration files. closes https://github.com/opnsense/core/issues/8093 2025-01-22 12:00:51 +01:00
Stephan de Wit
fd39bafe72 system: adjust for overrides banner
Introduces the isBanner property, which explicitly defines the message
as a banner, which doesn't necessarily have a relation to
the persistent property. While here, update the UI to remove
cursor events when the message doesn't have a location set.
2025-01-16 15:11:23 +01:00
Franco Fichtner
7235dd5e43 pkg: fix plist 2025-01-14 16:35:01 +01:00
Sebastian Pucilowski
e8f6a825b7 src: fix IKEAdressField -> IKEAddressField typo 2025-01-13 13:53:25 +01:00
Stephan de Wit
9e660d360b system: add disk space status check
above 95% usage triggers a persistent banner.

while here, fix a small issue that excluded persistent notification
types from counting towards the icon color used.
2025-01-13 10:38:21 +01:00
Franco Fichtner
27517b950f src: sweep 2025-01-07 17:27:14 +01:00
Ad Schellevis
071925da51 System: Settings: Tunables - refactor to MVC, closes https://github.com/opnsense/core/issues/7249 2025-01-04 12:42:10 +01:00
Ad Schellevis
af2730dd36 System: Settings: Tunables - refactor to MVC for https://github.com/opnsense/core/issues/7249 (work in progress) 2025-01-01 20:14:07 +01:00
Ad Schellevis
23e20aab3c Firewall: Automation: Filter - add TOS/DSCP for https://github.com/opnsense/core/issues/8143 2025-01-01 14:48:11 +01:00
Ad Schellevis
c49af7824a Firewall: Automation: Filter - add schedules for https://github.com/opnsense/core/issues/8143 2025-01-01 14:38:33 +01:00
Ad Schellevis
96a1145c3e System: Access: Users - add "system list shells" and hook to shell field, closes https://github.com/opnsense/core/issues/8155 2024-12-22 14:37:42 +01:00
Franco Fichtner
44f5964921 src: style sweep 2024-12-19 12:13:40 +01:00
Ad Schellevis
6a7352e528 authentication - remove expireaccounts script which has been disfunctional for some time, accounting for expirey is the responsibility of the authenticator.
ref: 252fd04811/src/opnsense/mvc/app/library/OPNsense/Auth/Local.php (L161-L162)
2024-12-19 10:09:26 +01:00
Franco Fichtner
3681807e24 plist: fix 2024-12-17 13:00:08 +01:00
Ad Schellevis
e7e91fca52 plist 2024-12-16 20:58:35 +01:00
Franco Fichtner
ef8ed9cc26 src: style sweep 2024-12-16 08:57:50 +01:00
Ad Schellevis
e190e9c138 System: High Availability: Status - backend code for https://github.com/opnsense/core/issues/7899
This commit wraps our xmlrpc functions via configd and wires them via an api controller.
In the long run we should consider moving to RESTful interfaces, but for now we will keep and cleanup the xmlrpc code.

configd action "system ha services_cached" caches the service list for a couple of seconds to improve searchability via our standard grid functions.
2024-12-15 20:09:09 +01:00
Stephan de Wit
6f5bd00252 src: fix plist 2024-12-12 11:22:07 +01:00
Ad Schellevis
70e7695b3d model:BaseListField - memory preservation fix, closes https://github.com/opnsense/core/issues/8123
remove overhead in BaseListField by passing references to the data with a CallbackValidator.
2024-12-11 22:22:40 +01:00
Franco Fichtner
7082c18d02 src: style and plist 2024-12-10 08:38:43 +01:00
Ad Schellevis
8b85c0fbda ui: official OPNsense dark theme, fix some hover and contrast issues 2024-12-09 16:56:18 +01:00
Monviech
397a3dcdce
dashboard: Add certificate widget that displays CAs and Certs sorted by expiration date (#8105)
* dashboard: Add certificate widget that displays CAs and Certs sorted by expiration date

* dashboard: Certificate widget, fix certificate hiding configuration, refresh immediately on config change, increase tick timeout

* dashboard: Certificate widget, different text for expired certificates

* dashboard: Certificate widget, create links that fill the search-field of the bootgrid to display the certificate directly

* dashboard: Certificate widget, search for uuid in bootgrid and call corresponding form
2024-12-05 11:31:39 +01:00
Ad Schellevis
607e32a55e ui: add official OPNsense dark theme 2024-12-03 16:53:35 +01:00
Ad Schellevis
9d6e6e5c7c ui: upgrade fontawesome icons to version 6, closes https://github.com/opnsense/core/issues/8101
to ease maintenance, move all files into assets/fontawesome and swap css includes to new location.
2024-12-02 11:40:25 +01:00
Ad Schellevis
e1894435a3 ui:theme - first batch of theme source cleanups.
ease maintenance in the future by cleanup up our stylesheets, most of our styes are already a decade old and might need some love for future improvements.
This commit removes some of the unused styles and moves color defines in main.scss to its own file, also a dashboard scss file is added to use the same colorscheme.
2024-11-28 22:33:04 +01:00
Franco Fichtner
eded37411f system: switch to temperature sensor caching #7730
The hardest part is figuring out the best metric to collect
sensor points.  Luckily "IK" type sysctl values are temperature
readings so we use those with a day of caching in configd to
find the values for the dashboard without skimming all sysctl
output all the time.

Remove supoptimal backend call since no longer used.  The script
temperature.sh is also unused now.  Good-bye.
2024-11-27 18:20:43 +01:00
Franco Fichtner
d4378f00b3 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.
2024-11-22 08:12:08 +01:00
Franco Fichtner
f8e8969a96 firmware: add minimal tests set implementation 2024-11-21 10:47:52 +01:00
Ad Schellevis
78cf96c579
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
* 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
* add addApiKeyAction() to create a new api key for a user (by name)
* download new api key from user view
* implement hashing when setting a new (or scrabled) password
* use new "auth sync user" event to trigger local user db changes
* in API authenticator keep createKey and dropKey as stubs to the new model implementation
* prevent removal of "system" users (root)
* hook ACL and Menu
* add Group administration using the same logic as users
* cleanup unused
* add System: Access: Privileges to manage and change user and group privileges

* 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

* System: Access: Privileges - fix updating groups dropping privileges for https://github.com/opnsense/core/pull/8046

* System: Access: Users - hook group model for https://github.com/opnsense/core/issues/7904

* System: Access: Users - add some safety fences to prevent accidental removal of rights https://github.com/opnsense/core/issues/7904

* Update src/opnsense/service/conf/actions.d/actions_auth.conf

* Update src/opnsense/service/conf/actions.d/actions_auth.conf

* System: Access: Users - remove userDNmap support as it belonged to the import https://github.com/opnsense/core/issues/7904

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

* 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)

* 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

* 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

* plist

---------

Co-authored-by: Franco Fichtner <franco@opnsense.org>
2024-11-21 08:50:01 +01:00
Ad Schellevis
89ef336bd9 Trust: flush openssl.cnf to /etc/ssl/openssl.cnf as well (redux) 2024-11-14 11:45:33 +01:00
Franco Fichtner
8a1965e094 firmware: move bogons fetch to firmware scripts
Be done with the retry and use the launcher.sh -r argument for
the cron-based execution.  Leave the backend commands where they
are.

Since the file had no copyright header looking at the old code
it looks like Bill and Scott worked on the file first in 2005.
Not really concerned with consecutive history here for lack of
creating a copyright header for so long.
2024-11-14 10:36:17 +01:00
Franco Fichtner
70a59f8ad3 firmware: protect details.sh, reboot.sh and query.sh 2024-11-13 11:00:11 +01:00
Franco Fichtner
536166095c test: move opnsense-atf to debug plugin 2024-11-13 08:12:01 +01:00
Franco Fichtner
2ff993ea57 test: improve opnsense-atf to run more pf tests
This needs more restructuring in a plugin perhaps or being
added to os-debug.  Sounds like a useful next step.  :)
2024-11-12 17:03:33 +01:00
Ad Schellevis
7561f69e47 firmware: add wrapper class for python to support using platform TLS settings (as far as possible).
Unfortunately python requests/urllib3/ssl ignores platform openssl defaults, but do choose defaults which do not always match expectations.
Below per configuration item (system_default_sect) the current situation:

* CipherString --> supported, using ciphers list
* Ciphersuites --> not supported, but does seem to follow configuration defaults. When python adds support, we likely have to change something.
* SignatureAlgorithms --> not supported, but seem as above
* Groups (Curves) --> partly supported, only one may be offered, we select the first item in the list, knowing that is a bit flaky (see: set_ecdh_curve())
* MinProtocol --> supported
2024-10-29 17:56:33 +01:00
Franco Fichtner
387e75b4a5 src: style sweep and plist 2024-10-22 12:08:26 +02:00
Monviech
3a7cd41868
vpn: ipsec: Add swanctl.conf download button to settings.volt view (#7972)
* vpn: ipsec: Add swanctl.conf download button to settings.volt view. Bootstrap dialogue warns user about sensitive file contents. Error scenarios like missing file or API errors are handled gracefully with error messages.

* Update src/opnsense/mvc/app/views/OPNsense/IPsec/settings.volt

Co-authored-by: Franco Fichtner <franco@lastsummer.de>

* vpn: ipsec: make plist-fix

---------

Co-authored-by: Franco Fichtner <franco@lastsummer.de>
2024-10-21 14:55:41 +02:00
Ad Schellevis
04bc491cb7 plist 2024-10-13 16:01:18 +02:00
Franco Fichtner
052fff2e68 pkg: fix plist 2024-10-13 14:25:53 +02:00
Franco Fichtner
c42def9fa3 firmware: clean up code duplication using config.sh
Also provide an env_init() call for internal launcher commands
to set up relevant things.We do this to move the special libfetch
handling into the locked spot underneath the launcher.sh invoke.
2024-10-10 09:19:42 +02:00
Franco Fichtner
d3a655f76b firmware: add CRL validation for business mirror 2024-10-08 14:39:04 +02:00
Ad Schellevis
6f79579537 System: Trust: Authorities - (work in progress) crl fetch script for installed certificates.
The overal structure is there, but needs the final bits and pieces added to it. committing it now as a backup
2024-09-24 18:38:53 +02:00
Franco Fichtner
7b8c4dbeb0 interfaces: move PPP/wireless to system log #7880
Unfortunately multiple wireless pages exist so no consolidation for now.
2024-09-22 16:30:08 +01: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
76f84fdf67 src: style and stuff 2024-09-10 21:43:38 +02:00