@dmno/encrypted-vault-plugin
v0.0.9
Published
dmno plugin to store secrets encrypted in your repo
Downloads
241
Readme
Check out the docs for more information on how to use DMNO with an encrypted vault for your secrets.
If you have any questions, please reach out to us on Discord.
@dmno/encrypted-vault-plugin
Provides functionality to encrypt and store secrets committed to your repo for the @dmno config engine
Plugin
Installation
npm add @dmno/encrypted-vault-plugin
Initialization
import { defineDmnoService, configPath } from 'dmno';
import { EncryptedVaultDmnoPlugin, EncryptedVaultTypes } from '@dmno/encrypted-vault-plugin';
const MyProdVault = new EncryptedVaultDmnoPlugin('vault/prod', {
key: configPath('..', 'DMNO_VAULT_KEY'),
});
export default defineDmnoService({
schema: {
DMNO_VAULT_KEY: {
extends: EncryptedVaultTypes.encryptionKey,
// NOTE - the type itself is already marked as secret
},
// simple case example
SUPER_SECRET_ITEM: {
value: MyProdVault.item(),
},
},
});
Value Resolvers
Fetch item using unique IDs
myEncryptedVault.item()
Data Types
EncryptedVaultTypes.encryptionKey
CLI Commands
# set up a new encrypted vault
dmno plugin -p vault -- setup
# Update or insert an item to te vault
dmno plugin -p vault -- upsert
# add an item to the vault
dmno plugin -p vault -- add
# update an item in the vault
dmno plugin -p vault -- update
# delete an item from the vault
dmno plugin -p vault -- delete
# delete an item from the vault
dmno plugin -p vault -- delete