Commit Graph

31 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
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
Tony Murray
9a33464c52 refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
Tony Murray
d2193f76ca feature: allow scripts to be run from any working directory (#4437)
* feature: allow validate.php to be run from any working directory

* remove redundant realpath() call

* re-add realpath() to remove symbolic links

* realpath() isn't needed...

* chdir() in all php scripts in ./ and ./scripts/

* update-sql.php clearly is not used, as it was broken.

* Change some scripts to executable
Remove extra chdir() call in snmp-scan.php

* Missed console-ui.php
Kind of fixed console-ui.php help output

* Re-add newline
2016-09-14 16:53:04 +01:00
Neil Lathwood
7dec670494 refactor: Updated a lot of references to LibreNMS - copyright still left intact (#4339) 2016-09-08 08:12:23 -05:00
Tony Murray
abc6a5b799 PSR-2 Final cleanup (#4247)
refactor: Final PSR2 cleanup
2016-08-28 23:32:55 +01:00
Tony Murray
b8e9b2d917 Implement an autoloader (#4140)
* Implement an autoloader

When cleaning up classes for psr2, things got a bit unwieldy, so I implemented a class autoloader.
I created a PSR-0 compliant LibreNMS directory and moved all classes there that made sense.
Implemented LibreNMS\ClassLoader which supports adding manual class mappings

This reduces the file includes needed and only loads classes when needed.

* Add teh autoloader to graph.php

* Add a small bit of docs
Fix incomplete class in includes/discovery/functions.inc.php
2016-08-21 14:07:14 +01:00
Tony Murray
bf2c522c89 Move third party software to html/lib form html/includes 2016-08-15 13:16:10 -05:00
Job Snijders
d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
laf
3bc3113c4c Added PasswordHash.php to adduser.php 2014-02-27 21:05:18 +00:00
Tyler Christiansen
63d428c0e1 Revert "update copyright notice" after discussion with Paul
This reverts commit 774233327e.
2013-10-28 12:01:36 -07:00
Tyler Christiansen
774233327e update copyright notice 2013-10-28 01:46:59 -07:00
Adam Amstrong
dbf212f652 phpDocumentator headers. retire static-config. IF YOU ARE READING THIS, REMOVE IT FROM THE BOTTOM YOUR CONFIG.PHP. YES. YOU.
git-svn-id: http://www.observium.org/svn/observer/trunk@3150 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-09 10:01:42 +00:00
Tom Laermans
6b210ea056 change directory to observium root, now also for other commandline tools
git-svn-id: http://www.observium.org/svn/observer/trunk@2990 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-08 10:44:41 +00:00
Tom Laermans
de7ff537cc revert r1957 patch
git-svn-id: http://www.observium.org/svn/observer/trunk@1960 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-23 09:54:56 +00:00
Geert Hauwaerts
6501cd29b5 - Code cleanup by Bastian Widmer.
git-svn-id: http://www.observium.org/svn/observer/trunk@1957 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-22 20:27:39 +00:00
Tom Laermans
6ce38e5229 check for existing user in adduser
git-svn-id: http://www.observium.org/svn/observer/trunk@1930 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-18 16:56:02 +00:00
Tom Laermans
9f24ca4248 moar.
git-svn-id: http://www.observium.org/svn/observer/trunk@1899 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-17 11:12:32 +00:00
Tom Laermans
50f873bffc the trailing spaces hunt continues...
git-svn-id: http://www.observium.org/svn/observer/trunk@1867 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-16 09:29:46 +00:00
Tom Laermans
7cae27970e reindent/reformat addhost and adduser
git-svn-id: http://www.observium.org/svn/observer/trunk@1831 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-14 18:53:48 +00:00
Tom Laermans
88aa15d001 unbroke adduser.php
git-svn-id: http://www.observium.org/svn/observer/trunk@1733 61d68cd4-352d-0410-923a-c4978735b2b8
2010-11-22 22:06:37 +00:00
Tom Laermans
30bdd952ee Minor fixes, some cleanups, and standardising on echo("x") instead of echo "x"
git-svn-id: http://www.observium.org/svn/observer/trunk@1728 61d68cd4-352d-0410-923a-c4978735b2b8
2010-11-20 14:04:07 +00:00
Adam Amstrong
cd76567edb ginger patch
git-svn-id: http://www.observium.org/svn/observer/trunk@1699 61d68cd4-352d-0410-923a-c4978735b2b8
2010-09-03 18:26:59 +00:00
Adam Amstrong
3b3eb02413 undebug adduser :>
git-svn-id: http://www.observium.org/svn/observer/trunk@1280 61d68cd4-352d-0410-923a-c4978735b2b8
2010-06-29 12:48:35 +00:00
Adam Amstrong
55fee97d58 fix about layout, add mysql auth type to defaults.inc.php delete a space or some shit in adduser.php
git-svn-id: http://www.observium.org/svn/observer/trunk@1279 61d68cd4-352d-0410-923a-c4978735b2b8
2010-06-29 12:47:50 +00:00
Tom Laermans
eed5f0c3c3 MOAR AUTHMODULE, with some parts left to do...
git-svn-id: http://www.observium.org/svn/observer/trunk@991 61d68cd4-352d-0410-923a-c4978735b2b8
2010-03-06 01:10:05 +00:00
Tom Laermans
fca6fafb60 include defaults.php before config.php, not FROM config.php
git-svn-id: http://www.observium.org/svn/observer/trunk@966 61d68cd4-352d-0410-923a-c4978735b2b8
2010-02-27 14:44:38 +00:00
Adam Amstrong
1df7127d28 fixes
git-svn-id: http://www.observium.org/svn/observer/trunk@409 61d68cd4-352d-0410-923a-c4978735b2b8
2009-04-28 10:28:58 +00:00
Adam Amstrong
96cc0308fd security fixes and some juniper graphing stuff.
git-svn-id: http://www.observium.org/svn/observer/trunk@245 61d68cd4-352d-0410-923a-c4978735b2b8
2008-07-22 08:24:34 +00:00
Adam Amstrong
18accc6541 fixing silly things, tsk!
git-svn-id: http://www.observium.org/svn/observer/trunk@186 61d68cd4-352d-0410-923a-c4978735b2b8
2008-03-22 15:03:55 +00:00
Adam Amstrong
5a8ea32cbb commandline adduser tool (to solve all that default username malarky!)
git-svn-id: http://www.observium.org/svn/observer/trunk@185 61d68cd4-352d-0410-923a-c4978735b2b8
2008-03-22 14:13:16 +00:00