Skip to content

Commit b37d2cb

Browse files
author
Vadim Belov
committed
Update dependencies and add EasyVault secret control
Upgraded NuGet packages across projects for security and compatibility. Added UseSecretVault property and UseSecrets(bool) method to EasyStackOptions for flexible EasyVault secret usage. EasyVault integration now respects UseSecretVault flag. Refactored Mediator for improved null checking and code clarity.
1 parent 3382e4c commit b37d2cb

File tree

20 files changed

+62
-49
lines changed

20 files changed

+62
-49
lines changed

Sources/EasyExtensions.AspNetCore.Authorization/EasyExtensions.AspNetCore.Authorization.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
<None Include="..\..\LICENSE.md" Pack="true" PackagePath="LICENSE.md" />
3232
<ProjectReference Include="..\EasyExtensions.AspNetCore\EasyExtensions.AspNetCore.csproj" />
3333
<ProjectReference Include="..\EasyExtensions\EasyExtensions.csproj" />
34-
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="10.0.3" />
35-
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.3" />
36-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.3" />
37-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.103" PrivateAssets="All" />
34+
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="10.0.4" />
35+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.4" />
36+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.4" />
37+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.104" PrivateAssets="All" />
3838
</ItemGroup>
3939

4040
</Project>

Sources/EasyExtensions.AspNetCore.Sentry/EasyExtensions.AspNetCore.Sentry.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
3333
<PackageReference Include="Sentry.AspNetCore" Version="6.1.0" />
3434
<ProjectReference Include="..\EasyExtensions.AspNetCore\EasyExtensions.AspNetCore.csproj" />
35-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.103" PrivateAssets="All" />
35+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.104" PrivateAssets="All" />
3636
</ItemGroup>
3737

3838
</Project>

Sources/EasyExtensions.AspNetCore.Stack/Builders/EasyStackOptions.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ public class EasyStackOptions
2525
/// </summary>
2626
internal bool AuthorizationEnabled { get; set; }
2727

28+
/// <summary>
29+
/// Gets or sets a value indicating whether to use secrets for configuration values.
30+
/// </summary>
31+
internal bool UseSecretVault { get; set; }
32+
2833
/// <summary>
2934
/// Enables authorization for the current EasyStackOptions instance.
3035
/// </summary>
@@ -66,5 +71,17 @@ public EasyStackOptions WithPostgres<TDbContext>(bool useLazyLoadingProxies = fa
6671
};
6772
return this;
6873
}
74+
75+
/// <summary>
76+
/// Configures whether sensitive information should be stored in the secret vault.
77+
/// </summary>
78+
/// <param name="useSecrets">A value indicating whether to enable the use of the secret vault. Set to <see langword="true"/> to use the
79+
/// vault for sensitive information; otherwise, <see langword="false"/>.</param>
80+
/// <returns>The current instance of <see cref="EasyStackOptions"/> to allow for method chaining.</returns>
81+
public EasyStackOptions UseSecrets(bool useSecrets)
82+
{
83+
UseSecretVault = useSecrets;
84+
return this;
85+
}
6986
}
7087
}

Sources/EasyExtensions.AspNetCore.Stack/EasyExtensions.AspNetCore.Stack.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
<ProjectReference Include="..\EasyExtensions.EntityFrameworkCore.Npgsql\EasyExtensions.EntityFrameworkCore.Npgsql.csproj" />
3535
<ProjectReference Include="..\EasyExtensions.EntityFrameworkCore\EasyExtensions.EntityFrameworkCore.csproj" />
3636
<ProjectReference Include="..\EasyExtensions.Quartz\EasyExtensions.Quartz.csproj" />
37-
<PackageReference Include="EasyVault" Version="1.0.10" />
38-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.103" PrivateAssets="All" />
37+
<PackageReference Include="EasyVault" Version="1.0.11" />
38+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.104" PrivateAssets="All" />
3939
</ItemGroup>
4040

4141
</Project>

Sources/EasyExtensions.AspNetCore.Stack/Extensions/HostApplicationBuilderExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public static IHostApplicationBuilder AddEasyStack(
133133

134134
// EasyVault - if URL presented in configuration
135135
bool isVaultPresented = !string.IsNullOrWhiteSpace(builder.Configuration[EasyVault.SDK.Extensions.ConfigurationExtensions.DefaultServerUrlKey]);
136-
if (isVaultPresented)
136+
if (isVaultPresented && options.UseSecretVault)
137137
{
138138
EasyVault.SDK.Extensions.ConfigurationExtensions.AddSecrets(builder.Configuration);
139139
logger.LogInformation("VaultApiUrl found in configuration, added EasyVault");

Sources/EasyExtensions.AspNetCore/EasyExtensions.AspNetCore.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
<None Include="..\..\LICENSE.md" Pack="true" PackagePath="LICENSE.md" />
3232
<ProjectReference Include="..\EasyExtensions\EasyExtensions.csproj" />
3333
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.3.9" />
34-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.103" PrivateAssets="All" />
35-
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="10.0.3" />
36-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.3" />
34+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.104" PrivateAssets="All" />
35+
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="10.0.4" />
36+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.4" />
3737
</ItemGroup>
3838

3939
</Project>

Sources/EasyExtensions.Clients/EasyExtensions.Clients.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
3131
<None Include="packageIcon.png" Pack="true" PackagePath="\" />
3232
<None Include="..\..\LICENSE.md" Pack="true" PackagePath="LICENSE.md" />
33-
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.3" />
34-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.103" PrivateAssets="All" />
33+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.4" />
34+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.104" PrivateAssets="All" />
3535
</ItemGroup>
3636

3737
</Project>

Sources/EasyExtensions.Crypto.Tests/EasyExtensions.Crypto.Tests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="coverlet.collector" Version="6.0.4">
13+
<PackageReference Include="coverlet.collector" Version="8.0.0">
1414
<PrivateAssets>all</PrivateAssets>
1515
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1616
</PackageReference>
17-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
18-
<PackageReference Include="NUnit" Version="4.4.0" />
19-
<PackageReference Include="NUnit.Analyzers" Version="4.11.2">
17+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
18+
<PackageReference Include="NUnit" Version="4.5.1" />
19+
<PackageReference Include="NUnit.Analyzers" Version="4.12.0">
2020
<PrivateAssets>all</PrivateAssets>
2121
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2222
</PackageReference>

Sources/EasyExtensions.Crypto/EasyExtensions.Crypto.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<ItemGroup>
2929
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
3030
<None Include="packageIcon.png" Pack="true" PackagePath="\" />
31-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.103" PrivateAssets="All" />
31+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.104" PrivateAssets="All" />
3232
</ItemGroup>
3333

3434
<ItemGroup>

Sources/EasyExtensions.Drawing/EasyExtensions.Drawing.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<None Include="..\..\LICENSE.md" Pack="true" PackagePath="LICENSE.md" />
3434
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.7" />
3535
<ProjectReference Include="..\EasyExtensions.Fonts\EasyExtensions.Fonts.csproj" />
36-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.103" PrivateAssets="All" />
36+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.104" PrivateAssets="All" />
3737
</ItemGroup>
3838

3939
</Project>

0 commit comments

Comments
 (0)