Add tests and implement StubBearer authentication for Signer endpoints
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
- Created SignerEndpointsTests to validate the SignDsse and VerifyReferrers endpoints. - Implemented StubBearerAuthenticationDefaults and StubBearerAuthenticationHandler for token-based authentication. - Developed ConcelierExporterClient for managing Trivy DB settings and export operations. - Added TrivyDbSettingsPageComponent for UI interactions with Trivy DB settings, including form handling and export triggering. - Implemented styles and HTML structure for Trivy DB settings page. - Created NotifySmokeCheck tool for validating Redis event streams and Notify deliveries.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Immutable;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Immutable;
|
||||
|
||||
namespace StellaOps.Excititor.Core;
|
||||
|
||||
@@ -24,13 +24,14 @@ public interface IVexConnector
|
||||
/// <summary>
|
||||
/// Connector context populated by the orchestrator/worker.
|
||||
/// </summary>
|
||||
public sealed record VexConnectorContext(
|
||||
DateTimeOffset? Since,
|
||||
VexConnectorSettings Settings,
|
||||
IVexRawDocumentSink RawSink,
|
||||
IVexSignatureVerifier SignatureVerifier,
|
||||
IVexNormalizerRouter Normalizers,
|
||||
IServiceProvider Services);
|
||||
public sealed record VexConnectorContext(
|
||||
DateTimeOffset? Since,
|
||||
VexConnectorSettings Settings,
|
||||
IVexRawDocumentSink RawSink,
|
||||
IVexSignatureVerifier SignatureVerifier,
|
||||
IVexNormalizerRouter Normalizers,
|
||||
IServiceProvider Services,
|
||||
ImmutableDictionary<string, string> ResumeTokens);
|
||||
|
||||
/// <summary>
|
||||
/// Normalized connector configuration values.
|
||||
|
||||
47
src/StellaOps.Excititor.Core/VexConsensusHold.cs
Normal file
47
src/StellaOps.Excititor.Core/VexConsensusHold.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
namespace StellaOps.Excititor.Core;
|
||||
|
||||
public sealed record VexConsensusHold
|
||||
{
|
||||
public VexConsensusHold(
|
||||
string vulnerabilityId,
|
||||
string productKey,
|
||||
VexConsensus candidate,
|
||||
DateTimeOffset requestedAt,
|
||||
DateTimeOffset eligibleAt,
|
||||
string reason)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(vulnerabilityId))
|
||||
{
|
||||
throw new ArgumentException("Vulnerability id must be provided.", nameof(vulnerabilityId));
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(productKey))
|
||||
{
|
||||
throw new ArgumentException("Product key must be provided.", nameof(productKey));
|
||||
}
|
||||
|
||||
if (eligibleAt < requestedAt)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(nameof(eligibleAt), "EligibleAt cannot be earlier than RequestedAt.");
|
||||
}
|
||||
|
||||
VulnerabilityId = vulnerabilityId.Trim();
|
||||
ProductKey = productKey.Trim();
|
||||
Candidate = candidate ?? throw new ArgumentNullException(nameof(candidate));
|
||||
RequestedAt = requestedAt;
|
||||
EligibleAt = eligibleAt;
|
||||
Reason = string.IsNullOrWhiteSpace(reason) ? "unspecified" : reason.Trim();
|
||||
}
|
||||
|
||||
public string VulnerabilityId { get; }
|
||||
|
||||
public string ProductKey { get; }
|
||||
|
||||
public VexConsensus Candidate { get; }
|
||||
|
||||
public DateTimeOffset RequestedAt { get; }
|
||||
|
||||
public DateTimeOffset EligibleAt { get; }
|
||||
|
||||
public string Reason { get; }
|
||||
}
|
||||
Reference in New Issue
Block a user