Skip to content

Commit d6908ae

Browse files
CDR-AakashJCDR-CI
andauthored
v3.0.4 release (#28)
Co-authored-by: CDR Open Source <opensource@cdr.gov.au>
1 parent f2d871e commit d6908ae

File tree

30 files changed

+1223
-747
lines changed

30 files changed

+1223
-747
lines changed

.azuredevops/pipelines/build-dr-func.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ trigger:
33
- main
44
- releases/*
55

6+
variables:
7+
- group: PT-Pipeline-Common
8+
69
pool:
7-
vmImage: windows-latest
10+
vmImage: $(Pipeline_Host_Image)
811

912
steps:
1013
- task: UseDotNet@2

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,25 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6-
76
## [Unreleased]
87

8+
## [3.0.4] - 2025-12-10
9+
### Changed
10+
- Update to Central Package Management (CPM)
11+
12+
## [3.0.3] - 2025-12-03
13+
### Changed
14+
- Updated NuGet packages to address vulnerabilities
15+
16+
## [3.0.2] - 2025-10-15
17+
### Changed
18+
- Added ability to handle multiple Issuing Certificate Authorities when checking certificate revocation status
19+
### Added
20+
- Enabled OpenTelemetry as a logging destination
21+
22+
### Fixed
23+
- Ocsp Responder Url retrieval can now parse a larger range of Certificate Authority Info Access structures
24+
925
## [3.0.1] - 2025-06-19
1026

1127
### Changed

Help/container/HELP.md

Lines changed: 64 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,67 @@
1-
<h2>Use the pre-built image for this solution</h2>
2-
3-
<br />
4-
<p>1. Pull the latest image from <a href="https://hub.docker.com/r/consumerdataright/authorisation-server" title="Download the container from docker hub here" alt="Download the container from docker hub here">Docker Hub</a></p>
5-
6-
<span style="display:inline-block;margin-left:1em;">
7-
docker pull consumerdataright/authorisation-server
8-
</span>
9-
10-
<br />
11-
<p>2. Run the Authorisation Server container</p>
12-
13-
<span style="display:inline-block;margin-left:1em;">
14-
docker run -d -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=Pa{}w0rd2019" -p 1433:1433 --name mssql -h sql1 -d mcr.microsoft.com/mssql/server:2022-latest
15-
docker run -d -h authorisation-server -p 8001:8001 -p 3000:3000 --add-host=mssql:host-gateway --name authorisation-server consumerdataright/authorisation-server<br \>
16-
<br \><br \>
17-
Please note - This docker compose file utilises the Microsoft SQL Server Image from Docker Hub.<br \>
18-
The Microsoft EULA for the Microsoft SQL Server Image must be accepted to continue.<br \>
19-
See the Microsoft SQL Server Image on Docker Hub for more information.<br \>
20-
Using the above command from a MS Windows command prompt will run the database.<br \>
21-
</span>
22-
23-
<br />
24-
25-
<span style="display:inline-block;margin-left:1em;margin-top:10px;margin-bottom:10px;">
26-
How to build your own image instead of downloading it from docker hub.<br \>
27-
navigate to .\authorisation-server\Source<br \>
28-
open a command prompt and execute the following;<br \>
29-
docker build -f Dockerfile.standalone -t authorisation-server .<br \>
30-
Please note - By default, the container above will be using a MS SQL database container, using this command from a MS Windows command prompt will run the database,<br \>
31-
docker run -d -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=Pa{}w0rd2019" -p 1433:1433 --name mssql -h sql1 -d mcr.microsoft.com/mssql/server:2022-latest
32-
docker run -d -h authorisation-server -p 8001:8001 -p 3000:3000 --add-host=mssql:host-gateway --name authorisation-server authorisation-server<br \><br \>
33-
</span>
34-
35-
<span style="display:inline-block;margin-left:1em;margin-top:10px;margin-bottom:10px;">
36-
You can connect to the MS SQL database container from MS Sql Server Management Studio (SSMS) using
37-
the following settings; <br />
38-
Server type: Database Engine <br />
39-
Server name: localhost <br />
40-
Authentication: SQL Server Authentication <br />
41-
Login: sa <br />
42-
Password: Pa{}w0rd2019 <br />
43-
</span>
44-
<br />
1+
## Use the pre-built image for this solution
2+
3+
1. Pull the latest [consumerdataright/authorisation-server](https://hub.docker.com/r/consumerdataright/authorisation-server) image from Docker Hub.
4+
```shell
5+
docker pull consumerdataright/authorisation-server
6+
```
7+
8+
2. Start the MSSQL server by executing the following command
9+
> *The instructions below include starting an instance of the Microsoft SQL Server. This includes an EULA which the following command accepts. Please refer to the documentation for the [mssql/server](https://hub.docker.com/r/microsoft/mssql-server/#environment-variables) image for more details.*
10+
```shell
11+
docker run -d -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=Pa{}w0rd2019" -p 1433:1433 --name mssql -h sql1 -d mcr.microsoft.com/mssql/server:2022-latest
12+
```
13+
14+
3. Run the Authorisation Server (from image)
15+
```shell
16+
# run the authorisation server
17+
docker run -d -h authorisation-server -p 8001:8001 -p 3000:3000 --add-host=mssql:host-gateway --name authorisation-server consumerdataright/authorisation-server
18+
```
19+
20+
## Build your own image for this solution
21+
To build your own image instead of using a pre-built one from Docker Hub
22+
1. Open a command prompt with the working directory set to the [Source](../../Source/) folder under this repository on your local file system
23+
2. Build the image by executing the following command
24+
```shell
25+
docker build -f Dockerfile.standalone -t authorisation-server .
26+
```
27+
3. Start the MSSQL server by executing the following command
28+
> *The instructions below include starting an instance of the Microsoft SQL Server. This includes an EULA which the following command accepts. Please refer to the documentation for the [mssql/server](https://hub.docker.com/r/microsoft/mssql-server/#environment-variables) image for more details.*
29+
```shell
30+
docker run -d -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=Pa{}w0rd2019" -p 1433:1433 --name mssql -h sql1 -d mcr.microsoft.com/mssql/server:2022-latest
31+
```
32+
4. Start the Authorisation Server by executing the following command
33+
```shell
34+
docker run -d -h authorisation-server -p 8001:8001 -p 3000:3000 --add-host=mssql:host-gateway --name authorisation-server authorisation-server
35+
```
36+
37+
## Connecting to the database
38+
> Both approaches leverage a MS SQL database for storage. In the examples below we use [MS SQL Server Management Studio (SMSS)](https://learn.microsoft.com/en-us/ssms/), but the approach should be similar for other tooling.
39+
40+
You will need the following authentication details:
41+
| | |
42+
| -- | -- |
43+
| Server type | Database Engine |
44+
| Server name | localhost |
45+
| Authentication | SQL Server Authentication |
46+
| Login | `sa` |
47+
| Password | `Pa{}w0rd2019` |
48+
49+
Should you opt to use another tool, then the following would be useful
50+
51+
| | |
52+
| -- | -- |
53+
| Connection String | `Server=localhost;Database=cdr-auth-server;User Id='SA';Password='Pa{}w0rd2019';MultipleActiveResultSets=True;TrustServerCertificate=True;Encrypt=False` |
54+
55+
56+
> If the below error occurs whilst trying to connect to the MS SQL container, the SQL Server Service MUST BE STOPPED, you can do this from SQL Server Manager
4557
4658
[<img src="./images/ssms-login-error.png" height='300' width='400' alt="SSMS Login Error"/>](./images/ssms-login-error.png)
4759

48-
<p>
49-
(NB: if the above error occurs whilst trying to connect to the MS SQL container, the SQL Server Service MUST BE STOPPED, you can do this from SQL Server Manager)
50-
</p>
60+
## Logging
61+
Once you have connected to the `cdr-auth-server` database above you can view the various database tables that contain logs or view the console output using the following command.
62+
63+
```shell
64+
docker logs authorisation-server
65+
```
66+
67+
Optionally, logging to OpenTelemetry compatible destinations is also supported by modifying the `docker run` commands to supply additional environment variables. Additional guidance can be found in the [readme](../../README.md#logging) file.

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,24 @@ The information below lists the customisation required for each endpoint:
232232
# Testing
233233
Automated tests have been created as part of this solution. See the [Test Automation Execution Guide](./Help/testing/HELP.md) documentation for more information.
234234

235+
# Logging
236+
By default the application logs to console as well as into tables within the application database.
237+
238+
However, OpenTelemetry can be configured by setting the [environment variables](https://opentelemetry.io/docs/specs/otel/protocol/exporter/#configuration-options) appropriately.
239+
240+
> The example below uses [Seq](https://datalust.co/seq) for simplicity, we do not endorse any particular product. Choose an [OpenTelemetry vendor](https://opentelemetry.io/ecosystem/vendors/) is suitable for your needs.
241+
242+
For example, you may set up a local OTLP ingestion endpoint
243+
`docker run -e ACCEPT_EULA=Y --rm -p 4318:80 5341:5341 datalust/seq`
244+
and then set the following
245+
246+
| Environment variable | Value |
247+
| --- | --- |
248+
| `OTEL_EXPORTER_OTLP_ENDPOINT` | `http://localhost:5341/ingest/otlp` |
249+
| `OTEL_EXPORTER_OTLP_PROTOCOL` | `http/protobuf` |
250+
251+
After which you should be able to [view telemetry](http://localhost:4318/).
252+
235253
# Contribute
236254
We encourage contributions from the community. See our [contributing guidelines](./CONTRIBUTING.md).
237255

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
32
<PropertyGroup>
4-
<TargetFramework>$(TargetFrameworkVersion)</TargetFramework>
5-
<Version>$(Version)</Version>
6-
<FileVersion>$(Version)</FileVersion>
7-
<AssemblyVersion>$(Version)</AssemblyVersion>
3+
<TargetFramework>$(TargetFrameworkVersion)</TargetFramework>
4+
<Version>$(Version)</Version>
5+
<FileVersion>$(Version)</FileVersion>
6+
<AssemblyVersion>$(Version)</AssemblyVersion>
87
<ImplicitUsings>enable</ImplicitUsings>
98
<Nullable>enable</Nullable>
10-
<GenerateDocumentationFile>True</GenerateDocumentationFile>
9+
<GenerateDocumentationFile>True</GenerateDocumentationFile>
1110
</PropertyGroup>
12-
1311
<ItemGroup>
14-
<PackageReference Include="Azure.Identity" Version="1.13.2" />
15-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.7" />
16-
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.2" />
17-
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
18-
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
19-
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.2" />
20-
<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="7.0.0" />
21-
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.32.0.97167">
12+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
13+
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" />
14+
<PackageReference Include="Serilog.Settings.Configuration" />
15+
<PackageReference Include="Serilog.Sinks.MSSqlServer">
16+
<TreatAsUsed>true</TreatAsUsed>
17+
</PackageReference>
18+
<PackageReference Include="SonarAnalyzer.CSharp">
19+
<PrivateAssets>all</PrivateAssets>
20+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
21+
</PackageReference>
22+
<PackageReference Include="StyleCop.Analyzers.Unstable">
2223
<PrivateAssets>all</PrivateAssets>
2324
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2425
</PackageReference>
25-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
26-
<PrivateAssets>all</PrivateAssets>
27-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
28-
</PackageReference>
29-
<PackageReference Include="System.Text.Json" Version="8.0.5" />
30-
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
3126
</ItemGroup>
32-
33-
</Project>
27+
</Project>
Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>$(TargetFrameworkVersion)</TargetFramework>
4-
<Version>$(Version)</Version>
5-
<FileVersion>$(Version)</FileVersion>
6-
<AssemblyVersion>$(Version)</AssemblyVersion>
7-
<ImplicitUsings>enable</ImplicitUsings>
8-
<Nullable>enable</Nullable>
3+
<TargetFramework>$(TargetFrameworkVersion)</TargetFramework>
4+
<Version>$(Version)</Version>
5+
<FileVersion>$(Version)</FileVersion>
6+
<AssemblyVersion>$(Version)</AssemblyVersion>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<Nullable>enable</Nullable>
99
</PropertyGroup>
1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
12-
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.7" />
13-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
14-
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
15-
<PackageReference Include="System.Collections" Version="4.3.0" />
16-
<PackageReference Include="System.Diagnostics.Debug" Version="4.3.0" />
17-
<PackageReference Include="System.IO" Version="4.3.0" />
18-
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
19-
<PackageReference Include="System.Runtime.Extensions" Version="4.3.1" />
20-
<PackageReference Include="System.Runtime.Handles" Version="4.3.0" />
21-
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
22-
<PackageReference Include="System.Text.Encodings.Web" Version="8.0.0" />
23-
<PackageReference Include="System.Text.Json" Version="8.0.5" />
24-
<PackageReference Include="System.Threading.Tasks" Version="4.3.0" />
11+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" />
2512
</ItemGroup>
26-
27-
</Project>
13+
</Project>

0 commit comments

Comments
 (0)