feat: secure credential storage, progressive CSV streaming, and settings UX improvements#61
Merged
feat: secure credential storage, progressive CSV streaming, and settings UX improvements#61
Conversation
…ti-server queries
Inclua requisitos e cenários de flush para garantir que cada linha escrita seja persistida no disco imediatamente, aumentando a durabilidade dos dados em caso de crash. Atualize tasks e specs para usar StreamWriter com AutoFlush=true.
- Updated CsvRow to include Duration and LogFilePath fields. - Introduced ExecutionLogEntry model for logging execution details. - Implemented channel-based writing for CSVs, allowing for concurrent processing. - Added methods for appending to server CSVs, writing error entries, and logging execution details with auto-flush. - Enhanced tests to cover new functionalities, including appending to CSVs, error logging, and sanitization of filenames. - Ensured proper handling of inconsistent headers during CSV merging. - Updated test cases to reflect changes in CSV export behavior and structure.
- Remove unused using statements in QueryCommand.cs - Use direct type references for System.Text.Json types in tests - Fix service provider assignment for PostgresDatabaseLister in Program.cs
- Adiciona suporte para escrita progressiva de arquivos CSV parciais por servidor, com append imediato após cada query completar. - Gera um arquivo CSV consolidado ao final da execução, unindo os resultados parciais. - Cria um arquivo de erros dedicado que registra falhas de queries em tempo real. - Implementa feedback visual com uma barra de progresso e um feed de atividades em tempo real durante a execução das queries. - Organiza todos os arquivos gerados em uma subpasta por execução, nomeada com timestamp. - Introduz um modelo de log de execução para registrar detalhes de cada query executada, incluindo duração e status. - Remove a opção `--separate-files`, tornando a escrita por servidor o comportamento padrão.
- Added `ICredentialService` interface for encrypting and decrypting passwords. - Created `CredentialService` implementing `ICredentialService` using `IDataProtectionProvider`. - Updated `ServerConfigEntry` to store encrypted passwords instead of plaintext. - Refactored `AddServerCommandOptions` and `SettingsCommand` to remove plaintext password handling. - Introduced `set-password` command to securely set passwords for database servers. - Updated `QueryCommand` to retrieve passwords securely at runtime. - Added unit tests for `CredentialService` and updated existing tests for `UserConfigService`. - Configured Data Protection in `ServiceCollectionExtensions` to persist keys in the local application data directory.
…ords - Removed plaintext password storage from ServerConfigEntry and furlab.jsonc. - Added encrypted password field (EncryptedPassword) to ServerConfigEntry. - Introduced ICredentialService and CredentialService for encryption/decryption using Microsoft.AspNetCore.DataProtection. - Configured key management in %LocalAppData%\FurLab\keys\ with DPAPI protection on Windows. - Added subcommand `fur settings db-servers set-password` for setting/redefining encrypted passwords. - Modified `fur settings db-servers add` to enable automatic interactive mode when required arguments are missing. - Updated `fur settings db-servers rm` and `test` commands to use interactive selection when no name is provided. - Implemented fallback to interactive password prompt if decryption fails, without automatic re-saving. - Added unit tests for CredentialService methods and updated existing tests to reflect changes in password handling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
m, est, and set-password.
Test coverage