Skip to content

Commit

Permalink
Merge pull request #51 from alagoutte/dev
Browse files Browse the repository at this point in the history
Update to 0.2.1
  • Loading branch information
tpcarman committed Aug 30, 2023
2 parents 1f20174 + 1fbe0db commit c3b88e3
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 34 deletions.
2 changes: 1 addition & 1 deletion AsBuiltReport.Fortinet.FortiGate.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ PrivateData = @{
ProjectUri = 'https://github.com/AsBuiltReport/AsBuiltReport.Fortinet.FortiGate'

# A URL to an icon representing this module.
IconUri = 'https://raw.githubusercontent.com/AsBuiltReport/AsBuiltReport/master/AsBuiltReport.png'
IconUri = 'https://github.com/AsBuiltReport.png'

# ReleaseNotes of this module
ReleaseNotes = 'https://raw.githubusercontent.com/AsBuiltReport/AsBuiltReport.Fortinet.FortiGate/master/CHANGELOG.md'
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# :arrows_clockwise: Fortinet FortiGate As Built Report Changelog

## [0.2.1] - 2023-06-21
## [0.2.1] - 2023-08-21

### Fixed

- VPN SSL: VPN(SSL): fix ColumnWidths for Portal Summary [#35](https://github.com/AsBuiltReport/AsBuiltReport.Fortinet.FortiGate/pull/35)
- VPN SSL: VPN(SSL): fix ColumnWidths for Portal Summary [#35](https://github.com/AsBuiltReport/AsBuiltReport.Fortinet.FortiGate/pull/35) And Users [#48](https://github.com/AsBuiltReport/AsBuiltReport.Fortinet.FortiGate/pull/48)
- SAML(User): Don't get when use old Fortigate release (< 6.2.0) [#36](https://github.com/AsBuiltReport/AsBuiltReport.Fortinet.FortiGate/pull/36)
- VDOM options - Interfaces [#44](https://github.com/AsBuiltReport/AsBuiltReport.Fortinet.FortiGate/issues/44)

## [0.2.0] - 2023-05-17

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- ********** DO NOT EDIT THESE LINKS ********** -->
<p align="center">
<a href="https://www.asbuiltreport.com/" alt="AsBuiltReport"></a>
<img src='https://raw.githubusercontent.com/AsBuiltReport/AsBuiltReport/master/AsBuiltReport.png' width="8%" height="8%" /></a>
<img src='https://github.com/AsBuiltReport.png' width="8%" height="8%" /></a>
</p>
<p align="center">
<a href="https://www.powershellgallery.com/packages/AsBuiltReport.Fortinet.FortiGate/" alt="PowerShell Gallery Version">
Expand Down
10 changes: 5 additions & 5 deletions Src/Private/Get-AbrFgtFirewall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ function Get-AbrFgtFirewall {
Paragraph "The following section provides a summary of firewall settings."
BlankLine
$OutObj = [pscustomobject]@{
"Address" = $Address.count
"Group" = $Group.count
"IP Pool" = $IPPool.count
"Virtual IP" = $VIP.count
"Policy" = $Policy.count
"Address" = @($Address).count
"Group" = @($Group).count
"IP Pool" = @($IPPool).count
"Virtual IP" = @($VIP).count
"Policy" = @($Policy).count
}

$TableParams = @{
Expand Down
6 changes: 3 additions & 3 deletions Src/Private/Get-AbrFgtRoute.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ function Get-AbrFgtRoute {
Paragraph "The following section provides a summary of route settings."
BlankLine
$OutObj = [pscustomobject]@{
"Monitor Route" = $MonitorRouterIPv4.count
"Static Route" = $Statics.count
"Policy Based Route" = $PolicyBasedRouting.count
"Monitor Route" = @($MonitorRouterIPv4).count
"Static Route" = @($Statics).count
"Policy Based Route" = @($PolicyBasedRouting).count
}

$TableParams = @{
Expand Down
33 changes: 21 additions & 12 deletions Src/Private/Get-AbrFgtSystem.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -204,17 +204,21 @@ function Get-AbrFgtSystem {

foreach ($admin in $Admins) {

$trustedHosts = $admin.trusthost1
$trustedHosts += $admin.trusthost2
$trustedHosts += $admin.trusthost3
$trustedHosts += $admin.trusthost4
$trustedHosts += $admin.trusthost5
$trustedHosts += $admin.trusthost6
$trustedHosts += $admin.trusthost7
$trustedHosts += $admin.trusthost8
$trustedHosts += $admin.trusthost9
$trustedHosts += $admin.trusthost10

$trustedHosts = $admin.trusthost1 + "`n"
$trustedHosts += $admin.trusthost2 + "`n"
$trustedHosts += $admin.trusthost3 + "`n"
$trustedHosts += $admin.trusthost4 + "`n"
$trustedHosts += $admin.trusthost5 + "`n"
$trustedHosts += $admin.trusthost6 + "`n"
$trustedHosts += $admin.trusthost7 + "`n"
$trustedHosts += $admin.trusthost8 + "`n"
$trustedHosts += $admin.trusthost9 + "`n"
$trustedHosts += $admin.trusthost10 + "`n"

$trustedHosts = $trustedHosts -replace "0.0.0.0 0.0.0.0`n", "" #Remove 'All Network'
if($trustedHosts -eq ""){
$trustedHosts = "All" #TODO: Add Health Warning !
}
$OutObj += [pscustomobject]@{
"Name" = $admin.name
"Profile" = $admin.accprofile
Expand All @@ -226,7 +230,7 @@ function Get-AbrFgtSystem {
$TableParams = @{
Name = "Administrator"
List = $false
ColumnWidths = 25, 25, 25, 25
ColumnWidths = 25, 25, 35, 15
}

if ($Report.ShowTableCaptions) {
Expand All @@ -239,6 +243,11 @@ function Get-AbrFgtSystem {

$interfaces = Get-FGTSystemInterface

#By 'API' design, it is always return all interfaces (not filtering by vdom)
if ($null -ne $Options.vdom) {
$interfaces = $interfaces | Where-Object {$_.vdom -eq $Options.vdom }
}

if ($interfaces -and $InfoLevel.System -ge 1) {
Section -Style Heading3 'Interfaces' {
$OutObj = @()
Expand Down
10 changes: 5 additions & 5 deletions Src/Private/Get-AbrFgtUser.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ function Get-AbrFgtUser {
Paragraph "The following section provides a summary of user settings."
BlankLine
$OutObj = [pscustomobject]@{
"User" = $Users.count
"Group" = $Groups.count
"LDAP" = $LDAPS.count
"RADIUS" = $RADIUS.count
"SAML" = $SAML.count
"User" = @($Users).count
"Group" = @($Groups).count
"LDAP" = @($LDAPS).count
"RADIUS" = @($RADIUS).count
"SAML" = @($SAML).count
}

$TableParams = @{
Expand Down
4 changes: 2 additions & 2 deletions Src/Private/Get-AbrFgtVPNIPsec.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ function Get-AbrFgtVPNIPsec {
Paragraph "The following section provides a summary of VPN IPsec settings."
BlankLine
$OutObj = [pscustomobject]@{
"VPN IPsec Phase 1" = $vpn_ph1.count
"VPN IPsec Phase 2" = $vpn_ph2.count
"VPN IPsec Phase 1" = @($vpn_ph1).count
"VPN IPsec Phase 2" = @($vpn_ph2).count
}

$TableParams = @{
Expand Down
6 changes: 3 additions & 3 deletions Src/Private/Get-AbrFgtVPNSSL.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ function Get-AbrFgtVPNSSL {
Paragraph "The following section provides a summary of VPN SSL settings."
BlankLine
$OutObj = [pscustomobject]@{
"Portal" = $settings.count
"User (connected)" = $users.Count
"Portal" = @($settings).count
"User (connected)" = @($users).Count
}

$TableParams = @{
Expand Down Expand Up @@ -225,7 +225,7 @@ function Get-AbrFgtVPNSSL {
$TableParams = @{
Name = "VPN SSL Users Connected"
List = $false
ColumnWidths = 30, 20, 20, 40
ColumnWidths = 30, 20, 20, 30
}

if ($Report.ShowTableCaptions) {
Expand Down

0 comments on commit c3b88e3

Please sign in to comment.