@enactprotocol/secrets
v2.1.24
Published
OS keyring integration and environment variable management for Enact
Maintainers
Readme
@enactprotocol/secrets
OS keyring integration and environment variable management for Enact.
Overview
This package provides:
- OS-native keyring storage (macOS Keychain, Windows Credential Manager, Linux Secret Service)
- Namespace-scoped secret resolution with inheritance
.envfile management (global and local)- Dagger secret URI scheme support
- Secure secret handling with memory-only runtime
Architecture
Secret Storage
Secrets are stored in the OS keyring with the service name enact-cli and account identifier {namespace}:{SECRET_NAME}.
Examples:
alice/api:API_TOKENacme-corp/data:DATABASE_URL
Namespace Inheritance
When resolving secrets, Enact walks up the namespace path:
Tool: alice/api/slack/notifier
Needs: API_TOKEN
Lookup:
1. alice/api/slack:API_TOKEN
2. alice/api:API_TOKEN ✓ found
3. alice:API_TOKENFirst match wins.
Environment Variables
Non-secret environment variables are stored in .env files with priority:
- Local project (
.enact/.env) - highest priority - Global user (
~/.enact/.env) - Default values from tool manifest - lowest priority
Status
Currently in Phase 1 (scaffolding). Full implementation will be completed in Phase 3.
Development
# Build
bun run build
# Test
bun test
# Type check
bun run typecheckPlanned Features (Phase 3)
- [ ] Keyring integration (@zowe/secrets-for-zowe-sdk)
- [ ] setSecret() / getSecret() / listSecrets() / deleteSecret()
- [ ] Namespace inheritance resolution
- [ ] .env file reading and writing
- [ ] Dagger secret URI parsing (env://, file://, cmd://, op://, vault://)
- [ ] Cross-platform testing
- [ ] Comprehensive test coverage
