part #2
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1
|
||||
// Sprint: SPRINT_4100_0006_0002 - eIDAS Crypto Plugin
|
||||
namespace StellaOps.Cryptography.Plugin.EIDAS.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// eIDAS key configuration.
|
||||
/// </summary>
|
||||
public class EidasKeyConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Unique key identifier.
|
||||
/// </summary>
|
||||
public required string KeyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Key source: "tsp" (remote) or "local" (PKCS#12).
|
||||
/// </summary>
|
||||
public required string Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Certificate in PEM format (optional for validation).
|
||||
/// </summary>
|
||||
public string? Certificate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Certificate subject DN.
|
||||
/// </summary>
|
||||
public string? SubjectDn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Certificate serial number.
|
||||
/// </summary>
|
||||
public string? SerialNumber { get; set; }
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1
|
||||
// Sprint: SPRINT_4100_0006_0002 - eIDAS Crypto Plugin
|
||||
|
||||
using StellaOps.Cryptography.Plugin.EIDAS.Models;
|
||||
|
||||
namespace StellaOps.Cryptography.Plugin.EIDAS.Configuration;
|
||||
@@ -60,113 +59,3 @@ public class EidasOptions
|
||||
/// </summary>
|
||||
public List<EidasKeyConfig> Keys { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Trust Service Provider configuration for remote QES signing.
|
||||
/// </summary>
|
||||
public class TspOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// TSP API endpoint URL.
|
||||
/// </summary>
|
||||
public required string Endpoint { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TSP API key for authentication.
|
||||
/// </summary>
|
||||
public required string ApiKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TSP certificate for mutual TLS (optional).
|
||||
/// </summary>
|
||||
public string? Certificate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Request timeout in seconds.
|
||||
/// </summary>
|
||||
public int TimeoutSeconds { get; set; } = 30;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Local signing configuration (PKCS#12 keystore).
|
||||
/// </summary>
|
||||
public class LocalSigningOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Keystore type (PKCS12, PEM).
|
||||
/// </summary>
|
||||
public string Type { get; set; } = "PKCS12";
|
||||
|
||||
/// <summary>
|
||||
/// Path to keystore file.
|
||||
/// </summary>
|
||||
public required string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Keystore password.
|
||||
/// </summary>
|
||||
public required string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Path to certificate chain file (PEM format).
|
||||
/// </summary>
|
||||
public string? CertificateChainPath { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// EU Trusted List configuration.
|
||||
/// </summary>
|
||||
public class TrustedListOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// EU Trusted List (EUTL) URL.
|
||||
/// Default: https://ec.europa.eu/tools/lotl/eu-lotl.xml
|
||||
/// </summary>
|
||||
public string Url { get; set; } = "https://ec.europa.eu/tools/lotl/eu-lotl.xml";
|
||||
|
||||
/// <summary>
|
||||
/// Local cache directory for trusted list.
|
||||
/// </summary>
|
||||
public string CachePath { get; set; } = "./crypto/eutl-cache";
|
||||
|
||||
/// <summary>
|
||||
/// Refresh interval in hours.
|
||||
/// </summary>
|
||||
public int RefreshIntervalHours { get; set; } = 24;
|
||||
|
||||
/// <summary>
|
||||
/// Enable strict validation (fail on any validation error).
|
||||
/// </summary>
|
||||
public bool StrictValidation { get; set; } = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// eIDAS key configuration.
|
||||
/// </summary>
|
||||
public class EidasKeyConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Unique key identifier.
|
||||
/// </summary>
|
||||
public required string KeyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Key source: "tsp" (remote) or "local" (PKCS#12).
|
||||
/// </summary>
|
||||
public required string Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Certificate in PEM format (optional for validation).
|
||||
/// </summary>
|
||||
public string? Certificate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Certificate subject DN.
|
||||
/// </summary>
|
||||
public string? SubjectDn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Certificate serial number.
|
||||
/// </summary>
|
||||
public string? SerialNumber { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1
|
||||
// Sprint: SPRINT_4100_0006_0002 - eIDAS Crypto Plugin
|
||||
namespace StellaOps.Cryptography.Plugin.EIDAS.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// Local signing configuration (PKCS#12 keystore).
|
||||
/// </summary>
|
||||
public class LocalSigningOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Keystore type (PKCS12, PEM).
|
||||
/// </summary>
|
||||
public string Type { get; set; } = "PKCS12";
|
||||
|
||||
/// <summary>
|
||||
/// Path to keystore file.
|
||||
/// </summary>
|
||||
public required string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Keystore password.
|
||||
/// </summary>
|
||||
public required string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Path to certificate chain file (PEM format).
|
||||
/// </summary>
|
||||
public string? CertificateChainPath { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1
|
||||
// Sprint: SPRINT_4100_0006_0002 - eIDAS Crypto Plugin
|
||||
namespace StellaOps.Cryptography.Plugin.EIDAS.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// EU Trusted List configuration.
|
||||
/// </summary>
|
||||
public class TrustedListOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// EU Trusted List (EUTL) URL.
|
||||
/// Default: https://ec.europa.eu/tools/lotl/eu-lotl.xml
|
||||
/// </summary>
|
||||
public string Url { get; set; } = "https://ec.europa.eu/tools/lotl/eu-lotl.xml";
|
||||
|
||||
/// <summary>
|
||||
/// Local cache directory for trusted list.
|
||||
/// </summary>
|
||||
public string CachePath { get; set; } = "./crypto/eutl-cache";
|
||||
|
||||
/// <summary>
|
||||
/// Refresh interval in hours.
|
||||
/// </summary>
|
||||
public int RefreshIntervalHours { get; set; } = 24;
|
||||
|
||||
/// <summary>
|
||||
/// Enable strict validation (fail on any validation error).
|
||||
/// </summary>
|
||||
public bool StrictValidation { get; set; } = true;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1
|
||||
// Sprint: SPRINT_4100_0006_0002 - eIDAS Crypto Plugin
|
||||
namespace StellaOps.Cryptography.Plugin.EIDAS.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// Trust Service Provider configuration for remote QES signing.
|
||||
/// </summary>
|
||||
public class TspOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// TSP API endpoint URL.
|
||||
/// </summary>
|
||||
public required string Endpoint { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TSP API key for authentication.
|
||||
/// </summary>
|
||||
public required string ApiKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TSP certificate for mutual TLS (optional).
|
||||
/// </summary>
|
||||
public string? Certificate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Request timeout in seconds.
|
||||
/// </summary>
|
||||
public int TimeoutSeconds { get; set; } = 30;
|
||||
}
|
||||
Reference in New Issue
Block a user