Commit Graph

44 Commits

Author SHA1 Message Date
Tony Murray
32a7c50189 Use Laravel authentication (#8702)
* Use Laravel for authentication
Support legacy auth methods
Always create DB entry for users (segregate by auth method)

Port api auth to Laravel

restrict poller errors to devices the user has access to

Run checks on every page load.  But set a 5 minute (configurable) timer.
Only run some checks if the user is an admin

Move toastr down a few pixels so it isn't as annoying.

Fix menu not loaded on laravel pages when twofactor is enabled for the system, but disabled for the user.
Add two missing menu entries in the laravel menu

Rewrite 2FA code
Simplify some and verify code before applying

Get http-auth working
Handle legacy $_SESSION differently.  Allows Auth::once(), etc to work.

* Fix tests and mysqli extension check

* remove duplicate Toastr messages

* Fix new items

* Rename 266.sql to 267.sql
2018-09-11 07:51:35 -05:00
Tony Murray
4d9924242f Database schema cleanup (#9064)
* target db_schema

* Database schema cleanup
Remove several inconsistencies (mostly with data types and lengths)
Make things a bit nicer to implement with Laravel database migrations.
poller* tables had f'd up indexes

* Update tests, extra noise because db returns numeric types now.

* Update test data again.

* fix 253 migration for mysql 5.3
2018-09-05 07:34:50 -05:00
Richard Mayhew
abd2c6363f Fixed the display of hostnames within the edit device permissions if a SysName is used instead (#8986) 2018-08-06 09:37:36 -05:00
Tony Murray
7250376104 refactor: Don't access $_SESSION directly for Auth (#8513)
* Don't access $_SESSION directly for Auth

* fix style

* add property annotations
2018-04-07 21:55:28 +01:00
mcq8
c9728a1f71 refactor: Refactored authorizers to classes (#7497)
* Refactored authorizers to classes

* Merge changes for #7335

* ! fix php 5.3 incompatibility

* Update ADAuthorizationAuthorizer.php

* Fix get_user -> getUser

* Rename AuthorizerFactory to Auth, fix interface missing functions

* Add phpdocs to all interface methods and normalize the names a bit.

* Re-work auth_test.php AD bind tests to work properly with the new class.
Reflection is not the nicest tool, but I think it is appropriate here.
Handle exceptions more nicely in auth_test.php

* Restore AD getUseList fix

Not sure how it got removed

* fix auth_test.php style
2017-11-18 10:33:03 +00:00
Neil Lathwood
34c35f3627 webui: Updated remaining display options where we do not show sysName if hostname is IP (#6585)
* webui: Updated remaining display options where we do not show sysName if hostname is IP

* renamed function + simplified
2017-05-05 06:25:58 -05:00
Tony Murray
4b9f3f37d7 fix: move user preferences dashboard and twofactor out of users table (#6286)
* fix: move user preferences dashboard and twofactor out of users table
This allows them to work with any authentication method
Add set_user_pref() and get_user_pref() helper functions

* fix edit users for other users

* Fix updated_at default timestamp

* Update and rename 183.sql to 184.sql

* removed commented out debug
2017-04-01 22:18:00 +01:00
rockyluke
b5a8cb0f5b webui: Minors changes on Edit User page (#5717)
* Order user alphabetically (MySQL)

* Add (admin) or (demo) after login on Edit User page

* Fix missing $user_level

* Complete the switch/case on user level

* Remove redundant case

* Remove blank line
2017-02-01 20:05:50 +00:00
Richard Mayhew
6a1fd3ec05 webui: Additional Font Awesome icons (#5572) 2017-01-25 17:42:26 +00:00
Neil Lathwood
22b74ec363 webui: Update add/edit user page to use their instead of his #5457 (#5460) 2017-01-16 11:11:37 +00:00
Neil Lathwood
9b9c10e204 fix: Cleanup printing ifAlias (#4874) 2016-12-12 14:25:48 +00:00
jonathon-k
7d3cafddba refactor: edituser page to allow user selection of a default dashboard (#4551) 2016-10-11 07:27:20 +01:00
Tony Murray
8c639aa5a4 PSR2 Cleanup: /html edition
Travis tests for code conformance. Ignore warnings for now.
Fixed all errors, left most warnings.
2016-08-18 21:29:30 -05:00
Tony Murray
66bed276c2 Reconstruct addHost() so it is easier to understand
Update addHost() to return either device_id or a string
modify print_error(), print_message() to allow for $quiet variable
Only call addHost() once in addhost.php, if the snmp version isn't set, addHost will cope
Fix up snmp-scan.php and discovery-protocols.inc.php to detect when a device already exists
change in ip_exists() to make it more readable
2016-08-02 00:31:27 -05:00
Rosiak
bf175ef8a0 Fix 2685
Print the dash owner’s username when using sticky dash.
2016-01-06 23:41:58 +01:00
Daniel Preussker
a63ea78441 First Draft in Per-User default dashboards 2015-12-13 19:39:12 +00:00
Zollner Robert
b52b4935ee fix: setting user port permissions fails
Interface port permissions table (ports_perms) requires 'access_level' field to be NOT NULL
2015-10-25 20:50:57 +02:00
laf
fac3751938 Rebased 2015-07-15 20:52:43 +01:00
Job Snijders
d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
laf
0436e3c483 Added ability to update users passwords 2015-07-13 17:21:07 +01:00
laf
a404082d51 Updated some of the main pages to no longer refresh 2015-03-21 21:30:55 +00:00
Neil Lathwood
5bccef0fac Fixed bug meaning admin couldn't edit users 2015-02-17 13:12:29 +00:00
Neil Lathwood
c1bbbaca1b Locked down edit user page as well 2015-02-16 23:55:36 +00:00
Neil Lathwood
2cb5d727b4 Updated to support a demo user 2015-02-16 23:45:28 +00:00
f0o
d66cec7017 Added TwoFactor Authentication (RFC4226)
Tested against Google-Authenticator app on Android 4.4.4

Made `verify_hotp` more efficient.

Added autofocus on twofactor input

Added GUI Unlock and Remove for TwoFactor credentials in /edituser/

Allow additional tries after elapsed time from last try exceeds configured parameter `$config['twofactor_lock']`.
If `$config['twofactor_lock']` is not defined or is set to `0`, administrators have to unlock accounts that exceed 3 failures via GUI.

Added Documentation

Moved TwoFactor form to logon.inc.php
Disabled autocomplete on twofactor input field
Updated Docs to include link to Google-Authenticator's install-guides

Moved authentication logic from authenticate.inc.php to twofactor.lib.php

typo in docblock for `twofactor_auth()`

Fixed scrutinizer bugs

To please scrutinizer
2014-12-28 15:40:40 +00:00
Paul Gear
e9381f9501 Make add button display consistent on user edit screen 2014-08-27 20:09:29 +10:00
laf
8cf255072c Updated edit user screen so you can now update details 2014-03-10 23:50:16 +00:00
laf
fc7404a3c4 Updates bringing forms / tables inline with Bootstrap v3, also adds Global search box 2014-01-13 10:08:59 +00:00
Adam Amstrong
4db1454e92 move from port_id to interface_id. make ports discovery only discover. add some cleaner functions. add a tiny bit of alerting infrastructure.
git-svn-id: http://www.observium.org/svn/observer/trunk@3195 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-16 13:25:50 +00:00
Tom Laermans
a0a1939995 more title sets
git-svn-id: http://www.observium.org/svn/observer/trunk@2691 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-18 14:41:19 +00:00
Tom Laermans
2dc8b807e9 syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2642 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-04 09:10:21 +00:00
Adam Amstrong
00c8aeae5a fixes.
git-svn-id: http://www.observium.org/svn/observer/trunk@2548 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-22 18:18:15 +00:00
Tom Laermans
ff895f96a0 add get_userlist function, pull from LDAP in case of LDAP backend -- now awaiting fix of edituser page
git-svn-id: http://www.observium.org/svn/observer/trunk@2545 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-22 16:46:30 +00:00
Tom Laermans
cc5ad3b7d5 more new url system fixes for user management -- completely untested as I use LDAP ...
git-svn-id: http://www.observium.org/svn/observer/trunk@2538 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-21 14:54:21 +00:00
Adam Amstrong
13b6ce6e56 fix edit user page
git-svn-id: http://www.observium.org/svn/observer/trunk@2363 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-25 16:40:03 +00:00
Adam Amstrong
5483e5c4d8 more db*
git-svn-id: http://www.observium.org/svn/observer/trunk@2323 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-15 14:49:26 +00:00
Adam Amstrong
b0e02918ef more db*
git-svn-id: http://www.observium.org/svn/observer/trunk@2322 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-15 14:42:30 +00:00
Adam Amstrong
d7d7d67fa0 fixes
git-svn-id: http://www.observium.org/svn/observer/trunk@2294 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-12 23:17:44 +00:00
Tom Laermans
f55a30f744 some formatting cleanups, introduce some more FIXMEs to look at, plus replace mysql_fetch_array by mysql_fetch_assoc, for great justice
git-svn-id: http://www.observium.org/svn/observer/trunk@2029 61d68cd4-352d-0410-923a-c4978735b2b8
2011-04-06 13:54:50 +00:00
Tom Laermans
7454791074 code standard/cleanups
git-svn-id: http://www.observium.org/svn/observer/trunk@1978 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-26 19:12:24 +00:00
Tom Laermans
834989df95 restructure/reindent/htmlfix html pages, remove dead code
git-svn-id: http://www.observium.org/svn/observer/trunk@1897 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-17 00:09:20 +00:00
Adam Amstrong
a69d2936ca add some checking to adding/removing permissions for users
git-svn-id: http://www.observium.org/svn/observer/trunk@1654 61d68cd4-352d-0410-923a-c4978735b2b8
2010-08-10 12:08:42 +00:00
Adam Amstrong
dde37da45d small fixes to billing editing (use correct variables and the like, doh)
git-svn-id: http://www.observium.org/svn/observer/trunk@1496 61d68cd4-352d-0410-923a-c4978735b2b8
2010-07-27 18:45:46 +00:00
Adam Amstrong
1a1750b0c3 inc.php plx
git-svn-id: http://www.observium.org/svn/observer/trunk@1336 61d68cd4-352d-0410-923a-c4978735b2b8
2010-07-10 12:52:04 +00:00