Files
EnvelopeGenerator/EnvelopeGenerator.Server
TekH a84712b708 Add Serilog UI access control with allow-list support
Introduced a new `SerilogUiAccessOptions` class to define an allow-list of usernames and emails for accessing the Serilog UI.

Added `SerilogUiSenderAuthorizationFilter` to enforce access control by authenticating requests using the `AuthScheme.Sender` scheme and validating against the configured allow-list.

Updated `Program.cs` to:
- Configure `SerilogUiAccessOptions` from `appsettings.json`.
- Register and apply the `SerilogUiSenderAuthorizationFilter` as an async authorization filter for Serilog UI.
- Add middleware to handle `/serilog-ui` requests and redirect unauthorized users to `/sender`.
- Reintroduce `app.UseSerilogUi()` after the custom middleware.
- Add routes `/log` and `/logs` to redirect to `/serilog-ui`.

Updated `appsettings.json` to include a `SerilogUiAccess` section for configuring allowed users.

These changes ensure that only authenticated and authorized users can access the Serilog UI.
2026-11-25 16:46:13 +01:00
..