Skip to content

Commit 866463f

Browse files
committed
Refactor interfaces, update Azure Key Vault options, and improve code readability
1 parent 87edca1 commit 866463f

File tree

7 files changed

+55
-12
lines changed

7 files changed

+55
-12
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ docker compose -f ./infrastructure-security.yml --env-file ./.env --project-name
8282
# Use this file only in case you want to setup sqlserver database (no need if you use postgres)
8383
docker compose -f ./infrastructure-sqlserver.yml --env-file ./.env --project-name genocs up -d
8484

85+
# Use this file only in case you want to setup mySql database (no need if you use postgres)
86+
docker compose -f ./infrastructure-mysql.yml --env-file ./.env --project-name genocs up -d
87+
88+
# Use this file only in case you want to setup oracle database (no need if you use postgres)
89+
# docker compose -f ./infrastructure-oracle.yml --env-file ./.env --project-name genocs up -d
90+
91+
8592
# Use this file only in case you want to setup elk stack
8693
docker compose -f ./infrastructure-elk.yml --env-file ./.env --project-name genocs up -d
8794

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
services:
2+
mysqldb:
3+
image: mysql
4+
hostname: mysqldb
5+
container_name: mysqldb
6+
ports:
7+
- 3306:3306
8+
9+
environment:
10+
MYSQL_ROOT_PASSWORD: example
11+
volumes:
12+
- mysqlsystem:/var/lib/mysql
13+
networks:
14+
- genocs
15+
16+
networks:
17+
genocs:
18+
name: genocs-network
19+
external: true
20+
21+
volumes:
22+
mysqlsystem:
23+
driver: local

src/Genocs.Auth/Genocs.Auth.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
</ItemGroup>
5454

5555
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
56-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.*" />
57-
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.*" />
56+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.8" />
57+
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.8" />
5858
</ItemGroup>
5959

6060
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">

src/Genocs.Core.Demo.WebApi/Controllers/ExternalApiController.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ public class ExternalApiController : ControllerBase
1111
private readonly ILogger<DemoController> _logger;
1212
private readonly IExternalServiceClient _externalServiceClient;
1313

14-
public ExternalApiController(ILogger<DemoController> logger, IExternalServiceClient externalServiceClient)
14+
public ExternalApiController(
15+
ILogger<DemoController> logger,
16+
IExternalServiceClient externalServiceClient)
1517
{
1618
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
1719
_externalServiceClient = externalServiceClient ?? throw new ArgumentNullException(nameof(externalServiceClient));
@@ -24,6 +26,7 @@ public async Task<IActionResult> HomeAsync()
2426
=> await Task.Run(() => Ok("done"));
2527

2628
[HttpPost("")]
29+
[Produces("application/json")]
2730
[ProducesResponseType(typeof(IssuingResponse), StatusCodes.Status200OK)]
2831
[Consumes(MediaTypeNames.Application.Json)]
2932
public async Task<IActionResult> PostIssueAsync(IssuingRequest request)

src/Genocs.Secrets.AzureKeyVault/Configurations/AzureKeyVaultOptions.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using Azure.Core;
2-
31
namespace Genocs.Secrets.AzureKeyVault.Configurations;
42

53
/// <summary>
@@ -26,7 +24,19 @@ public class AzureKeyVaultOptions
2624
/// The managed identity id.
2725
/// </summary>
2826
public string? ManagedIdentityId { get; set; }
27+
28+
/// <summary>
29+
/// The client id. To be used with Certificate authentication.
30+
/// </summary>
2931
public object? AzureADCertThumbprint { get; internal set; }
32+
33+
/// <summary>
34+
/// The client id. To be used with Certificate authentication.
35+
/// </summary>
3036
public string? AzureADApplicationId { get; internal set; }
37+
38+
/// <summary>
39+
/// The Azure EntraID tenant Id. To be used with Certificate authentication.
40+
/// </summary>
3141
public string? AzureADDirectoryId { get; internal set; }
3242
}

src/Genocs.Security/Genocs.Security.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252

5353
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
54-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.*" />
54+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.8" />
5555
</ItemGroup>
5656

5757
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">

src/Genocs.WebApi.Security/Genocs.WebApi.Security.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@
4949
<PackageReference Include="Genocs.Core" Version="6.0.*" />
5050
</ItemGroup>
5151

52-
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
53-
<PackageReference Include="Microsoft.AspNetCore.Authentication.Certificate" Version="6.0.*" />
52+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
53+
<PackageReference Include="Microsoft.AspNetCore.Authentication.Certificate" Version="8.0.8" />
5454
</ItemGroup>
5555

5656
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
57-
<PackageReference Include="Microsoft.AspNetCore.Authentication.Certificate" Version="7.0.*" />
57+
<PackageReference Include="Microsoft.AspNetCore.Authentication.Certificate" Version="7.0.20" />
5858
</ItemGroup>
59-
60-
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
61-
<PackageReference Include="Microsoft.AspNetCore.Authentication.Certificate" Version="8.0.*" />
59+
60+
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
61+
<PackageReference Include="Microsoft.AspNetCore.Authentication.Certificate" Version="6.0.33" />
6262
</ItemGroup>
6363

6464
</Project>

0 commit comments

Comments
 (0)