Commit Graph

746 Commits

Author SHA1 Message Date
Oliver Gorwits
0ff88a8be2 fix debug messages using -> in wrong place 2023-08-11 13:31:28 +01:00
Oliver Gorwits
f01f03caa4 check loadmibs has run before running snapshot 2023-08-11 13:29:10 +01:00
Oliver Gorwits
5efcdd7707 better status reporting from SNMPFastDiscover 2023-08-11 13:28:55 +01:00
Oliver Gorwits
b9041f87b2 fix bug with internal actions overriding job actions 2023-08-11 13:28:28 +01:00
Oliver Gorwits
3e1d6a1505 #1090 snapshot request via web fix params 2023-08-11 10:28:38 +01:00
Oliver Gorwits
21afacccc4 #1087 netdisco-do show handles qualified MIB leafs 2023-08-11 10:24:05 +01:00
Oliver Gorwits
3e883e163e fix use specific class for snmp transport 2023-08-11 10:13:12 +01:00
Oliver Gorwits
9eb537a4c1 #910 implement import of snmpwalk and more robust snapshot handling (#1086)
* initial work

* initial work

* initial work

* some fixes for time and Layer3 weird spec

* store again the snapshot after update for specific

* resolve the enums

* monkeypatch SNMP::translateObj to avoid hardware exception on macOS

* only save cache to db in the late phase worker

* no need to check for cache on transport, can just go ahead and try

* use database only for oidmap instead of netdisco-mibs

* rewrite device snapshot to gather loaded mib leafs only

* remove old walker code from snapshot worker

* allow snmp browser to work without snapshot

* only store snapshot leafs which the device responded on

* refactor to separate snapshot work from snmp transport work

* refactor to separate snapshot work from snmp transport work

* allow typeahead on MIB qualified leafs

* fixes for snmpwalk input after previous refactor

* add the extra stuff SNMP::Info device class uses into snapshot

* better width for snmp search box

* fix css for snmp options

* add spinner while snmp loading

* add spinner while snmp loading

* add spinner while snmp loading

* support SNMP::Info device class or named MIBs as extra on snapshot

