a leveldb backed auth plugin for sinopia private npm
- This plugin saves only hashes of the password
- Plugin comes with an api tool to perform various operations (see below)
- Supports groups, groups can be used in sinopia's config.yaml to restrict access to packages
npm install -g sinopia
npm install -g sinopia-leveldb
auth:
leveldb:
file: ./userdb
# replace the control port use to communicate
# between the cli and sinopia.
# this configuration is optional
# controlServerPort: 4874
The db path is relative to the location of sinopia's config.yaml
You should also remove htpasswd
plugin if it's there
sinopia
I usually use pm2 for this.
With a root user, pick any name
sinopia-leveldb init myuser
The cli provide in itself is not secure and is designed to work on the machine that is running sinopia
sinopia-leveldb set-password myuser
sinopia-leveldb add-group myuser somegroup
sinopia-leveldb list myuser
sinopia-leveldb list
MIT © yaniv kessler