Files
OTSSignsOrchestrator/OTSSignsOrchestrator.Core/Services/IBitwardenSecretService.cs
Matt Batchelder 90eb649940 feat: Implement container logs functionality in InstancesViewModel
- Added properties for managing container logs, including log entries, service filters, and auto-refresh options.
- Introduced commands for refreshing logs, toggling auto-refresh, and closing the logs panel.
- Implemented log fetching logic with error handling and status messages.
- Integrated log display in the InstancesView with a dedicated logs panel.

feat: Enhance navigation to Instances page with auto-selection

- Added method to navigate to the Instances page and auto-select an instance based on abbreviation.

feat: Update SettingsViewModel to load and save Bitwarden configuration

- Integrated Bitwarden configuration loading from IOptions and saving to appsettings.json.
- Added properties for Bitwarden instance project ID and connection status.
- Updated UI to reflect Bitwarden settings and connection status.

feat: Add advanced options for instance creation

- Introduced a new expander in CreateInstanceView for advanced options, including purging stale volumes.

feat: Improve InstanceDetailsWindow with pending setup banner

- Added a banner to indicate pending setup for Xibo OAuth credentials, with editable fields for client ID and secret.

fix: Update appsettings.json to include Bitwarden configuration structure

- Added Bitwarden section to appsettings.json for storing configuration values.

chore: Update Docker Compose template with health checks

- Added health check configuration for web service in template.yml to ensure service availability.

refactor: Drop AppSettings table from database

- Removed AppSettings table and related migration files as part of database cleanup.

feat: Create ServiceLogEntry DTO for log management

- Added ServiceLogEntry class to represent individual log entries from Docker services.
2026-02-25 17:39:17 -05:00

62 lines
2.1 KiB
C#

namespace OTSSignsOrchestrator.Core.Services;
/// <summary>
/// Abstraction for storing and retrieving secrets via Bitwarden Secrets Manager.
/// </summary>
public interface IBitwardenSecretService
{
/// <summary>
/// Returns true if Bitwarden is configured (access token + org ID are set).
/// </summary>
Task<bool> IsConfiguredAsync();
/// <summary>
/// Creates a new secret in the configured Bitwarden project.
/// </summary>
/// <returns>The ID of the created secret.</returns>
Task<string> CreateSecretAsync(string key, string value, string note = "");
/// <summary>
/// Creates a new secret in the instance Bitwarden project (falls back to default project if not configured).
/// Use this for instance-level secrets such as DB passwords and Newt credentials.
/// </summary>
/// <returns>The ID of the created secret.</returns>
Task<string> CreateInstanceSecretAsync(string key, string value, string note = "");
/// <summary>
/// Retrieves a secret by its Bitwarden ID.
/// </summary>
Task<BitwardenSecret> GetSecretAsync(string secretId);
/// <summary>
/// Updates the value of an existing secret in place.
/// </summary>
Task UpdateSecretAsync(string secretId, string key, string value, string note = "");
/// <summary>
/// Updates the value of an existing instance-level secret in place (uses instance project if configured).
/// </summary>
Task UpdateInstanceSecretAsync(string secretId, string key, string value, string note = "");
/// <summary>
/// Lists all secrets in the configured project.
/// </summary>
Task<List<BitwardenSecretSummary>> ListSecretsAsync();
}
public class BitwardenSecret
{
public string Id { get; set; } = string.Empty;
public string Key { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
public string Note { get; set; } = string.Empty;
public DateTime CreationDate { get; set; }
}
public class BitwardenSecretSummary
{
public string Id { get; set; } = string.Empty;
public string Key { get; set; } = string.Empty;
public DateTime CreationDate { get; set; }
}