Add worker to collect various PortAccessEntity (NAC) attributes (PR #937, partially implements #887)

* Add macsuck worker to collect various PortAccessEntity (NAC) attributes

* Incorporate PAE feedback on #937

 * missing Result/Device.pm column added
 * pae_is... columns instead of pae_capabilities
 * moved most code to Util/PortAccessEntity.pm so the update can
   be done in discover and macsuck

* Refactor PAE attributes during discover as separate Plugin

* PortAccessEntity: don't use device->dns in log string

* Fix "Experimental keys on scalar is now forbidden" test failure

* Revamp pae_control and add missing attribute

 - device.pae_control (text) is now device.pae_is_enabled (bool)
 - also store pae_authconfig_port_control (port mode auto/force(un)Auth)

* Fix "Experimental keys on scalar is now forbidden" test failure

 - ... again because of botched merge
 - at least perlgolfed away a set of curly braces

* Update PortAccessEntity.pm

* Incorporate @ollyg PR feedback

Co-authored-by: Christian Ramseyer <ramseyer@netnea.com>
This commit is contained in:
Oliver Gorwits
2022-11-04 09:03:26 +00:00
committed by GitHub
parent 893c0abdef
commit 0e9ff81cf5
7 changed files with 157 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ __PACKAGE__->add_columns(
{ data_type => "text", is_nullable => 1 },
"remote_os_ver",
{ data_type => "text", is_nullable => 1 },
"remote_serial",
"remote_serial",
{ data_type => "text", is_nullable => 1 },
"remote_dns",
{ data_type => "text", is_nullable => 1 },
@@ -35,6 +35,23 @@ __PACKAGE__->add_columns(
{ data_type => "boolean", default_value => \"false", is_nullable => 1 },
"ifindex",
{ data_type => "bigint", is_nullable => 1 },
"pae_authconfig_state",
{ data_type => "text", is_nullable => 1 },
"pae_authconfig_port_control",
{ data_type => "text", is_nullable => 1 },
"pae_authconfig_port_status",
{ data_type => "text", is_nullable => 1 },
"pae_authsess_user",
{ data_type => "text", is_nullable => 1 },
"pae_authsess_mab",
{ data_type => "text", is_nullable => 1 },
"pae_last_eapol_frame_source",
{ data_type => "text", is_nullable => 1 },
"pae_is_authenticator",
{ data_type => "boolean", default_value => \"false", is_nullable => 1 },
"pae_is_supplicant",
{ data_type => "boolean", default_value => \"false", is_nullable => 1 },
);
__PACKAGE__->set_primary_key("port", "ip");