Implement hasgi corp vault
This commit is contained in:
parent
10f2083590
commit
169c6409dc
@ -13,21 +13,21 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
builder.Configuration.AddAzureAppConfiguration(options =>
|
//builder.Configuration.AddAzureAppConfiguration(options =>
|
||||||
{
|
//{
|
||||||
var endpoint = builder.Configuration.GetSection("Endpoints:AppConfigurationURI").Value;
|
// var endpoint = builder.Configuration.GetSection("Endpoints:AppConfigurationURI").Value;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(endpoint))
|
// if (string.IsNullOrEmpty(endpoint))
|
||||||
throw new ArgumentException("The app configuration is missing");
|
// throw new ArgumentException("The app configuration is missing");
|
||||||
|
|
||||||
options.Connect(new Uri(endpoint), new DefaultAzureCredential())
|
// options.Connect(new Uri(endpoint), new DefaultAzureCredential())
|
||||||
.Select(KeyFilter.Any, "blueprint_dal");
|
// .Select(KeyFilter.Any, "blueprint_dal");
|
||||||
|
|
||||||
options.ConfigureKeyVault(keyVaultOptions =>
|
// options.ConfigureKeyVault(keyVaultOptions =>
|
||||||
{
|
// {
|
||||||
keyVaultOptions.SetCredential(new DefaultAzureCredential());
|
// keyVaultOptions.SetCredential(new DefaultAzureCredential());
|
||||||
});
|
// });
|
||||||
});
|
//});
|
||||||
|
|
||||||
builder.Services.AddEndpointsApiExplorer();
|
builder.Services.AddEndpointsApiExplorer();
|
||||||
builder.Services.AddSwaggerGen();
|
builder.Services.AddSwaggerGen();
|
||||||
@ -40,10 +40,10 @@ builder.Services.AddProblemDetails();
|
|||||||
builder.Services.AddMemoryCache();
|
builder.Services.AddMemoryCache();
|
||||||
builder.Services.AddLogs(builder);
|
builder.Services.AddLogs(builder);
|
||||||
builder.Services.AddKeyVault(builder.Configuration);
|
builder.Services.AddKeyVault(builder.Configuration);
|
||||||
builder.Services.AddBlobStorage(builder.Configuration);
|
//builder.Services.AddBlobStorage(builder.Configuration);
|
||||||
builder.Services.AddRedis(builder.Configuration);
|
//builder.Services.AddRedis(builder.Configuration);
|
||||||
builder.Services.AddMongoLayer(builder.Configuration);
|
//builder.Services.AddMongoLayer(builder.Configuration);
|
||||||
builder.Services.AddSQLServer(builder.Configuration);
|
//builder.Services.AddSQLServer(builder.Configuration);
|
||||||
builder.Services.AddDALLayerServices(builder.Configuration);
|
builder.Services.AddDALLayerServices(builder.Configuration);
|
||||||
|
|
||||||
builder.Host.ConfigureServices((context, services) =>
|
builder.Host.ConfigureServices((context, services) =>
|
||||||
|
|||||||
@ -7,5 +7,10 @@
|
|||||||
},
|
},
|
||||||
"CacheSettings": {
|
"CacheSettings": {
|
||||||
"DefaultCacheDurationInMinutes": 3
|
"DefaultCacheDurationInMinutes": 3
|
||||||
|
},
|
||||||
|
"Vault": {
|
||||||
|
"Address": "http://localhost:8200",
|
||||||
|
"Token": "hvs.kDZnAfrvfcMNrom6RmlEhZ7I",
|
||||||
|
"SecretMount": "secret"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Blueprint.KeyVault" Version="0.0.1" />
|
<PackageReference Include="Blueprint.KeyVault" Version="0.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Blueprint.Mongo" Version="0.0.2" />
|
<PackageReference Include="Blueprint.Mongo" Version="0.0.3" />
|
||||||
<PackageReference Include="Blueprint.Redis" Version="0.0.1" />
|
<PackageReference Include="Blueprint.Redis" Version="0.0.1" />
|
||||||
<PackageReference Include="Mapster" Version="7.4.0" />
|
<PackageReference Include="Mapster" Version="7.4.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user