0.0.9 • Published 10 years ago

sinopia-leveldb v0.0.9

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

sinopia-leveldb

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 status Dependency status

set up

install sinopia and the plug in

npm install -g sinopia
npm install -g sinopia-leveldb

add this to config.yaml, in the auth section:

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

fire up sinopia

sinopia

I usually use pm2 for this.

use the cli tool to initialize the database

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

other cli commands

set password

sinopia-leveldb set-password myuser

add user to groups

sinopia-leveldb add-group myuser somegroup

list user's groups

sinopia-leveldb list myuser

list all users with their groups

sinopia-leveldb list

license

MIT © yaniv kessler

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago