Configuration for cobox
ameba23 28fc700460 ignore opt.production 2 years ago
test remove unused uniq fn 3 years ago
.gitignore an initial cobox config 3 years ago
LICENSE add LICENSE 3 years ago
README.md annotate README 3 years ago
index.js ignore opt.production 2 years ago
logger.js logger defaults to debug if production env variable not true 2 years ago
package.json pino 2 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

Stores and retrieves a yaml configuration file for use in cobox-group and cobox-core.

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