Skip to content

v4.0.0.

Choose a tag to compare

@windischb windischb released this 08 Jan 11:49
· 52 commits to develop since this release

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-secrets for certificate generation, encryption/decryption, format conversion
  • Full type support β€” Works with primitives, complex objects, and collections

⚠️ Developer Preview: Production-ready implementation, but API may evolve based on feedback. Breaking changes possible in 4.x releases.

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 via ReplaceAllRules() or AppendTestRules()
  • AsyncLocal<T> isolation β€” Automatic test isolation for parallel execution
  • Universal compatibility β€” Works with ConfigManager, DI, AspNetCore, WebApplicationFactory
  • Two override modes:
    • ReplaceAllRules() β€” Skip original rules entirely
    • AppendTestRules() β€” 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

⚠️ Internal change only β€” consuming applications are unaffected.

Providers now return byte[] instead of JsonElement:

  • FetchConfigurationAsync β†’ FetchConfigurationBytesAsync
  • Changes β†’ ChangesAsBytes

All built-in providers have been updated. Custom providers require migration if they exist.