* add final tidy and bug fix
2023-08-10 22:27:02 +01:00
Oliver Gorwits
7afae0b9b2 avoid tags worker if device not in storage 2023-07-27 07:12:08 +01:00
Oliver Gorwits
e2ce601782 fix double encoding on JSON UTF-8 custom fields 2023-07-25 12:42:20 +01:00
Oliver Gorwits
4b6227fa2b fix tests 2023-07-20 20:39:31 +01:00
Oliver Gorwits
2d5e4dddee #1063 allow acls to match custom_fields 2023-07-20 18:08:36 +01:00
Oliver Gorwits
47c4226788 refactor CustomFields so with_custom_fields is available on backend 2023-07-20 16:51:04 +01:00
Oliver Gorwits
1eabe7064f #1062 allow job submit API to use extra field instead of subaction 2023-07-20 16:19:13 +01:00
Oliver Gorwits
663d5da1d3 #1062 allow job submit API to use extra field instead of subaction 2023-07-20 12:56:48 +01:00
Oliver Gorwits
31489ba550 #1072 clean custom_fields keys on rediscover 2023-07-20 12:49:40 +01:00
Oliver Gorwits
f8222e7890 #1072 clean custom_fields keys on rediscover 2023-07-19 22:18:00 +01:00
Oliver Gorwits
1067b82dc6 avoid mixing device and port custom_field fields 2023-07-19 18:11:12 +01:00
Oliver Gorwits
0378e01af7 skip set tags if none to set 2023-07-19 17:46:20 +01:00
Oliver Gorwits
04ee1e1613 #1064 display device and device port tags in web ui 2023-07-19 13:01:51 +01:00
Oliver Gorwits
4b99f0bb9c #1064 implement setting of tags on discovery based on config 2023-07-19 11:24:41 +01:00
Oliver Gorwits
f72acb6006 #1064 implement tags in database and ACL 2023-07-19 11:15:49 +01:00
Oliver Gorwits
6eed661c43 avoid mistaking v6 in ACL for prop:val 2023-07-15 11:08:22 +01:00
Oliver Gorwits
71aa261737 fix skip long SNMP timeout for initial discover 2023-07-15 10:14:01 +01:00
Oliver Gorwits
fcd1c45606 allow ACL property match to contain ":" 2023-07-14 20:20:21 +01:00
Oliver Gorwits
eac55a581d #1066 implement snmp_try_slow_connect and fast device discover from queue 2023-07-14 17:37:52 +01:00
Oliver Gorwits
2f7e3f80a3 #1066 try all communities on highest snmp version before lowering version and trying communities again 2023-07-13 13:33:24 +01:00
Oliver Gorwits
6f8af7ed9d #1059 add NETDISCO_SNMP_BULKWALK_OFF environment to disable bulkwalk 2023-07-12 21:42:24 +01:00
Ambroise
61b9e01b52 Fix an error when the log string is empty (#1058) 2023-07-01 09:32:57 +01:00
Oliver Gorwits
a2da6a7a04 avoid open redirect vulnerability with return_url login helper 2023-06-28 16:56:04 +01:00
Oliver Gorwits
ef4e3f5181 explicitly use SameSite=Lax Cookie Attribute for dancer.session cookies 2023-06-28 16:39:24 +01:00
Oliver Gorwits
9f4401f2fb avoid CSS vulnerability in Find Anything 2023-06-28 12:06:11 +01:00
Oliver Gorwits
2cbb68889a #975 RBAC for port control with new portctl_by_role setting 2023-06-27 22:52:04 +01:00
Oliver Gorwits
33b4a6c231 fix op:and not working for prop:value ACL rules 2023-06-26 19:31:54 +01:00
Oliver Gorwits
b89e8913b6 #843 redux - also refresh API token for getapikey 2023-06-26 16:54:40 +01:00
Oliver Gorwits
a76dc79b79 permit import of check_acl from Util::Permission in case other modules are still using it 2023-06-22 14:11:06 +01:00
Oliver Gorwits
814ccc9267 permit import of check_acl from Util::Permission in case other modules are still using it 2023-06-22 14:09:34 +01:00
Oliver Gorwits
5515b93c88 #1036 redux allow use of /login even when authN is delegated 2023-06-22 13:55:00 +01:00
Oliver Gorwits
a7cd5603cb #1036 redux allow use of /login even when authN is delegated 2023-06-22 13:35:51 +01:00
Oliver Gorwits
bb046f036e tune the portvlanmismatch and include domain name in report view 2023-06-19 21:28:23 +01:00
Oliver Gorwits
f14e495e49 use new faster portvlanmismatch query without duplication 2023-06-13 17:41:20 +01:00
Oliver Gorwits
460b014e91 swagger-ui allows adding X-REMOTE_USER header when behind proxy 2023-06-13 17:41:20 +01:00
Oliver Gorwits
5181d83742 fix for undef HTTP_SERVER and HTTP_PORT err when browsing swagger-ui 2023-06-13 17:41:20 +01:00
Christian Ramseyer
82dea7de2a Try to fix #1044 by subquery inlining instead of CTE (#1046) 2023-06-08 16:29:14 +01:00
Christian Ramseyer
5d6697b035 Add indexes for custom_fields in device + device_port (#1045) 2023-06-08 16:12:59 +01:00
Oliver Gorwits
195f98dff1 make safe the api calls with potential for demo site damage 2023-06-05 17:28:34 +01:00
Oliver Gorwits
65a908dcd3 #1036 skip API login for trust_remote_user, trust_x_remote_user, no_auth 2023-06-05 17:02:20 +01:00
Ambroise
130fa4aebe Change the way to retrieve IP address of interface (#1026)
Use by default the ipTable MIB entry to retrieve the IP address of interfaces and fallback to the index method as previously.
Fixe the issue with the case where the index is not really an IP address (seen in Fortinet with VDOM).

Related to issue #1016
2023-05-31 14:06:00 +01:00
Oliver Gorwits
9355f5c2b9 Refactored ACL support with multi-object compare
Squashed commit of the following:

commit 4081e22202693bd7c4ea00e95daad8e628c6fd5a
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon May 29 21:02:07 2023 +0100

    large rename of check_acl* to acl_matches*

commit 3cfa284ddd24d68765c255578cc5c184afbdcd83
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Fri May 19 20:39:03 2023 +0100

    update permission doc

commit 8c7bb93cc5e9fafb770f98f446e45cbd94b14894
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Wed May 17 21:50:07 2023 +0100

    migrate most check_acl_only to acl_matches_only

commit c47f699f2a22f08f2f3e093ed0f24c891e6f9a82
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Wed May 17 21:39:19 2023 +0100

    rename check_acl* to be acl_matches*

commit a884a22c3ab1f3262118c3a47ed8e25b0b0a7336
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 14 16:50:42 2023 +0100

    update macsuck_no_deviceports to use acl_matches

commit 8c256af728721329b64d071fa529dfc844073ac6
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 7 22:54:33 2023 +0100

    update hide_deviceports to use acl_matches multi @things

commit cd5d9978aba1da459be4fed4500f395df13f7784
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 7 22:53:38 2023 +0100

    check_acl fix to allow all @things to offer a property before fallback to missing as empty string

commit 1a3ab9a7646e9f994f03126d45fc36e9e5a13ed5
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue May 2 15:31:17 2023 +0100

    add ignore_deviceports to portproperties discover; improve comments

commit 51385ce89458dc939587dae902fda431719c22c9
Merge: b97c07d2 3f8ffe78
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue May 2 15:21:48 2023 +0100

    Merge branch 'master' into og-acl_multidict

commit b97c07d237d750c1d9eb3095d8ff3908512eac2a
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat Mar 25 14:37:53 2023 +0000

    add support for arrayref of items, and unblessed hash, to check_acl
2023-05-29 21:32:07 +01:00
Oliver Gorwits
3f8ffe787f hooks only queued if their trigger job is successful (done) 2023-04-30 22:59:20 +01:00