-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
I'd like to propose adding SecretMarkingProvider - a wrapper provider that marks configuration values as secrets based on key patterns.
Use case
When integrating with external configuration sources (environment variables, third-party providers) that don't properly identify sensitive data, users need a way to retroactively mark values as secrets.
Current workaround
Implement a custom provider wrapper manually, duplicating boilerplate code.
Proposed solution
A new SecretMarkingProvider<Upstream> wrapper that:
- Wraps any existing
ConfigProvider - Marks values as secrets when keys match a user-provided predicate
- Preserves existing secret status (never removes
isSecretflag)
let envProvider = EnvironmentVariablesProvider()
let secretMarkedProvider = envProvider.markSecrets { key in
key.description.contains("password")
}I have a working implementation and proposal (SCO-0004) ready for review.
Implementation branch: https://github.com/gautamrajur/swift-configuration/tree/feature/secret-marking-provider
Metadata
Metadata
Assignees
Labels
No labels