Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Modelling AppZone Unit Test + #2698 #2714

Merged
merged 25 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e566065
[~] Some cleanup
SolidProgramming Dec 3, 2024
3fc4f4a
[~] AZ creation Test #2597
SolidProgramming Dec 3, 2024
69b4d25
[~] AZ creation test bugfix #2597
SolidProgramming Dec 3, 2024
6bb5803
[-] Remove System.Text.Encodings.Web NuGet #2597
SolidProgramming Dec 4, 2024
4321d10
.
SolidProgramming Dec 5, 2024
d2f6ed7
[~] Resolve nuget security risks
SolidProgramming Dec 9, 2024
fcda660
Merge branch 'az_modelling_test' of https://github.com/SolidProgrammi…
SolidProgramming Dec 9, 2024
3ad9e32
Merge branch 'security_nuget_bumps' into develop
SolidProgramming Dec 9, 2024
ccd9394
[~] Null check for ip1 parameter
SolidProgramming Dec 10, 2024
93989b6
Revert "[~] Resolve nuget security risks"
SolidProgramming Dec 10, 2024
fe33b1e
Revert "[~] Null check for ip1 parameter"
SolidProgramming Dec 10, 2024
bbaf32f
[~] null check ip1 parameter #2698
SolidProgramming Dec 10, 2024
6f0a21d
[~] If statement typo #2698
SolidProgramming Dec 11, 2024
f547cdb
Merge branch 'develop' of https://github.com/CactuseSecurity/firewall…
SolidProgramming Dec 11, 2024
f6a0ade
[~] Fix AZ unit test
SolidProgramming Dec 11, 2024
39f4fa1
[-] Unused code
SolidProgramming Dec 11, 2024
9f85e87
[-] Removed ModellingAppZoneHandlerTestApiCon because it's not needed
SolidProgramming Dec 11, 2024
1506c82
Merge branch 'develop' of https://github.com/SolidProgramming/firewal…
SolidProgramming Dec 11, 2024
55cac17
[~] Bumps System.IdentityModel.Tokens.Jwt from 8.2.0 to 8.3.0.
SolidProgramming Dec 11, 2024
5a087b0
Merge branch 'develop' into develop
SolidProgramming Dec 11, 2024
0462351
Merge branch 'develop' of https://github.com/SolidProgramming/firewal…
SolidProgramming Dec 11, 2024
97f567b
Merge branch 'nuget_bumps' of https://github.com/SolidProgramming/fir…
SolidProgramming Dec 11, 2024
349e3ac
[-] Remove 'treatAsUsed' from projects
SolidProgramming Dec 11, 2024
d4c9bde
[-] Removed AppZoneId variable(unused)
SolidProgramming Dec 16, 2024
98165c6
Merge branch 'develop' into develop
tpurschke Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions roles/lib/files/FWO.Api.Client/Data/DisplayBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,16 @@ public static string DisplayIp(string ip1, string ip2, string nwObjType, bool in
string result = "";
if (nwObjType != ObjectType.Group)
{
if (!IsV4Address(ip1) && !IsV6Address(ip1))

if (string.IsNullOrEmpty(ip2))
{
ip2 = ip1;
}

if (string.IsNullOrEmpty(ip1))
{
Log.WriteDebug("Ip displaying", $"Nessessary parameter {nameof(ip1)} is empty.");
}else if (!IsV4Address(ip1) && !IsV6Address(ip1))
{
Log.WriteError("Ip displaying", $"Found undefined IP family: {ip1} - {ip2}");
}
Expand All @@ -130,11 +139,7 @@ public static string DisplayIp(string ip1, string ip2, string nwObjType, bool in
Log.WriteError("Ip displaying", $"Found mixed IP family: {ip1} - {ip2}");
}
else
{
if (ip2 == "")
{
ip2 = ip1;
}
{
string IpStart = StripOffUnnecessaryNetmask(ip1);
string IpEnd = StripOffUnnecessaryNetmask(ip2);

Expand Down
2 changes: 1 addition & 1 deletion roles/lib/files/FWO.Config.File/FWO.Config.File.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.2.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion roles/lib/files/FWO.Middleware/FWO.Middleware.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.2.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 1 addition & 3 deletions roles/lib/files/FWO.Report.Filter/FWO.Report.Filter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IPAddressRange" Version="6.1.0">
<TreatAsUsed>true</TreatAsUsed>
</PackageReference>
<PackageReference Include="IPAddressRange" Version="6.1.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\lib\files\FWO.Api.Client\FWO.Api.Client.csproj" />
Expand Down
34 changes: 16 additions & 18 deletions roles/lib/files/FWO.Services/FWO.Services.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.11" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.11" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FWO.Api.Client\FWO.Api.Client.csproj" />
<ProjectReference Include="..\FWO.Config.Api\FWO.Config.Api.csproj" />
<ProjectReference Include="..\FWO.Config.File\FWO.Config.File.csproj" />
<ProjectReference Include="..\FWO.Middleware.Client\FWO.Middleware.Client.csproj" />
<ProjectReference Include="..\FWO.Tufin.SecureChange\FWO.Tufin.SecureChange.csproj">
<TreatAsUsed>true</TreatAsUsed>
</ProjectReference>
<ProjectReference Include="..\FWO.Logging\FWO.Logging.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FWO.Api.Client\FWO.Api.Client.csproj" />
<ProjectReference Include="..\FWO.Config.Api\FWO.Config.Api.csproj" />
<ProjectReference Include="..\FWO.Config.File\FWO.Config.File.csproj" />
<ProjectReference Include="..\FWO.Middleware.Client\FWO.Middleware.Client.csproj" />
<ProjectReference Include="..\FWO.Tufin.SecureChange\FWO.Tufin.SecureChange.csproj" />
<ProjectReference Include="..\FWO.Logging\FWO.Logging.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion roles/lib/files/FWO.Services/ModellingAppZoneHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace FWO.Services
{
public class ModellingAppZoneHandler(ApiConnection apiConnection, UserConfig userConfig, Action<Exception?, string, string, bool> displayMessageInUi, FwoOwner owner) : ModellingHandlerBase(apiConnection, userConfig, displayMessageInUi)
public class ModellingAppZoneHandler(ApiConnection apiConnection, UserConfig userConfig, FwoOwner owner, Action<Exception?, string, string, bool>? displayMessageInUi = default) : ModellingHandlerBase(apiConnection, userConfig, displayMessageInUi)
{
private ModellingNamingConvention NamingConvention = new();

Expand Down
2 changes: 1 addition & 1 deletion roles/lib/files/FWO.Services/ModellingVarianceAnalysis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace FWO.Services
public class ModellingVarianceAnalysis(ApiConnection apiConnection, ExtStateHandler extStateHandler, UserConfig userConfig, FwoOwner owner, Action<Exception?, string, string, bool> displayMessageInUi)
{
private readonly ModellingNamingConvention namingConvention = System.Text.Json.JsonSerializer.Deserialize<ModellingNamingConvention>(userConfig.ModNamingConvention) ?? new();
private readonly ModellingAppZoneHandler AppZoneHandler = new(apiConnection, userConfig, displayMessageInUi, owner);
private readonly ModellingAppZoneHandler AppZoneHandler = new(apiConnection, userConfig, owner, displayMessageInUi);
private AppServerComparer appServerComparer = new(new());
private List<Management> managements = [];

Expand Down
8 changes: 2 additions & 6 deletions roles/test/files/FWO.Test/FWO.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Haukcode.WkHtmlToPdfDotNet" Version="1.5.95">
<TreatAsUsed>true</TreatAsUsed>
</PackageReference>
<PackageReference Include="Haukcode.WkHtmlToPdfDotNet" Version="1.5.95" />
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.2.0">
<TreatAsUsed>true</TreatAsUsed>
</PackageReference>
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading