41 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 50bb72f530 Remove port association mode map from the database (#8941)
* Remove port association mode map from the database

* Renamed sql file

* Renamed sql file
2018-08-05 09:50:13 +01:00
Klaas Tammling 20741e1b21 Disable autocomplete on pages with SNMPv3 settings (#8833)
We have noticed that some Firefox password managers try to autocomplete AuthUser, AuthPass and CryptoPass with user credentials. This can lead to a security issue as the credentials of users are stored in plaintext inside the LibreNMS database.

The autocomplete="off" should disable this behaviour.

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [ ] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-06-23 20:48:03 +01: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
Rémy Jacquin 19a17ed348 Allow administrators to edit devices sysName (#8149)
* Allow administrators to edit devices sysName
Signed-off-by: Rémy Jacquin <remy@remyj.fr>

* Fix html/pages/device/edit/device.inc.php identation
Signed-off-by: Rémy Jacquin <remy@remyj.fr>

* Revert "Allow administrators to edit devices sysName"

This reverts commit 11b127b082.

* Moved sysName editing to snmp tab

Signed-off-by: Rémy Jacquin <remy@remyj.fr>
2018-02-06 23:35:00 -06:00
Zmegolaz f8d7ccfe0d feature: Support for up/down detection of ping only devices.
* Added support for ping only devices.

* Renamed sql-schema/206 to 207.

* Discovery tried to detect the OS when it shouldn't.

* Updated db_schema.yaml

* Added ping icon.

* Don't show unused graphs and tabs when SNMP is disabled.

* Allow the user to specify OS of ping only devices.

* Removing custom OS now changes it to 'ping'.

* Removed unnecessary use of mres().

* UI select box for SNMP enable/disable.

* Hide device_ping_perf if ping is disable on device.

* Fixed SNMP settings update status messages.

* Added functionality to add ping only devices via the web ui.

* Added ping only option to addhost.php

* Added ping only support to snmp-scan.py

* Moved sql 208 to 211

* Fixed scrutinizer issues.

* Fixed broken ossearch.

* Added ping only support to the API.

* Updated API doc.

* Added (optional) to OS and hardware description. Hid Port Settings, Applications, Modules, Storage, Processors, Memory and Components from the edit menu

* Style fix.

* Updated ping icon.

* clean() instead of mres(). More escaping. Better help in snmp-scan.py and addhost.php

* Fixed scrutinizer issue.

* Always try SNMP in snmp-scan.py, new option for it in addhost.php. Slice instead of chunk in ajax_ossuggest.php. Other minor style changes.

* Updated sql modifications to insert the new column in the same place as in db_schema.yaml.
2017-10-27 22:59:25 -05:00
Neil Lathwood d5b20dbd1f webui: Added support for skipping snmp check on edit snmp page for devices (#4896) 2016-11-01 17:58:55 +00:00
Neil Lathwood 6c324cd03e refactor: Improve sensors polling for performance increase (#4725)
refactor: Improve sensors polling for performance increase
2016-10-11 19:34:09 +03:00
Neil Lathwood f4bbba1b7d fix: Updated edit snmp to set default poller_group (#4694) 2016-10-02 07:28:22 +00: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
laf 8239109f78 Added support for setting max-repeaters per device 2016-07-06 14:45:23 +01:00
Tony Murray 173336c76b Only display when it is not set to the default setting. 2016-06-12 21:36:04 -05:00
Tony Murray 55f8576973 Fix custom port not showing on the device edit page 2016-06-12 21:23:21 -05:00
ohrensessel b016763007 Fix usage of single quotes, double quotes needed 2016-02-09 13:27:10 +01:00
Maximilian Wilhelm 8c704f7bdf Allow editing port association mode of a device.
Add a select box to the device SNMP edit page in the WebUI to update
  the port association mode of a device.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2016-01-26 13:50:00 +01:00
laf 5bd99b8622 Removed required option for community - breaks v3 2015-09-22 11:01:18 +00:00
Arjit Chaudhary 5b1d1f79fd Display success/error messages across the width of the page
screenshot: http://i.imgur.com/xcuHrMF.png
2015-09-16 16:04:21 +05:30
Arjit Chaudhary c14942e399 snmp.inc.php switch to offsets 2015-09-16 16:02:38 +05:30
Arjit Chaudhary c6d7d4eaf8 Set community field as required
under "SNMP Community input" -- edit device -> SNMP
2015-09-15 01:55:40 +05:30
Arjit Chaudhary 44042d99c3 UI cleanup and icons added 2015-09-15 01:41:39 +05:30
laf f0bb0ecc95 Checks for v3 use lowercase first letter so changed drop down menu to reflext 2015-08-20 17:06:11 +00:00
Job Snijders d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
laf ec595c3eda Added support for adding / editing with a poller group selected 2015-03-19 12:00:03 +00:00
Paul Gear 3460031135 Stylistic fixes 2014-11-12 19:42:44 +10:00
Neil Lathwood e886d1957e Updated edit snmp device section to show relevant v1,v2c or v3 options 2014-10-09 18:54:19 +00:00
laf cbeb0ae378 SNMP passwords are now hidden on an edit snmp form 2014-09-23 23:54:23 +01:00
laf 9ad725d364 Removed (milli) from timeout section 2014-06-24 00:55:00 +01:00
laf 8f1e48933b Shrunk input boxes to col-sm-4 from 6 2014-06-24 00:53:11 +01:00
laf 3e570a118e Tidied device setting pages 2014-06-19 23:00:17 +01:00
Adam Amstrong 73cbb710a0 replace "sha1" with "sha", as required by net-snmp
git-svn-id: http://www.observium.org/svn/observer/trunk@3189 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-15 17:03:35 +00:00
Tom Laermans 4985943822 syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@3185 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-15 15:18:57 +00:00
Adam Amstrong 790480769b snmpv3 support. for hipsters.
git-svn-id: http://www.observium.org/svn/observer/trunk@3156 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-09 16:18:23 +00:00
Tom Laermans ab2668981c Add page title changing infrastructure, do it for device tabs already
git-svn-id: http://www.observium.org/svn/observer/trunk@2690 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-18 14:27:21 +00:00
Tom Laermans b08d6377fa fix device snmp settings edit form
git-svn-id: http://www.observium.org/svn/observer/trunk@2689 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-18 13:04:04 +00:00
Tom Laermans 20930e7702 prettify device/edit/snmp
git-svn-id: http://www.observium.org/svn/observer/trunk@2552 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-23 10:24:04 +00:00
Tom Laermans d864ce234f kill a whole bunch of trailing spaces
git-svn-id: http://www.observium.org/svn/observer/trunk@2516 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-20 09:55:11 +00:00
Adam Amstrong fc40257da9 more db*
git-svn-id: http://www.observium.org/svn/observer/trunk@2336 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-16 12:48:50 +00:00
Adam Amstrong 94115cb0f5 db*
git-svn-id: http://www.observium.org/svn/observer/trunk@2327 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-15 17:20:26 +00:00
Tom Laermans bb4746d4d0 cleanups, small fixes and remove test-*php from the root
git-svn-id: http://www.observium.org/svn/observer/trunk@1998 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-31 10:51:02 +00:00
Tom Laermans 9fd77cd884 allow disabling of alerting per device, allow override of syscontact, minor cleanups
git-svn-id: http://www.observium.org/svn/observer/trunk@1995 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-30 16:28:24 +00:00
Tom Laermans febdea231e move snmp options to separate form on device edit, also hide services link when services disabled
git-svn-id: http://www.observium.org/svn/observer/trunk@1928 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-18 16:49:15 +00:00