What problem does it solve?
This Skill provides a comprehensive approach to handling sensitive information like API keys and connection strings in .NET applications, preventing accidental exposure and ensuring secure practices across development and production environments.
Core Features & Use Cases
- Secure Local Development: Utilizes
dotnet user-secrets for storing secrets outside the repository during development.
- Production Secrets Management: Leverages environment variables for secure secret injection in production.
- Options Pattern Integration: Demonstrates binding secrets to strongly-typed options classes with validation.
- Secret Rotation: Implements patterns for zero-downtime secret rotation.
- Managed Identity: Recommends managed identity as a best practice to eliminate secrets in cloud environments.
- Anti-Patterns: Clearly outlines what not to do, such as hardcoding secrets or storing them in
appsettings.json.
Quick Start
Use the dotnet-secrets-management skill to set a new user secret named 'MyApi:Key' with the value 'my-super-secret-key-for-dev'.