17615 Commits

Author SHA1 Message Date
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
Franco Fichtner
f4b9017cd9 unbound: make this workaround permanent
This bundle file is here for general consumption and the time it
has already taken to debug this issue is not justifiable for
pursuing the matter any further.  Other approaches regarding
chroot and directory sharing are likely going to be much more
code which would make another solution more fragile as well.

While here remove a strange directory in the chroot that is not
even used.
2024-12-04 14:44:58 +01:00
Franco Fichtner
dbeed6fb7e firmware: extend this a little to run latest vs. current test
PR: https://forum.opnsense.org/index.php?topic=44438.0
2024-12-04 09:24:56 +01:00
Ad Schellevis
d55e2c55ef ui: official OPNsense dark theme, minor spacing changes (top heading / login) 2024-12-04 08:57:28 +01:00
Ad Schellevis
f271c6a3fc system: fix TOTP regression when used with LDAP, although https://github.com/opnsense/core/commit/ae97263e was the right fix, it assumes other children also implement _authenticate() 2024-12-03 21:45:29 +01:00
Franco Fichtner
419491f4c5 src: style sweep 2024-12-03 20:42:25 +01:00
Ad Schellevis
607e32a55e ui: add official OPNsense dark theme 2024-12-03 16:53:35 +01:00
Franco Fichtner
cdb8da7266 unbound: erm, point to a bundle as it will not handle /etc/ssl/certs ?
PR: https://forum.opnsense.org/index.php?topic=44414.0
2024-12-03 15:39:35 +01:00
Franco Fichtner
f06d347ae2 firmware: change this for symmetry 2024-12-03 08:39:12 +01:00
Ad Schellevis
d6c4eb255c themes/opnsense - login form button alignment and border color 2024-12-02 17:23:55 +01:00
Ad Schellevis
c7b0039233 themes/opnsense - add fa-solid when fa is used to support both. 2024-12-02 17:00:50 +01:00
Ad Schellevis
8a32434b4e ui: use fontawesome icons in bootgrid (https://github.com/opnsense/core/issues/8101) 2024-12-02 16:56:15 +01:00
Ad Schellevis
622e03ffc0 themes/opnsense - update default brand style (login form) 2024-12-02 16:16:58 +01:00
Ad Schellevis
c49a6f192a Firewall: Log Files: Live View - fix "new" template icon and replace with fa while there. 2024-12-02 15:10:41 +01:00
Franco Fichtner
1dcec96bcb mvc: fix hint display for "0"
This also displays empty hint "" but given the fact the
user supplied it we're not going to argue about it.
2024-12-02 15:08:30 +01:00
Franco Fichtner
cc97dd579c firwall: move icon, it's not as bad anymore 2024-12-02 12:08:16 +01:00
Franco Fichtner
fdac52231b mvc: style change 2024-12-02 11:57:12 +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
6229c964cd System: Access: Privileges - add a safety fence to prevent accidental lockout, closes https://github.com/opnsense/core/issues/8094 2024-12-02 10:39:08 +01:00
Ad Schellevis
b26bbd34dd Mvc/Router - normalize multiple leading slashes in paths, closes https://github.com/opnsense/core/issues/7709 2024-12-02 10:32:07 +01:00
Ad Schellevis
01fc795f34 themes/opnsense - update default brand style 2024-12-01 20:11:30 +01:00
Franco Fichtner
4208db6d5f firmware: make it a bit safer still 2024-11-30 11:34:56 +01:00
Franco Fichtner
e4d452b37b firmware: make output_cmd safter regarding arguments passed
As a side effect it removes the spurious quoting around most
static arguemnts that do not need to be vetted for safety
anyway (but still are if a mistake is made).

Some arguments are passed unquoted for one of the two reasons:

1. It's a global variable pointing to a binary or directory most
   likely, especially for first argument which is the command.
2. It's an argument that is set in the script, but may be empty
   when the command runs, i.e. '-f' option.
2024-11-29 14:54:13 +01:00
Franco Fichtner
ad663adec4 firmware: to parse arguments in oupput_(cmd|text) use -o for additional output 2024-11-29 14:03:55 +01:00
Ad Schellevis
c7aacf6b13 System/Tunables - use actual defaults when reverting. 2024-11-29 11:37:58 +01:00
Franco Fichtner
89c190cea2 src: style sweep 2024-11-29 10:04:29 +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
d314680276 system: ignore coretemp(4) tjmax
pchtherm(4) is weird in naming but do not do anything
with it yet:

dev.pchtherm.0.ctt
dev.pchtherm.0.pmtemp
dev.pchtherm.0.t0temp
dev.pchtherm.0.t1temp
dev.pchtherm.0.t2temp
dev.pchtherm.0.temperature <-- seems to be the only real temperature

sysctl(8) can only filter write-vars so we may have to go back to
doing a whole lot of computation work just to get a useful reading
without all the "configuration" variables.

PR: https://forum.opnsense.org/index.php?topic=36234.0
2024-11-28 13:50:50 +01:00
Ad Schellevis
0ebd95476a Mvc/Router - normalize multiple slashes in paths, closes https://github.com/opnsense/core/issues/7709 2024-11-27 20:52:03 +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
Ad Schellevis
a6337fff16 System: Configuration: Defaults - report actual lan address being used after factory reset. 2024-11-27 12:07:08 +01:00
Ad Schellevis
c67aad5def ACL - add missing ACL's and change menu entry to match ACL
o /ui/syslog/ --> /ui/syslog in menu registration
o /ui/interfaces/neighbor missing an ACL
o /ui/diagnostics/dns_diagnostics missing an ACL
2024-11-27 10:53:25 +01:00
Ad Schellevis
e179609493 Lobby/Dashboard - prevent crashing out when widget title wasn't set. 2024-11-26 14:29:36 +01:00
Ad Schellevis
51d51b7677 themes/OPNsense - restore right border, closes https://github.com/opnsense/core/issues/8088 2024-11-26 11:49:23 +01:00
Franco Fichtner
669a602e3f interfaces: inline creation is no more #7446 2024-11-25 13:43:22 +01:00
Franco Fichtner
9c0b50aa63 system: kill this comment annotating code that does not reall exist anymore 2024-11-25 13:38:52 +01:00
Franco Fichtner
0f5c35940d firewall: remove faulty exclusion
'if' is a device name and can never match.  Possibly defunct since
2008 when 'ip' was used but 'ipaddr' would have been the right key.

The code is long gone on the other end too.

See: https://github.com/pfsense/pfsense/commit/ce24005a17
Also see: https://github.com/pfsense/pfsense/commit/40aa6f207
2024-11-25 13:33:51 +01:00
Franco Fichtner
feba5f9153 interfaces: rearrange menu files to be a bit more aligned
Define the entry in the core, use it in interfaces, define
diagnostics there and move diagnostics where  they belong.

Ordering for explicit interfaces or groupings is a bit harder
than it should be... ideally we would want to move all "["
entries to the front and just let the other entries order itself
but that would require more hacking than just setting order
property on all the child entries in the XML.
2024-11-25 11:35:33 +01:00
Franco Fichtner
a0b86b43e2 interfaces: remove PPP edit in interfaces settings #7446
Time to ditch this.  Leave a thin dialog for the ports display
and where to access the actual PPP settings.

page-getserviceproviders now folds into page-interfaces-ppps-edit
and remove only once use functions to edit page as well.
2024-11-25 11:11:11 +01:00
Franco Fichtner
2fbc726cb7 interfaces: also this #7880 2024-11-25 10:21:32 +01:00
Franco Fichtner
bdd5d8fa98 interfaces: make this nicer actually #7880
We have been trying to estabish "devices" as the thing that is underneath
an interface, because we cannot call that "interface" as well.  "Types"
makes sense but between "Other Types", "Types", "Device Types" and "Devices"
the latter is probably the most definitive one.
2024-11-25 10:13:21 +01:00
Franco Fichtner
4ec19f2a99 interfaces: one small OP for #7880 2024-11-25 10:06:44 +01:00
Franco Fichtner
9f58960cc7 mvc: reduce diff against stable 2024-11-25 08:19:16 +01:00
Franco Fichtner
7d18b8aa88 system: drop stale link reference
Cross-links are nice in theory but in practice these are rarely used
and prone to bitrot like seen here.
2024-11-25 08:05:13 +01:00
Ad Schellevis
cb6ec88a16 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 864bf77420, which might be an issue that doesn't actually exist anymore..
2024-11-22 08:50:09 +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
Franco Fichtner
72018838d0 src: style sweep 2024-11-21 09:21:29 +01:00
Franco Fichtner
6603fb72ed firmware: hide PIPEFILE, LOCKFILE; some minor tweaks 2024-11-21 09:13:28 +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