@@ -579,34 +579,34 @@ type ClusterSummary struct {
579
579
580
580
type PfConfAdvanced struct {
581
581
StructConfig
582
- PfconfigMethod string `val:"hash_element"`
583
- PfconfigNS string `val:"config::Pf"`
584
- PfconfigHashNS string `val:"advanced"`
585
- HashingCost string `json:"hashing_cost"`
586
- ScanOnAccounting string `json:"scan_on_accounting"`
587
- PffilterProcesses string `json:"pffilter_processes"`
588
- UpdateIplogWithAccounting string `json:"update_iplog_with_accounting"`
589
- UpdateIplogWithAuthentication string `json:"update_iplog_with_authentication"`
590
- AdminCspSecurityHeaders string `json:"admin_csp_security_headers"`
591
- Multihost string `json:"multihost"`
592
- SsoOnAccessReevaluation string `json:"sso_on_access_reevaluation"`
593
- DisablePfDomainAuth string `json:"disable_pf_domain_auth"`
594
- TimingStatsLevel string `json:"timing_stats_level"`
595
- SsoOnDhcp string `json:"sso_on_dhcp"`
596
- Language string `json:"language"`
597
- StatsdListenPort string `json:"statsd_listen_port"`
598
- SsoOnAccounting string `json:"sso_on_accounting"`
599
- LocationlogCloseOnAccountingStop string `json:"locationlog_close_on_accounting_stop"`
600
- PortalCspSecurityHeaders string `json:"portal_csp_security_headers"`
601
- HashPasswords string `json:"hash_passwords"`
602
- SourceToSendSmsWhenCreatingUsers string `json:"source_to_send_sms_when_creating_users"`
603
- ActiveDirectoryOsJoinCheckBypass string `json:"active_directory_os_join_check_bypass"`
604
- PfperlApiTimeout string `json:"pfperl_api_timeout"`
605
- LdapAttributes []string `json:"ldap_attributes"`
606
- ApiInactivityTimeout int `json:"api_inactivity_timeout"`
607
- ApiMaxExpiration int `json:"api_max_expiration"`
608
- NetFlowOnAllNetworks string `json:"netflow_on_all_networks"`
609
- AccountingTimebucketSize int `json:"accounting_timebucket_size"`
582
+ PfconfigMethod string `val:"hash_element"`
583
+ PfconfigNS string `val:"config::Pf"`
584
+ PfconfigHashNS string `val:"advanced"`
585
+ HashingCost string `json:"hashing_cost"`
586
+ ScanOnAccounting string `json:"scan_on_accounting"`
587
+ PffilterProcesses string `json:"pffilter_processes"`
588
+ UpdateIplogWithAccounting string `json:"update_iplog_with_accounting"`
589
+ UpdateIplogWithAuthentication string `json:"update_iplog_with_authentication"`
590
+ AdminCspSecurityHeaders string `json:"admin_csp_security_headers"`
591
+ Multihost string `json:"multihost"`
592
+ SsoOnAccessReevaluation string `json:"sso_on_access_reevaluation"`
593
+ DisablePfDomainAuth string `json:"disable_pf_domain_auth"`
594
+ TimingStatsLevel string `json:"timing_stats_level"`
595
+ SsoOnDhcp string `json:"sso_on_dhcp"`
596
+ Language string `json:"language"`
597
+ StatsdListenPort string `json:"statsd_listen_port"`
598
+ SsoOnAccounting string `json:"sso_on_accounting"`
599
+ LocationlogCloseOnAccountingStop string `json:"locationlog_close_on_accounting_stop"`
600
+ PortalCspSecurityHeaders string `json:"portal_csp_security_headers"`
601
+ HashPasswords string `json:"hash_passwords"`
602
+ SourceToSendSmsWhenCreatingUsers string `json:"source_to_send_sms_when_creating_users"`
603
+ ActiveDirectoryOsJoinCheckBypass string `json:"active_directory_os_join_check_bypass"`
604
+ PfperlApiTimeout string `json:"pfperl_api_timeout"`
605
+ LdapAttributes []string `json:"ldap_attributes"`
606
+ ApiInactivityTimeout int `json:"api_inactivity_timeout"`
607
+ ApiMaxExpiration int `json:"api_max_expiration"`
608
+ NetFlowOnAllNetworks string `json:"netflow_on_all_networks"`
609
+ AccountingTimebucketSize int `json:"accounting_timebucket_size"`
610
610
}
611
611
612
612
type PfConfDns struct {
@@ -967,3 +967,98 @@ type FingerbankSettings struct {
967
967
}
968
968
969
969
var FingerbankConf = FingerbankSettings {}
970
+
971
+ type PfConfSwitch struct {
972
+ StructConfig
973
+ PfconfigMethod string `val:"hash_element"`
974
+ PfconfigNS string `val:"config::Switch"`
975
+ PfconfigHashNS string `val:"-"` // Will be the switch IP
976
+
977
+ // Basic Information
978
+ Type string `json:"type"`
979
+ Description string `json:"description"`
980
+ Group string `json:"group"`
981
+
982
+ // VLANs
983
+ Vlans map [string ]string `json:"vlans"`
984
+ VlanMap string `json:"VlanMap"`
985
+
986
+ // Interfaces
987
+ Interfaces map [string ]interface {} `json:"interfaces"`
988
+
989
+ //Roles
990
+ Roles map [string ]string `json:"roles"`
991
+ RoleMap string `json:"RoleMap"`
992
+
993
+ // Network Related
994
+ Networks map [string ]interface {} `json:"networks"`
995
+ NetworksFrom map [string ]interface {} `json:"networks_from"`
996
+
997
+ // Access Control
998
+ AccessLists map [string ]interface {} `json:"access_lists"`
999
+ AccessListMap string `json:"AccessListMap"`
1000
+ ACLsLimit string `json:"ACLsLimit"`
1001
+ DownloadableACLsLimit string `json:"DownloadableACLsLimit"`
1002
+ UsePushACLs string `json:"UsePushACLs"`
1003
+ UseDownloadableACLs string `json:"UseDownloadableACLs"`
1004
+ PushACLs string `json:"pushACLs"`
1005
+
1006
+ // WebAuth
1007
+ UrlMap string `json:"UrlMap"`
1008
+ Urls map [string ]interface {} `json:"urls"`
1009
+ ExternalPortalEnforcement string `json:"ExternalPortalEnforcement"`
1010
+
1011
+ // VPN
1012
+ Vpn map [string ]interface {} `json:"vpn"`
1013
+ VpnMap string `json:"VpnMap"`
1014
+
1015
+ // MFA
1016
+ PostMfaValidation string `json:"PostMfaValidation"`
1017
+
1018
+ // SNMP
1019
+ SNMPUseConnector string `json:"SNMPUseConnector"`
1020
+ SNMPVersion string `json:"SNMPVersion"`
1021
+ SNMPVersionTrap string `json:"SNMPVersionTrap"`
1022
+ SNMPCommunityRead string `json:"SNMPCommunityRead"`
1023
+ SNMPCommunityWrite string `json:"SNMPCommunityWrite"`
1024
+ SNMPCommunityTrap string `json:"SNMPCommunityTrap"`
1025
+
1026
+ // CLI
1027
+ CliAccess string `json:"cliAccess"`
1028
+ CliUser string `json:"cliUser"`
1029
+ CliPwd pfcrypt.CryptString `json:"cliPwd"`
1030
+ CliEnablePwd pfcrypt.CryptString `json:"cliEnablePwd"`
1031
+ CliTransport string `json:"cliTransport"`
1032
+
1033
+ // Web Services
1034
+ WsTransport string `json:"wsTransport"`
1035
+ WsUser string `json:"wsUser"`
1036
+ WsPwd pfcrypt.CryptString `json:"wsPwd"`
1037
+
1038
+ // VoIP Detection
1039
+ VoIPEnabled int `json:"VoIPEnabled"`
1040
+ VoIPCDPDetect string `json:"VoIPCDPDetect"`
1041
+ VoIPDHCPDetect string `json:"VoIPDHCPDetect"`
1042
+ VoIPLLDPDetect string `json:"VoIPLLDPDetect"`
1043
+
1044
+ // RADIUS
1045
+ UseCoA string `json:"useCoA"`
1046
+ RadiusSecret pfcrypt.CryptString `json:"radiusSecret"`
1047
+ RadiusDeauthUseConnector string `json:"radiusDeauthUseConnector"`
1048
+
1049
+ //Advanced
1050
+ InlineTrigger []interface {} `json:"inlineTrigger"`
1051
+ Mode string `json:"mode"`
1052
+ MacSearchesMaxNb string `json:"macSearchesMaxNb"`
1053
+ MacSearchesSleepInterval string `json:"macSearchesSleepInterval"`
1054
+ DeauthOnPrevious string `json:"deauthOnPrevious"`
1055
+ Uplink []string `json:"uplink"`
1056
+ }
1057
+
1058
+ // PfSwitch struct that will help when fetching multiple switch config from config::Switch
1059
+ type PfSwitches struct {
1060
+ PfconfigKeys
1061
+ PfconfigMethod string `val:"keys"`
1062
+ PfconfigNS string `val:"config::Switch"`
1063
+ Keys []string
1064
+ }
0 commit comments