Secret Providers
Shield is provider-agnostic. It doesn’t force you to migrate your secrets to a specific format or platform. Instead, it aggregates secrets from the places they already live.The Resolver Pattern
When you rundotset run, Shield uses a Secret Resolver to collect data from a list of configured providers.
Supported Providers
1. Dotenv (dotenv)
Automatically detects .env, .env.local, .env.development, and .env.production. This enables zero-migration setup for most web projects.
2. AWS Secrets Manager (aws-sm)
Pulls secrets directly from AWS using the AWS SDK. This is ideal for production environments where secrets are managed at the infrastructure layer.
3. Environment (environment)
Capture existing shell environment variables. By default, it looks for variables prefixed with SHIELD_, but this is configurable.
4. Native Storage (dotset)
Dotset’s native encrypted storage. Secrets are stored in .dotset/manifest.enc and encrypted with a local AES-256 key.
Provider Priority
Providers are evaluated in the order they are defined. If multiple providers define the same secret key, the last one wins.- Auto Mode: By default (
--providers auto), Shield evaluates providers in this order:dotenv->environment->dotset. - Manual Mode: You can override this using the
--providersflag.