Configuration for cobox
ameba23 a3fdc6b343 uncomment commented out regex 3 years ago
test remove unused uniq fn 3 years ago
.gitignore an initial cobox config 3 years ago
README.md better test coverage 3 years ago
index.js use mkdirp.sync, so that it doesnt try to create config.yml before mkdirp has finished 3 years ago
package.json urlsafe-base64 encoding of keys before storage 3 years ago
util.js uncomment commented out regex 3 years ago
yarn.lock urlsafe-base64 encoding of keys before storage 3 years ago

README.md

cobox-config

Configuration module useful for cobox-client

Example

const Config = require('cobox-config')
const crypto = require('cobox-crypto') // or some other crypto scheme

var storage = './storage' 
var config = Config(storage)

var identity = crypto.keyPair()
config.addIdentity(Object.assign(identity, { name: 'Alice' }))

var group = crypto.keyPair()
config.addGroup(group)

Todos

  • encode public keys as base64 urlsafe in YAML
  • store the path to secret key file (base64 urlsafe binary encoding) instead of raw secret key in the config file
  • sudo chmod 400 -> all secretKeys
  • remove groups and identities