feat: Initialize Zastava Webhook service with TLS and Authority authentication
- Added Program.cs to set up the web application with Serilog for logging, health check endpoints, and a placeholder admission endpoint. - Configured Kestrel server to use TLS 1.3 and handle client certificates appropriately. - Created StellaOps.Zastava.Webhook.csproj with necessary dependencies including Serilog and Polly. - Documented tasks in TASKS.md for the Zastava Webhook project, outlining current work and exit criteria for each task.
This commit is contained in:
		| @@ -11,6 +11,7 @@ using System.Threading.Tasks; | ||||
| using Microsoft.Extensions.DependencyInjection; | ||||
| using Microsoft.Extensions.Logging.Abstractions; | ||||
| using Microsoft.Extensions.Options; | ||||
| using MongoDB.Driver; | ||||
| using StellaOps.Concelier.Exporter.Json; | ||||
| using StellaOps.Concelier.Exporter.TrivyDb; | ||||
| using StellaOps.Concelier.Models; | ||||
| @@ -733,17 +734,27 @@ public sealed class TrivyDbFeedExporterTests : IDisposable | ||||
|             _advisories = advisories; | ||||
|         } | ||||
|  | ||||
|         public Task<IReadOnlyList<Advisory>> GetRecentAsync(int limit, CancellationToken cancellationToken) | ||||
|             => Task.FromResult(_advisories); | ||||
|  | ||||
|         public Task<Advisory?> FindAsync(string advisoryKey, CancellationToken cancellationToken) | ||||
|             => Task.FromResult<Advisory?>(_advisories.FirstOrDefault(a => a.AdvisoryKey == advisoryKey)); | ||||
|  | ||||
|         public Task UpsertAsync(Advisory advisory, CancellationToken cancellationToken) | ||||
|             => Task.CompletedTask; | ||||
|  | ||||
|         public IAsyncEnumerable<Advisory> StreamAsync(CancellationToken cancellationToken) | ||||
|         public Task<IReadOnlyList<Advisory>> GetRecentAsync(int limit, CancellationToken cancellationToken, IClientSessionHandle? session = null) | ||||
|         { | ||||
|             _ = session; | ||||
|             return Task.FromResult(_advisories); | ||||
|         } | ||||
|  | ||||
|         public Task<Advisory?> FindAsync(string advisoryKey, CancellationToken cancellationToken, IClientSessionHandle? session = null) | ||||
|         { | ||||
|             _ = session; | ||||
|             return Task.FromResult<Advisory?>(_advisories.FirstOrDefault(a => a.AdvisoryKey == advisoryKey)); | ||||
|         } | ||||
|  | ||||
|         public Task UpsertAsync(Advisory advisory, CancellationToken cancellationToken, IClientSessionHandle? session = null) | ||||
|         { | ||||
|             _ = session; | ||||
|             return Task.CompletedTask; | ||||
|         } | ||||
|  | ||||
|         public IAsyncEnumerable<Advisory> StreamAsync(CancellationToken cancellationToken, IClientSessionHandle? session = null) | ||||
|         { | ||||
|             _ = session; | ||||
|             return EnumerateAsync(cancellationToken); | ||||
|  | ||||
|             async IAsyncEnumerable<Advisory> EnumerateAsync([EnumeratorCancellation] CancellationToken ct) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user