Skip to content

Commit

Permalink
Feature/version 10 release (#469)
Browse files Browse the repository at this point in the history
* Remove version prefix, update release notes.

* Do not set allowed risk level if not specified.

* Update breaking changes.

* Upgrade version of GitHub action upload-artifact from v2 to v3.

* Upgrade NuGet packages.

---------

Co-authored-by: Elin Fokine <[email protected]>
  • Loading branch information
elinohlsson and Elin Fokine authored Sep 27, 2024
1 parent aafc9ce commit 94c6ef3
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
shell: pwsh

- name: Upload packages
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.artifactName }}
path: |
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
shell: pwsh

- name: Upload samples
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.artifactName }}
path: ${{ runner.temp }}/zip
3 changes: 1 addition & 2 deletions BREAKINGCHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ Breaking changes between version 10.0.0 and 9.0.0
* Remove policy handling from API library into Core
* Fall back to mobile BankID policy for OtherDevice flow
* Enum for setting policy instead of string
* Allow only low risk level transactions by default.
* Replaced expired embedded BankID certificate for test environment FPTestcert4_20220818.p12 with new certificate from BankID FPTestcert5_20240610.p12.
* Replace embedded BankID certificate for the test environment FPTestcert4_20220818.p12, with the three new versions of the client certificate FPTestcert5_20240610.p12, FPTestcert5_20240610.pem and FPTestcert5_20240610-legacy.pfx. Make it configurable which version to use. For compatibility reasons use FPTestcert5_20240610-legacy.pfx by default.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Duende.IdentityServer" Version="7.0.6"/>
<PackageReference Include="Duende.IdentityServer" Version="7.0.7" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.8" />
<PackageReference Include="Microsoft.Extensions.Logging.ApplicationInsights" Version="2.22.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.5.3">
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.6.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class BankIdAuthOptions : RemoteAuthenticationOptions
/// the transaction will be blocked. The risk indication requires that the endUserIp is correct.
/// An incorrect IP-address will result in legitimate transactions being blocked.
/// </summary>
public BankIdAllowedRiskLevel BankIdAllowedRiskLevel { get; set; } = BankIdAllowedRiskLevel.Low;
public BankIdAllowedRiskLevel BankIdAllowedRiskLevel { get; set; } = BankIdAllowedRiskLevel.NoRiskLevel;

/// <summary>
/// Auto launch the BankID app on the current device.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override BankIdUiOptions Read(BinaryReader reader)
.Select(Enum.Parse<BankIdCertificatePolicy>)
.ToList();

var riskLevel = Enum.TryParse<BankIdAllowedRiskLevel>(reader.ReadString(), out var allowedRiskLevel) ? allowedRiskLevel : BankIdAllowedRiskLevel.Low;
var riskLevel = Enum.TryParse<BankIdAllowedRiskLevel>(reader.ReadString(), out var allowedRiskLevel) ? allowedRiskLevel : BankIdAllowedRiskLevel.NoRiskLevel;

return new BankIdUiOptions(
certificatePolicies,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class BankIdSignOptions
/// the transaction will be blocked. The risk indication requires that the endUserIp is correct.
/// An incorrect IP-address will result in legitimate transactions being blocked.
/// </summary>
public BankIdAllowedRiskLevel BankIdAllowedRiskLevel { get; set; } = BankIdAllowedRiskLevel.Low;
public BankIdAllowedRiskLevel BankIdAllowedRiskLevel { get; set; } = BankIdAllowedRiskLevel.NoRiskLevel;

/// <summary>
/// Auto launch the BankID app on the current device.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.12.0" />
<PackageReference Include="Azure.Identity" Version="1.12.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private async Task<AuthRequest> GetAuthRequest(BankIdFlowOptions flowOptions)
{
var endUserIp = _bankIdEndUserIpResolver.GetEndUserIp();
var resolvedCertificatePolicies = GetResolvedCertificatePolicies(flowOptions);
var resolvedRiskLevel = flowOptions.AllowedRiskLevel.ToString().ToLower();
var resolvedRiskLevel = flowOptions.AllowedRiskLevel == Risk.BankIdAllowedRiskLevel.NoRiskLevel ? null : flowOptions.AllowedRiskLevel.ToString().ToLower();

var authRequestRequirement = new Requirement(resolvedCertificatePolicies, resolvedRiskLevel, flowOptions.RequirePinCode, flowOptions.RequireMrtd);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@ public enum BankIdAllowedRiskLevel
/// <summary>
/// Accept low and moderate risk orders
/// </summary>
Moderate
Moderate,

/// <summary>
/// No risk level is set and the BankID service will not block any order regardless of the risk indication.
/// </summary>
NoRiskLevel
}
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageId>$(AssemblyName)</PackageId>

<VersionPrefix>10.0.0</VersionPrefix>
<VersionSuffix>rc-2</VersionSuffix>
<!--<VersionSuffix>rc-2</VersionSuffix>-->
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<FileVersion Condition="'$(BUILD_BUILDNUMBER)' == ''">$(VersionPrefix).0</FileVersion>
<FileVersion Condition="'$(BUILD_BUILDNUMBER)' != ''">$(VersionPrefix).$(BUILD_BUILDNUMBER)</FileVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<PackageReference Include="AngleSharp" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.8" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ private async Task<List<Claim>> TransformClaims(BankIdClaimsTransformationContex

private void AssertClaim(List<Claim> claims, string type, string value)
{
Assert.NotEmpty(claims.Where(x => x.Type == type && x.Value == value));
Assert.Contains(claims, x => x.Type == type && x.Value == value);
}

private void AssertNoClaim(List<Claim> claims, string type)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@


<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit 94c6ef3

Please sign in to comment.