Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .azuredevops/pipelines/build-dr-func-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ steps:
# Tests have passed, so now build/publish the azure function

- task: UseDotNet@2
displayName: 'Install .NET 8 SDK'
displayName: 'Install .NET 10 SDK'
inputs:
packageType: 'sdk'
version: '8.0.x'
version: '10.0.x'
performMultiLevelLookup: true

- script: |
Expand Down
4 changes: 2 additions & 2 deletions .azuredevops/pipelines/build-dr-func.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ pool:

steps:
- task: UseDotNet@2
displayName: 'Install .NET 8 SDK'
displayName: 'Install .NET 10 SDK'
inputs:
packageType: 'sdk'
version: '8.0.x'
version: '10.0.x'
performMultiLevelLookup: true

- script: |
Expand Down
12 changes: 9 additions & 3 deletions .azuredevops/pipelines/build-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ jobs:
docker compose --file $(baseSourceDirectory)/docker-compose.E2ETests.Standalone.yml down
displayName: 'E2E Tests (Standalone) - Down'
condition: always()

- task: UseDotNet@2
displayName: 'Install .NET 8 Runtime for TrxToExtentReport'
inputs:
packageType: 'runtime'
version: '8.0.x'

# Run trx formatter to output .MD and .CSV
- script: |
Expand Down Expand Up @@ -389,18 +395,18 @@ jobs:
###################################################################################################

- task: UseDotNet@2
displayName: "Use .NET 8 sdk"
displayName: "Use .NET 10 sdk"
condition: always()
inputs:
packageType: sdk
version: "8.0.x"
version: "10.0.x"
performMultiLevelLookup: true

- task: CmdLine@2
displayName: "Install dotnet-ef"
condition: always()
inputs:
script: "dotnet tool install --version 8.0.4 --global dotnet-ef"
script: "dotnet tool install --version 10.0.10 --global dotnet-ef"

- task: CmdLine@2
displayName: "Check dotnet-ef version"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:

- name: Build solution
run: |
dotnet build ./Source/CdrAuthServer.sln --configuration 'Release'
dotnet build ./Source/CdrAuthServer.slnx --configuration 'Release'

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ jobs:
shell: powershell
run: |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"ConsumerDataRight_authorisation-server" /o:"consumerdataright" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
dotnet build .\source\CdrAuthServer.sln
dotnet build .\source\CdrAuthServer.slnx
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [3.2.0] - 2026-09-30
### Fixed
- Updated NuGet packages

### Changed
- Updated to use .NET 10 version of ConsumerDataRight.ParticipantTooling.MockSolution.TestAutomation
- Migrated from .NET 8 to .NET 10
- Migrated from SLN to SLNX

## [3.1.0] - 2026-06-01
### Changed
- Migrated CDR Auth Server Standalone (CdrAuthServer.UI) from CRA to Vite
Expand Down
2 changes: 1 addition & 1 deletion Help/azurefunctions/HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ SELECT * FROM [cdr-auth-server].[dbo].[LogEvents-DrService]

<h2>To Build Azure Functions</h2>
<div style="margin-left:18px;">
dotnet SDK 8.0.10x or higher is required. Latest SDK can be found from the link https://microsoft.com/net
dotnet SDK 10.0.x or higher is required. Latest SDK can be found from the link https://microsoft.com/net
<br />
4 changes: 2 additions & 2 deletions Help/debugging/HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Authentication: Windows Authentication
### Start the Authorisation Server

