149 Commits

Author SHA1 Message Date
Ad Schellevis
2c21525810 System: Access: Users - prefix api key filename with fqdn of this host, eases administration when needing to create a lot of keys. 2023-05-03 18:06:43 +02:00
Ad Schellevis
9448b0cacc IPSec: move user PSK and legacy PSK items to new PSK mvc module. closes https://github.com/opnsense/core/issues/4614
There is some overlap in https://github.com/opnsense/core/issues/5636 as this cleans-up ipsec.conf further.
2022-10-02 19:49:21 +02:00
Josh Soref
20a3c3da38
Spelling (#5885) 2022-07-18 13:59:03 +02:00
oittaa
5fd93bde41
Use random_bytes() from PHP 7.0+ and simplify the voucher generation (#5659)
* Use random_bytes() from PHP 7.0+
* Simplify voucher generation
2022-03-30 09:44:01 +02:00
NOYB
14f3cb5214
Prevent Browser Auto Fill Username/Password (#5311) 2021-11-22 09:03:18 +01:00
Ad Schellevis
e8079f0fcf usermanager - missing ldap import button (regression in 18ad4dbbd3) cc @fichtner 2021-07-16 14:00:44 +02:00
Franco Fichtner
18ad4dbbd3 system: remove $main_buttons use #4216 2021-06-15 07:52:13 +02:00
Franco Fichtner
57b3cff9d4 src: more cleanups on static pages 2021-06-07 10:45:21 +02:00
Ad Schellevis
cfb84fe8e9 Add audit log target and move related syslog messages (https://github.com/opnsense/core/issues/4925)
o add new "audit" log target
o move user auth log entries into the new scope
o send config changes to audit log including message if provided
o add messages in user and group administration
2021-04-19 18:04:35 +02:00
Ad Schellevis
73ffa7b1ab Usermanager: export api keys reload issue on Safari. closes https://github.com/opnsense/core/issues/4706
This probably doesn't win a beauty contest, but it seems like reloading the page instantly causes issues on Safari these days.
2021-02-15 18:40:30 +01:00
Franco Fichtner
cf609e2e6a src: small style update 2021-01-05 09:12:02 +01:00
Ad Schellevis
9731dc8fa7 system - usermanager: signal "auth user changed" when a user is modified via the webui. This should be rather harmless (the event was added in ecfd53ac2f)
Eventually some of the functionality in user/group management maybe moved to this hook, but to ensure a fast path to production, we'll keep duplicate work for now.

for https://github.com/opnsense/core/issues/4411
2020-10-13 12:58:30 +02:00
Ad Schellevis
9f3f4d7336 user manager: add valid from and to dates to user certs, remember last ca to create a new internal cert.
small improvement when trying to create a new cert for a user, you need to delete the old cert, which is difficult to distinct because both have the same name (validity helps) and the new cert very often needs to use the same ca, set this one as default when requesting a new one.
2020-02-11 17:06:57 +01:00
Ad Schellevis
6cb988ea06 system_usermanager / authorizedkeys: input with for https://github.com/opnsense/core/issues/3905 (+ height to 10 after click) 2020-02-03 09:21:03 +01:00
Franco Fichtner
a3cd0ae4c1 system: remove unused parameter; closes #3847 2019-12-16 19:18:30 +01:00
Franco Fichtner
ca5140cbf7 system: use userIsAdmin() even if we have to resolve again 2019-05-09 12:13:46 +02:00
Indrajit Raychaudhuri
6f76b5f4df Auth/LDAP: More reliable load and syncup for LDAP attributes (#3333) 2019-03-15 16:00:38 +01:00
Ad Schellevis
883063c49c get_std_save_message() with hasync enabled mangles some redirected save messages, although we do want to ditch the function at some point, we probably better fix the issue introduced with https://github.com/opnsense/core/issues/3165 first. 2019-03-14 20:13:15 +01:00
Ad Schellevis
e17dc86235 User import, fix ldap import closes https://github.com/opnsense/core/issues/3012 2018-12-04 16:06:49 +01:00
Michael Steenbeek
6db6598c00 Fix more incorrect HTML tags (#3007) 2018-12-04 10:13:22 +01:00
Michael Steenbeek
71774ab376 Fix implicit Javascript global variable assignments (#2945) 2018-12-03 13:17:02 +01:00
Michael Steenbeek
98247373d0 Remove nonexistant CSS properties
The table attributes 'cellspacing' and 'cellpadding' were moved inside the style attribute via a script. However, they are not valid CSS properties, so browsers should (and do) ignore them.
This commit removes them. The 'table' class, set on most tables, should take care of proper formatting anyway.
2018-12-03 12:01:41 +01:00
Franco Fichtner
09f3f3c933 system: prevent several creative ways to strip read-only privileges 2018-11-07 09:41:20 +01:00
Franco Fichtner
266ff43db5 system: retain index for link #2870
Spotted by: @adschellevis
2018-11-05 21:31:26 +01:00
Franco Fichtner
aa859b5061 system: small issues with previous 2018-11-03 15:08:08 +01:00
Franco Fichtner
a7a6f392a0 system: ldap-totp can import most likely 2018-11-03 15:05:22 +01:00
Franco Fichtner
436b0a7f02 system: sort user/group list, small tweaks; closes #2870 2018-11-03 14:59:37 +01:00
Franco Fichtner
27b3ba0441 src: additional cache_safe() usage 2018-09-16 11:36:29 +02:00
Franco Fichtner
2eae0a496b system: tweak previous to make code clearer 2018-08-14 17:45:21 +02:00
Franco Fichtner
eccc786ef1 system: fix policy check on empty password save 2018-08-14 13:03:48 +00:00
Franco Fichtner
8e28b78c65 system: better authserver parsing for #2578 2018-07-26 14:53:47 +00:00
Franco Fichtner
fef90667ca system: authentication page consolidation for #2440 2018-06-03 19:04:36 +00:00
Franco Fichtner
cd7ebecdd3 system: restyle users and groups 2018-06-03 16:43:06 +00:00
Franco Fichtner
333b505094 system: admin priv colouring adjustments
Use "page-all" for showing admin capabilities as user / group
icon in red.  This allows to spot non-root users with full admin
capabilities and also which groups yield this power.  The scope
should only be used for read-only access / deletetion prevention.
2018-06-03 16:14:09 +00:00
Franco Fichtner
0181d1ddd9 system: userid 0 has trouble with %s, loosely refs #2246 2018-06-02 11:24:57 +00:00
Ad Schellevis
62ed6633e4 legacy, configurable landing page and cleanups, for https://github.com/opnsense/core/issues/2385
With getAllowedPages() out of the way, we can ditch some more overlapping logic now.
2018-05-04 18:36:13 +02:00
Franco Fichtner
ae119d5251 system: show root as disabled, too #2323 2018-04-03 10:10:58 +02:00
NOYB
9d96bdcbc7 Help For - Data For Attribute
Use original element (<div>/<small>) with "data-for" attribute.

The old jquery "for" attribute selectors can be removed once conversion to "data-for" attribute is complete (including plugins).

The old jquery selectors to remove once conversion is complete.
  opnsense_ui.js & head.inc
  $("*[for='" + $(this).attr('id') + "']")....
  $('[for*="help_for"]')....
2018-03-17 16:12:55 +01:00
Ad Schellevis
dc74006c9a implement password policies for local accounts. for https://github.com/opnsense/core/issues/2252
This change consists of two components:

1) enforcing the user to change his or her password every x days, when pwd_changed_at is not set or longer ago then specified only access to the password page is prohibited
2) enforce minimal length or complexity settings depending on selected choices
2018-03-11 18:24:23 +01:00
Franco Fichtner
49a2bc6584 system: a bit more magic to keep things from breaking; closes #2154 2018-02-05 06:50:17 +00:00
Franco Fichtner
c8bdf3e92f system: allow shell selection for user, prepped a long time ago #2154 2018-02-04 19:24:47 +00:00
Franco Fichtner
2fc86a72bf openssh: do not allow sftp login for non-admins
Also suggested by @fabianfrz.  Not perfect yet as we seem
to mix wheel with access and either need to lock down shell
access along with it or somehow tag along the shell privilege.

Small race in the group setting on the user page.

PR: https://forum.opnsense.org/index.php?topic=6994.0
2018-01-27 13:41:59 +00:00
NOYB
6ef9a127ff HTML Compliance - Attribute "type" on Element <script>
Warning: The type attribute is unnecessary for JavaScript resources.

HTML5: Edition for Web Authors
http://www.w3.org/TR/2014/REC-html5-20141028/scripting-1.html
The default, which is used if the attribute is absent, is "text/javascript".

The Script element
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type.
2018-01-22 19:13:34 +01:00
NOYB
4a7bcae7af HTML Compliance - Attribute "for" on Element <div>
Error: Attribute "for" not allowed on element "div" at this point.
Attributes for element "div": http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-div-element

HTML attribute reference: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
The "Output" element: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output

Attributes for element "output": http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-output-element
2018-01-06 10:52:17 +01:00
NOYB
b2f4cfa7c1 HTML Compliance - Attribute "type" on Element <i>
Error: Attribute "type" not allowed on element <i> at this point.
2018-01-05 08:36:26 +01:00
NOYB
76aab5cb52 HTML Compliance - Obsolete table attributes
width, align, valign, cellpadding, cellspacing, border, summary

Error: The width attribute on the table element is obsolete. Use CSS instead.
Error: The align attribute on the table element is obsolete. Use CSS instead.
Error: The valign attribute on the table element is obsolete. Use CSS instead.
Error: The cellpadding attribute on the table element is obsolete. Use CSS instead.
Error: The cellspacing attribute on the table element is obsolete. Use CSS instead.
Error: The border attribute on the table element is obsolete. Use CSS instead.
Error: The summary attribute on the table element is obsolete. Consider describing the structure of the table in a caption element or in a figure element containing the table; or, simplify the structure of the table so that no description is needed.
2018-01-04 18:26:02 +01:00
Franco Fichtner
3ae9866ea7 src: consistent use of readonly as xhtml 2018-01-02 14:47:46 +01:00
Franco Fichtner
ebb191d106 system: ugly regression in save_close :D #2000 2017-12-17 19:56:16 +00:00
Franco Fichtner
d33b998e1e system: id != value, tweak label #2000 2017-12-17 20:45:26 +01:00
Ad Schellevis
2d76299e68 add save & close to user edit, closes https://github.com/opnsense/core/issues/2000 2017-12-17 19:15:40 +01:00