777 Commits

Author SHA1 Message Date
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
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
919fc15fe7 interfaces: rename this correctly, strictly part of pf(sync) 2024-09-01 10:54:46 +02:00
Franco Fichtner
178ef826f7 ipsec: fix off-by-section in ipsec migration
PR: https://forum.opnsense.org/index.php?topic=42407.0
2024-08-26 19:56:10 +02:00
Franco Fichtner
65a8435df8 system: migrate system booting banner to notifications
Refactor leftovers while here.
2024-08-22 12:07:24 +02:00
Franco Fichtner
3067d4e975 system: migrate live mode banner to notification
More work needed but as discussed with @swhite2 we want this here
before we work on the UX part.  These types of notifications need
more screen presence and are non-dismissable.

While here kill an oddity assignment with constant() use.

And adjust comments still refering to "LiveCD" since we have a DVD
image nowadays and the live mode works on all install media.
2024-08-22 11:11:54 +02:00
Franco Fichtner
e103a1f77f pkg: fix plist 2024-08-15 07:39:56 +02:00
Franco Fichtner
c3af228910 src: style et al 2024-08-13 20:21:36 +02:00
Franco Fichtner
58bfdecefa interfaces: backwards compat move of PPP IPv6 to linkup #7446 2024-08-08 23:10:13 +02:00
Franco Fichtner
039ae3c198 firmware: cleanup prior to upgrade
squid package errors may manifest during major upgrade as well making
it necessary to run the cleanup in advance and not in background mode.

It would be nicer to avoid code duplication, but that can happen the
next time something needs to be adjusted in the actual cleanup routine.
2024-08-06 14:55:50 +02:00
Ad Schellevis
7a7e81c777 VPN: IPsec: Advanced Settings - mvc conversion, for https://github.com/opnsense/core/issues/7648
move legacy settings to mvc including conversion, also expose some of our staticly configured strongswan.conf settings into the form for clarity.
2024-07-28 20:22:16 +02:00
Franco Fichtner
c95f42b84d firmware: remove upgrade hint and revoke old fingerprints 2024-07-25 19:39:12 +02:00
Ad Schellevis
c7444334a7 plist 2024-07-22 11:30:02 +02:00
Franco Fichtner
7c6e958897 firmware: do not need this file anymore 2024-07-16 13:57:10 +02:00
Stephan de Wit
21184535c7 firmware: fix plist 2024-07-12 11:40:04 +02:00