Repository navigation
v4.0.0.
What's New
π Cocoar.Configuration.Secrets [Developer Preview]
Added memory-safe secret management with automatic zeroization and encrypted envelopes.
Secret<T>type β Memory-safe wrapper with automatic clearing after use- Hybrid encryption β RSA-OAEP + AES-256-GCM (industry-standard approach)
- X.509 certificate support β Password-less certificates for key management
- Folder-based key management β
UseCertificatesFromFolder()with automatic key rotation - CLI tool β
cocoar-secretsfor certificate generation, encryption/decryption, format conversion - Full type support β Works with primitives, complex objects, and collections
Packages:
Cocoar.Configuration.Secrets(4.0.0)Cocoar.Configuration.Secrets.Cli(4.0.0)
π§ͺ Testing Configuration Overrides
Added powerful testing API for integration tests without application code changes.
CocoarTestConfigurationβ Override configuration in tests viaReplaceAllRules()orAppendTestRules()AsyncLocal<T>isolation β Automatic test isolation for parallel execution- Universal compatibility β Works with
ConfigManager, DI, AspNetCore,WebApplicationFactory - Two override modes:
ReplaceAllRules()β Skip original rules entirelyAppendTestRules()β Merge with existing configuration (last-write-wins)
π Roslyn Analyzers
Added compile-time validation for configuration rules.
New analyzers:
- COCFG001 β Detects secret path conflicts
- COCFG002 β Enforces rule dependency ordering (with code fix)
- COCFG003 β Validates required rules have resources
- COCFG004 β Enforces type safety in configuration accessors
- COCFG005 β Detects duplicate unconditional rules
- COCFG006 β Suggests optimal rule ordering
Package: Cocoar.Configuration.Analyzers (4.0.0)
Breaking Changes
Provider Contract Refactored
Providers now return byte[] instead of JsonElement:
FetchConfigurationAsyncβFetchConfigurationBytesAsyncChangesβChangesAsBytes
All built-in providers have been updated. Custom providers require migration if they exist.