There are two Visual Studio solution files that are available for use:
- CdrAuthServer.sln - This is the default solution file that is used primarily for running and debugging the Authorisation Server projects.
- CdrAuthServer_Shared.sln - In addition to the Authorisation Server projects, this solution file also opens the [Mock Solutions Test Automation](https://github.com/ConsumerDataRight/mock-solution-test-automation) project. This is useful when wanting to debug or step through source code used in Mock Solution Test Automation project. Further information can be found in [Authorisation Server Test Automation Execution Guide](../testing/HELP.md)
- CdrAuthServer.slnx - This is the default solution file that is used primarily for running and debugging the Authorisation Server projects.
- CdrAuthServer_Shared.slnx - In addition to the Authorisation Server projects, this solution file also opens the [Mock Solutions Test Automation](https://github.com/ConsumerDataRight/mock-solution-test-automation) project. This is useful when wanting to debug or step through source code used in Mock Solution Test Automation project. Further information can be found in [Authorisation Server Test Automation Execution Guide](../testing/HELP.md)

To launch the application using MS Visual Studio, the following projects need to be started:
```
Expand Down
4 changes: 2 additions & 2 deletions Help/testing/HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Tests can now be run using Microsoft Visual Studio.

The following steps detail the process of running tests using Microsoft Visual Studio's Test Explorer:

1. Open the [CdrAuthServer.sln](../../Source/CdrAuthServer.sln) solution file in Microsoft Visual Studio.
1. Open the [CdrAuthServer.slnx](../../Source/CdrAuthServer.slnx) solution file in Microsoft Visual Studio.
2. Build the solution.
3. Open the Test Explorer. If Test Explorer is not visible, choose 'Test' on the Visual Studio menu and then choose 'Test Explorer'.

Expand All @@ -191,7 +191,7 @@ This repository can be cloned using following command:
git clone https://github.com/ConsumerDataRight/mock-solution-test-automation.git
```

The [CdrAuthServer_Shared.sln](../../Source/CdrAuthServer_Shared.sln) solution has been created to allow for debugging and stepping through the source code used in Mock Solution Test Automation project.
The [CdrAuthServer_Shared.slnx](../../Source/CdrAuthServer_Shared.slnx) solution has been created to allow for debugging and stepping through the source code used in Mock Solution Test Automation project.

[<img src="./images/MS-Visual-Studio-View-Cdr-Auth-Server-Shared-Solution.png" width='400' alt="Authorisation Server Shared Solution in Microsoft Visual Studio"/>](./images/MS-Visual-Studio-View-Cdr-Auth-Server-Shared-Solution.png)

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![Consumer Data Right Logo](./Assets/cdr-logo.png?raw=true)

[![Consumer Data Standards v1.34.0](https://img.shields.io/badge/Consumer%20Data%20Standards-v1.34.0-blue.svg)](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#introduction)
[![Conformance Test Suite Data Recipients 4.4.0](https://img.shields.io/badge/Conformance%20Test%20Suite%20Data%20Recipients-v4.4.0-darkblue.svg)](https://www.cdr.gov.au/for-providers/conformance-test-suite-data-recipients)
[![Consumer Data Standards v1.36.0](https://img.shields.io/badge/Consumer%20Data%20Standards-v1.36.0-blue.svg)](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.36.0/#introduction)
[![Conformance Test Suite Data Recipients 4.5.0](https://img.shields.io/badge/Conformance%20Test%20Suite%20Data%20Recipients-v4.5.0-darkblue.svg)](https://www.cdr.gov.au/for-providers/conformance-test-suite-data-recipients)
[![FAPI 1.0 Advanced Profile](https://img.shields.io/badge/FAPI%201.0-orange.svg)](https://openid.net/specs/openid-financial-api-part-2-1_0.html)
[![made-with-dotnet](https://img.shields.io/badge/Made%20with-.NET-1f425Ff.svg)](https://dotnet.microsoft.com/)
[![made-with-csharp](https://img.shields.io/badge/Made%20with-C%23-1f425Ff.svg)](https://docs.microsoft.com/en-us/dotnet/csharp/)
Expand All @@ -16,8 +16,8 @@ The project is used in the Participant Tooling Authorisation Server, providing t
## Authorisation Server - Alignment
The Authorisation Server:

- aligns to [v1.34.0](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#introduction) of the [Consumer Data Standards](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#introduction) in particular [FAPI 1.0 Migration Phase 4](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#introduction) with backwards compatibility to Migration Phase 2 and 3;
- has passed v4.4.0 of the [Conformance Test Suite for Data Recipients](https://www.cdr.gov.au/for-providers/conformance-test-suite-data-recipients);
- aligns to [v1.36.0](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.36.0/#introduction) of the [Consumer Data Standards](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#introduction) in particular [FAPI 1.0 Migration Phase 4](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.36.0/#introduction) with backwards compatibility to Migration Phase 2 and 3;
- has passed v4.5.0 of the [Conformance Test Suite for Data Recipients](https://www.cdr.gov.au/for-providers/conformance-test-suite-data-recipients);
and
- is certified with the [FAPI 1.0 Advanced Profile](https://openid.net/specs/openid-financial-api-part-2-1_0.html) .

Expand Down Expand Up @@ -146,7 +146,7 @@ The Authorisation Server contains the following components:

## Technology Stack
The following technologies have been used to build the Authorisation Server:
- The source code has been written in `C#` using the `.Net 8` framework.
- The source code has been written in `C#` using the `.Net 10` framework.
- The mTLS Gateway has been implemented using `Ocelot`.
- The Repository utilises a `SQL` instance.
- `xUnit` is the framework used for writing and running tests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
.ForContext("RequestMethod", _requestMethod)
.ForContext("RequestHost", _requestHost)
.ForContext("RequestIpAddress", _requestIpAddress)
.ForContext("RequestBody", _requestBody)

Check warning

Code scanning / CodeQL

Log entries created from user input Medium

This log entry depends on a
user-provided value
.
.ForContext("RequestHeaders", _requestHeaders)
.ForContext("RequestPath", _requestPath)
.ForContext("RequestQueryString", _requestQueryString)
Expand All @@ -98,7 +98,7 @@
{
context.Request.EnableBuffering();
await using var requestStream = _recyclableMemoryStreamManager.GetStream();
await context.Request.Body.CopyToAsync(requestStream);
await context.Request.Body.CopyToAsync(requestStream, context.RequestAborted);

_requestBody = ReadStreamInChunks(requestStream);
context.Request.Body.Position = 0;
Expand Down Expand Up @@ -289,7 +289,7 @@
_elapsedTime = sw.ElapsedMilliseconds.ToString();

responseBody.Seek(0, SeekOrigin.Begin);
_responseBody = await new StreamReader(responseBody).ReadToEndAsync();
_responseBody = await new StreamReader(responseBody).ReadToEndAsync(httpContext.RequestAborted);
responseBody.Seek(0, SeekOrigin.Begin);

IEnumerable<string> keyValues = httpContext.Response.Headers.Keys.Select(key => key + ": " + string.Join(",", httpContext.Response.Headers[key].ToArray()));
Expand All @@ -301,7 +301,7 @@

// This is for middleware hooked before us to see our changes.
// Otherwise the original stream would be seen which cannot be read again.
await responseBody.CopyToAsync(originalBodyStream);
await responseBody.CopyToAsync(originalBodyStream, httpContext.RequestAborted);
}
}

Expand Down
5 changes: 3 additions & 2 deletions Source/CdrAuthServer.E2ETests/BaseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#undef TEST_DEBUG_MODE
#endif

using CdrAuthServer.E2ETests.XUnit.Orderers;
using ConsumerDataRight.ParticipantTooling.MockSolution.TestAutomation;
using Microsoft.Extensions.Configuration;
using Xunit;
Expand All @@ -14,11 +15,11 @@ namespace CdrAuthServer.E2ETests
{
// Put all tests in same collection because we need them to run sequentially since some tests are mutating DB.
[Collection("E2ETests")]
[TestCaseOrderer("CdrAuthServer.E2ETests.XUnit.Orderers.AlphabeticalOrderer", "CdrAuthServer.E2ETests")]
[TestCaseOrderer(typeof(AlphabeticalOrderer))]
public abstract class BaseTest : SharedBaseTest
{
protected BaseTest(ITestOutputHelperAccessor testOutputHelperAccessor, IConfiguration config)
: base(testOutputHelperAccessor, config)
: base(config)
{
}
}
Expand Down
3 changes: 3 additions & 0 deletions Source/CdrAuthServer.E2ETests/CdrAuthServer.E2ETests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>$(TargetFrameworkVersion)</TargetFramework>
<OutputType>Exe</OutputType>
<Version>$(Version)</Version>
<FileVersion>$(Version)</FileVersion>
<AssemblyVersion>$(Version)</AssemblyVersion>
Expand Down Expand Up @@ -35,6 +36,8 @@
</Choose>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit.v3" />
<PackageReference Include="Xunit.DependencyInjection" />
<PackageReference Include="Serilog.Sinks.Async">
<TreatAsUsed>true</TreatAsUsed>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -611,12 +611,12 @@ public static (string ExpectedHeading, string ExpectedDetail) GetExpectedCluster
}
}

public Task InitializeAsync()
public ValueTask InitializeAsync()
{
return Task.CompletedTask;
return ValueTask.CompletedTask;
}

public async Task DisposeAsync()
public async ValueTask DisposeAsync()
{
if (_browserContext != null)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
using System.Collections.Generic;
using System.Linq;
using Xunit.Abstractions;
using Xunit.Sdk;
using Xunit.v3;

namespace CdrAuthServer.E2ETests.XUnit.Orderers
{
public class AlphabeticalOrderer : ITestCaseOrderer
{
public IEnumerable<TTestCase> OrderTestCases<TTestCase>(IEnumerable<TTestCase> testCases)
where TTestCase : ITestCase
=>
testCases.OrderBy(testCase => testCase.TestMethod.Method.Name);
IReadOnlyCollection<TTestCase> ITestCaseOrderer.OrderTestCases<TTestCase>(
IReadOnlyCollection<TTestCase> testCases)
{
return testCases.OrderBy(tc => ExtractTestName(tc)).ToList().AsReadOnly();
}

private static string ExtractTestName(ITestCase testCase)
{
var testMethod = testCase?.TestMethod;
if (testMethod is ITestMethodMetadata testMethodMetadata)
{
return testMethodMetadata.MethodName ?? string.Empty;
}

return string.Empty;
}
}
}
2 changes: 1 addition & 1 deletion Source/CdrAuthServer.E2ETests/appsettings.Development.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Serilog": {
"Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Sinks.XUnit", "Serilog.Sinks.Async" ],
"Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Sinks.Async" ],
"MinimumLevel": {
"Default": "Debug"
},
Expand Down
2 changes: 1 addition & 1 deletion Source/CdrAuthServer.E2ETests/appsettings.Release.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Serilog": {
"Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Sinks.XUnit", "Serilog.Sinks.Async" ],
"Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Sinks.Async" ],
"MinimumLevel": {
"Default": "Information"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
using System.Configuration;
using System.IO;
using CdrAuthServer.GetDataRecipients.IntegrationTests.Fixtures;
using CdrAuthServer.GetDataRecipients.IntegrationTests.XUnit.Orderers;
using Microsoft.Extensions.Configuration;
using Xunit;

namespace CdrAuthServer.GetDataRecipients.IntegrationTests
{
// Put all tests in same collection because we need them to run sequentially since some tests are mutating DB.
[Collection("IntegrationTests")]
[TestCaseOrderer("CdrAuthServer.GetDataRecipients.IntegrationTests.XUnit.Orderers.AlphabeticalOrderer", "CdrAuthServer.GetDataRecipients.IntegrationTests")]
[TestCaseOrderer(typeof(AlphabeticalOrderer))]
[DisplayTestMethodName]
public abstract class BaseTest : IClassFixture<TestFixture>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>$(TargetFrameworkVersion)</TargetFramework>
<OutputType>Exe</OutputType>
<Version>$(Version)</Version>
<FileVersion>$(Version)</FileVersion>
<AssemblyVersion>$(Version)</AssemblyVersion>
Expand All @@ -22,9 +23,11 @@
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Microsoft.Data.SqlClient" />
<PackageReference Include="Microsoft.Extensions.Configuration" />
<PackageReference Include="System.Configuration.ConfigurationManager" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -33,7 +36,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" />
<PackageReference Include="xunit.v3" />
<PackageReference Include="xunit.runner.visualstudio">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,20 @@
using System.Reflection;
using CdrAuthServer.GetDataRecipients.IntegrationTests.Fixtures;
using Microsoft.Extensions.Configuration;
using Xunit;
using Xunit.Sdk;
using Xunit.v3;

namespace CdrAuthServer.GetDataRecipients.IntegrationTests
{
internal class DisplayTestMethodNameAttribute : BeforeAfterTestAttribute
{
private static int count = 0;

public override void Before(MethodInfo methodUnderTest)
public override void Before(MethodInfo methodUnderTest, IXunitTest test)
{
Console.WriteLine($"Test #{++count} - {methodUnderTest.DeclaringType?.Name}.{methodUnderTest.Name}");
}

public override void After(MethodInfo methodUnderTest)
public override void After(MethodInfo methodUnderTest, IXunitTest test)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
using Xunit;

namespace CdrAuthServer.GetDataRecipients.IntegrationTests.Fixtures
{
public class TestFixture : IAsyncLifetime
{
public Task InitializeAsync()
public ValueTask InitializeAsync()
{
return Task.CompletedTask;
return ValueTask.CompletedTask;
}

public Task DisposeAsync()
public ValueTask DisposeAsync()
{
return Task.CompletedTask;
return ValueTask.CompletedTask;
}
}
}
Loading
Loading