Skip to content

Commit f95e1ff

Browse files
elinohlssonElin Fokine
andauthored
Release v 12.0.0-beta.1 (#538)
* Update version number. * Documented breaking changes from version 12.0.0. * Update the docs about overriding X509KeyStorageFlags. * Added documentation about overriding X509KeyStorageFlags when loading client certificate from key vault. * Add links to documentation from release notes. --------- Co-authored-by: Elin Fokine <ElinO@activesolution.se>
1 parent f69037a commit f95e1ff

3 files changed

Lines changed: 64 additions & 10 deletions

File tree

BREAKINGCHANGES.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ ___Note:___ We might, and will probably, miss to document some of this - if so -
77

88
## TOC
99

10+
* [Version 12.0.0](#version-1200)
1011
* [Version 11.0.0](#version-1100)
1112
* [Version 10.0.0](#version-1000)
1213
* [Version 9.0.0](#version-900)
@@ -17,8 +18,31 @@ ___Note:___ We might, and will probably, miss to document some of this - if so -
1718
* [Version 5.0.0](#version-500)
1819
* [Version 4.0.0](#version-400)
1920

20-
---
21+
------
22+
23+
## Version 12.0.0
24+
25+
Breaking changes between version 11.0.0 and 12.0.0
26+
27+
### Upgrade to .NET 10
28+
29+
Active Login now requires **.NET 10**.
30+
31+
If you are upgrading from an earlier version, you must update any application or website using Active Login to target .NET 10.
32+
33+
### Embedded BankID certificates
2134

35+
When loading embedded BankID certificates (client test certificate and root certificates for both test and production), we now use `X509KeyStorageFlags.DefaultKeySet` by default.
36+
37+
If this change causes issues in your environment, you can override the `X509KeyStorageFlags` used for the client test certificate. See [the documention](https://docs.activelogin.net/articles/bankid.html#test-environment) for information about how it is done.
38+
39+
### Loading client BankID certificate from Azure Key Vault
40+
41+
When loading the client BankID certificate from Azure Key Vault, we now use `X509KeyStorageFlags.DefaultKeySet` by default.
42+
43+
If this causes issues in your environment, it is possible to override the `X509KeyStorageFlags` used when loading the certificate. See [the documention](https://docs.activelogin.net/articles/bankid.html#using-client-certificate-from-azure-keyvault) for information about how it is done.
44+
45+
---
2246

2347
## Version 11.0.0
2448

@@ -110,7 +134,7 @@ We have renamed these things as a result of that:
110134
* `AddCustomAppCallback` becomes `AddCustomBrowser`
111135
* `AddCustomAppCallbackByUserAgent` becomes `AddCustomBrowserByUserAgent`
112136

113-
### Upgrade to .NET 7
137+
### Upgrade to .NET 8
114138

115139
We now require .NET 8 - so this requires you to upgrade your website that uses Active Login.
116140

docs/articles/bankid.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,6 @@ This will use the real REST API for BankID, connecting to the Test environment.
216216

217217
It will automatically register both the root and client certificate, even though this behaviour can be disabled. A scenario might be that you want to use the same flow for both test and prod and therefore make sure that fetching the certificate from KeyVault works by trying that out for test. It could also be useful if you are running an older version of Active Login which contains an expired version of the test certificate. You can then disable using the embedded, expired certificate and provide the valid test certificate yourself.
218218

219-
BankId provides the client certificate for the test environment in three different versions FPTestcert5_20240610.p12, FPTestcert5_20240610.pem and FPTestcert5_20240610-legacy.pfx. Use `FPTestcert5_20240610.p12` for newer applications and environments that support modern encryption methods. Use `FPTestcert5_20240610.pem` if your application requires PEM format. Use `FPTestcert5_20240610-legacy.pfx ` for older applications requiring older algorithms such as Windows Server earlier versions than 2022. The format of the client certificate can be configured. By default `FPTestcert5_20240610-legacy.pfx `is used.
220-
221219
```csharp
222220
services
223221
.AddBankId(bankId =>
@@ -226,7 +224,7 @@ services
226224
});
227225
```
228226

229-
Disable adding the certificates:
227+
#### Disable adding the certificates
230228

231229
```csharp
232230
services
@@ -236,7 +234,9 @@ services
236234
});
237235
```
238236

239-
Specify client certificate format:
237+
#### Specify client certificate format
238+
239+
BankId provides the client certificate for the test environment in three different versions FPTestcert5_20240610.p12, FPTestcert5_20240610.pem and FPTestcert5_20240610-legacy.pfx. Use `FPTestcert5_20240610.p12` for newer applications and environments that support modern encryption methods. Use `FPTestcert5_20240610.pem` if your application requires PEM format. Use `FPTestcert5_20240610-legacy.pfx ` for older applications requiring older algorithms such as Windows Server earlier versions than 2022. The format of the client certificate can be configured. By default `FPTestcert5_20240610-legacy.pfx `is used.
240240

241241
```csharp
242242
services
@@ -246,6 +246,23 @@ services
246246
});
247247
```
248248

249+
#### Override default X509KeyStorageFlags
250+
251+
By default, `X509KeyStorageFlags.DefaultKeySet` is used when loading the embedded client certificate for the test environment.
252+
253+
If this default does not work in your environment, it is possible to override the `X509KeyStorageFlags` used when loading the certificate. This allows you to configure certificate handling in a way that is compatible with your specific hosting or security requirements.
254+
255+
```csharp
256+
services
257+
.AddBankId(bankId =>
258+
{
259+
bankId.UseTestEnvironment(
260+
keyStorageFlags: X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.Exportable
261+
);
262+
});
263+
```
264+
265+
249266
### Production environment
250267

251268
This will use the real REST API for BankID, connecting to the Production environment. It requires you to have the client certificates described under _Preparation_ above.
@@ -513,6 +530,19 @@ services.AddBankId(bankId =>
513530
});
514531
```
515532

533+
By default, `X509KeyStorageFlags.DefaultKeySet` is used when loding the client Certificate from Azure Key Vault.
534+
535+
If this does not work in your environment, it is possible to override the `X509KeyStorageFlags` used when loading the certificate. This allows you to configure certificate handling in a way that is compatible with your specific hosting or security requirements.
536+
537+
```csharp
538+
services.AddBankId(bankId =>
539+
{
540+
bankId
541+
.UseProductionEnvironment()
542+
.UseClientCertificateFromAzureKeyVault(configuration.GetSection("ActiveLogin:BankId:ClientCertificate"), X509KeyStorageFlags.EphemeralKeySet)
543+
...
544+
});
545+
```
516546

517547
### Using client certificate from custom source
518548

src/Directory.Build.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414

1515
<PackageId>$(AssemblyName)</PackageId>
1616

17-
<VersionPrefix>11.1.3</VersionPrefix>
18-
<!--<VersionSuffix>rc-1</VersionSuffix>-->
19-
<AssemblyVersion>10.0.0.0</AssemblyVersion>
17+
<VersionPrefix>12.0.0</VersionPrefix>
18+
<VersionSuffix>beta.1</VersionSuffix>
19+
<AssemblyVersion>12.0.0.0</AssemblyVersion>
2020
<FileVersion Condition="'$(BUILD_BUILDNUMBER)' == ''">$(VersionPrefix).0</FileVersion>
2121
<FileVersion Condition="'$(BUILD_BUILDNUMBER)' != ''">$(VersionPrefix).$(BUILD_BUILDNUMBER)</FileVersion>
2222

2323
<Authors>Active Solution;Peter Örneholm;Elin Fokine;Tobias Lolax;Marcus Abrahamsson</Authors>
2424
<Company>Active Solution</Company>
25-
<Copyright>Copyright © 2018-2024 Active Solution</Copyright>
25+
<Copyright>Copyright © 2018-2026 Active Solution</Copyright>
2626

2727
<PackageProjectUrl>https://github.com/ActiveLogin/ActiveLogin.Authentication</PackageProjectUrl>
2828
<PackageIcon>icon.png</PackageIcon>

0 commit comments

Comments
 (0)