1.0.0 • Published 4 years ago
@meechisoft/blabbermouth v1.0.0
Allows you to tokenize a javascript object with @Secret which get replaced with the actual secrets at runtime securely based on what key vault permission of the currently logged in user.
Prerequisites
dotnet cli
https://dotnet.microsoft.com/download
azure cli
https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest
Example
var blabbermouth = require('@meechisoft/blabbermouth');
var config = {
login: {
user: '@Secret(AutomationUserName)',
password: '@Secret(AutomationUserPassword)'
} ,
connectionString: '@Secret(DatabaseConnectionString)'
};
blabbermouth('https://myvault.vault.azure.net', config)
.then(o => {
console.log(o);
})
.catch(e => {
console.error(e);
});
output
{
login:
{
user: 'user@company.com',
password: 'P@ssword'
},
connectionString: 'Server=Server;Database=MyDatabase'
}