Add PKCS#11 startup self-test health reporting
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Server.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
public class HealthController(IPkcs11SelfTestStatusProvider pkcs11StatusProvider) : ControllerBase
|
||||
{
|
||||
[AllowAnonymous]
|
||||
[HttpGet("crypt")]
|
||||
public IActionResult GetCryptHealth()
|
||||
{
|
||||
var status = pkcs11StatusProvider.GetStatus();
|
||||
return Ok(status);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,16 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
},
|
||||
,
|
||||
"Crypt": {
|
||||
"Pkcs11": {
|
||||
"AssetsRootPath": null
|
||||
}
|
||||
},
|
||||
"AuthClientParams": {
|
||||
"Url": "http://172.24.12.39:9090/auth-hub",
|
||||
"PublicKeys": [
|
||||
|
||||
@@ -57,11 +57,10 @@
|
||||
},
|
||||
"Crypt": {
|
||||
"Pkcs11": {
|
||||
"LibraryPath": "C:\\PKCS11\\libpkcs11-proxy.dll",
|
||||
"AssetsRootPath": "E:\\DataFiles\\Digital Data\\EnvelopeGenerator",
|
||||
"SlotId": 2021549410,
|
||||
"TokenLabel": "CompanyProdToken",
|
||||
"ProxySocket": "tcp://172.24.12.64:5657",
|
||||
"ToolPath": "C:\\Users\\tekh\\tools\\opensc\\PFiles64\\OpenSC Project\\OpenSC\\tools\\pkcs11-tool.exe",
|
||||
"UserPin": "",
|
||||
"PrivateKeyLabel": "company-sign-key-v1",
|
||||
"CertificateLabel": "company-sign-cert-v1",
|
||||
|
||||
Reference in New Issue
Block a user