Skip to content

Commit

Permalink
update to 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
alagoutte committed Jul 17, 2024
2 parents 6f55d1b + 04627c9 commit a84d48d
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 58 deletions.
2 changes: 1 addition & 1 deletion AsBuiltReport.Fortinet.FortiGate.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AsBuiltReport.Fortinet.FortiGate.psm1'

# Version number of this module.
ModuleVersion = '0.4.0'
ModuleVersion = '0.4.1'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# :arrows_clockwise: Fortinet FortiGate As Built Report Changelog

## [0.4.1] - 2024-07-17

### Fixed
- Fix FortiCare with PowerShell 5.0 [87](https://github.com/AsBuiltReport/AsBuiltReport.Fortinet.FortiGate/pull/87)

## [0.4.0] - 2024-07-15

### Added
Expand Down
120 changes: 63 additions & 57 deletions Src/Private/Get-AbrFgtFortiCare.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,59 +30,59 @@ function Get-AbrFgtForticare {
if ($LicenseStatus -and $InfoLevel.Forticare -ge 1) {

$FortiGuardservicesDescriptions = @{
"forticare" = "FortiCare Support Services"
"forticloud" = "FortiCloud Management"
"security_rating" = "Security Fabric Rating and Compliance Service"
"antivirus" = "Antivirus Service"
"mobile_malware" = "Mobile Malware Service"
"ai_malware_detection" = "AI-based Inline Malware Prevention"
"ips" = "Intrusion Prevention System (IPS)"
"industrial_db" = "OT Industrial Signatures Database"
"appctrl" = "Application Control"
"internet_service_db" = "Internet Service (SaaS) Database"
"device_os_id" = "Device/OS Detection"
"botnet_ip" = "Botnet IP Reputation Service"
"botnet_domain" = "Botnet Domain Reputation Service"
"psirt_security_rating" = "Attack Surface Security Rating"
"outbreak_security_rating" = "Outbreak Security Rating Service"
"icdb" = "OT Industrial Signatures Database"
"inline_casb" = "Inline SaaS Application Security (CASB)"
"local_in_virtual_patching" = "OT Virtual Patching"
"malicious_urls" = "Malicious URL Database"
"blacklisted_certificates" = "Blacklisted Certificates Service"
"firmware_updates" = "Firmware Updates"
"web_filtering" = "Web Filtering Service"
"outbreak_prevention" = "Outbreak Prevention"
"antispam" = "Antispam Service"
"iot_detection" = "IoT Detection Service"
"ot_detection" = "OT Detection Service"
"forticloud_sandbox" = "FortiCloud Sandbox"
"forticonverter" = "FortiConverter Service"
"fortiguard" = "FortiGuard Services"
"data_leak_prevention" = "Data Leak Prevention"
"sdwan_network_monitor" = "SD-WAN Network Monitor"
"forticloud_logging" = "FortiCloud Logging"
"fortianalyzer_cloud" = "FortiAnalyzer Cloud"
"forticare" = "FortiCare Support Services"
"forticloud" = "FortiCloud Management"
"security_rating" = "Security Fabric Rating and Compliance Service"
"antivirus" = "Antivirus Service"
"mobile_malware" = "Mobile Malware Service"
"ai_malware_detection" = "AI-based Inline Malware Prevention"
"ips" = "Intrusion Prevention System (IPS)"
"industrial_db" = "OT Industrial Signatures Database"
"appctrl" = "Application Control"
"internet_service_db" = "Internet Service (SaaS) Database"
"device_os_id" = "Device/OS Detection"
"botnet_ip" = "Botnet IP Reputation Service"
"botnet_domain" = "Botnet Domain Reputation Service"
"psirt_security_rating" = "Attack Surface Security Rating"
"outbreak_security_rating" = "Outbreak Security Rating Service"
"icdb" = "OT Industrial Signatures Database"
"inline_casb" = "Inline SaaS Application Security (CASB)"
"local_in_virtual_patching" = "OT Virtual Patching"
"malicious_urls" = "Malicious URL Database"
"blacklisted_certificates" = "Blacklisted Certificates Service"
"firmware_updates" = "Firmware Updates"
"web_filtering" = "Web Filtering Service"
"outbreak_prevention" = "Outbreak Prevention"
"antispam" = "Antispam Service"
"iot_detection" = "IoT Detection Service"
"ot_detection" = "OT Detection Service"
"forticloud_sandbox" = "FortiCloud Sandbox"
"forticonverter" = "FortiConverter Service"
"fortiguard" = "FortiGuard Services"
"data_leak_prevention" = "Data Leak Prevention"
"sdwan_network_monitor" = "SD-WAN Network Monitor"
"forticloud_logging" = "FortiCloud Logging"
"fortianalyzer_cloud" = "FortiAnalyzer Cloud"
"fortianalyzer_cloud_premium" = "FortiAnalyzer Cloud Premium"
"fortimanager_cloud" = "FortiManager Cloud"
"fortisandbox_cloud" = "FortiSandbox Cloud"
"fortimanager_cloud" = "FortiManager Cloud"
"fortisandbox_cloud" = "FortiSandbox Cloud"
"fortiguard_ai_based_sandbox" = "FortiGuard AI-based Sandbox"
"sdwan_overlay_aas" = "SD-WAN Overlay-as-a-Service"
"fortisase_private_access" = "FortiSASE Private Access"
"fortisase_lan_extension" = "FortiSASE LAN Extension"
"fortiems_cloud" = "FortiEMS Cloud"
"fortimanager_cloud_alci" = "FortiManager Cloud ALCI"
"fortisandbox_cloud_alci" = "FortiSandbox Cloud ALCI"
"vdom" = "Virtual Domains (platform capability)"
"sms" = "SMS Service"
"sdwan_overlay_aas" = "SD-WAN Overlay-as-a-Service"
"fortisase_private_access" = "FortiSASE Private Access"
"fortisase_lan_extension" = "FortiSASE LAN Extension"
"fortiems_cloud" = "FortiEMS Cloud"
"fortimanager_cloud_alci" = "FortiManager Cloud ALCI"
"fortisandbox_cloud_alci" = "FortiSandbox Cloud ALCI"
"vdom" = "Virtual Domains (platform capability)"
"sms" = "SMS Service"
}
$licenseSummary = @()

$typeDescriptions = @{
downloaded_fds_object = 'Update Feed'
downloaded_fds_object = 'Update Feed'
live_fortiguard_service = 'Real-time Services'
live_cloud_service = 'Cloud Services'
functionality_enabling = 'Feature'
live_cloud_service = 'Cloud Services'
functionality_enabling = 'Feature'
}

$excludeServices = @(
Expand Down Expand Up @@ -115,21 +115,22 @@ function Get-AbrFgtForticare {
$description = $FortiGuardservicesDescriptions[$property.Name]
if ($null -ne $feature.expires) {
$expires = (Get-Date '01/01/1970').AddSeconds($feature.expires) | Get-Date -Format "dd/MM/yyyy"
} else {
}
else {
$expires = $null
}
$type = $feature.type
$entitlement = $feature.entitlement
$typeDescription = $typeDescriptions[$type]

$licenseSummaryUnordered += [PSCustomObject]@{
name = $property.Name
description = $description
status = $status
expiration = $expires
type = $type
name = $property.Name
description = $description
status = $status
expiration = $expires
type = $type
typeDescription = $typeDescription
entitlement = $entitlement
entitlement = $entitlement
}
}

Expand Down Expand Up @@ -174,11 +175,16 @@ function Get-AbrFgtForticare {

$OutObj = @()
foreach ($license in $licenseSummary) {
$licenseStatus = $license.status -eq 'licensed' ? 'Licensed' : 'Unlicensed'
if ($license.status -eq 'licensed') {
$licenseStatus = 'Licensed'
}
else {
$licenseStatus = 'Unlicensed'
}
$OutObj += [pscustomobject]@{
"Name" = $license.description
"Type" = $license.typeDescription
"Status" = $licenseStatus
"Name" = $license.description
"Type" = $license.typeDescription
"Status" = $licenseStatus
"Expiration" = $license.expiration
}
}
Expand Down

0 comments on commit a84d48d

Please sign in to comment.