0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/packages/core/htpasswd
github-actions[bot] b970102bfc
chore: update versions (6-next) (#2456)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-10-15 23:13:06 +02:00
..
src refactor: remove @verdaccio/commons-api in favor @verdaccio/core and remove duplication (#2455) 2021-09-26 00:08:00 +02:00
tests Update & make dependency versions consistent in packages/* (#2393) 2021-08-30 08:19:08 +02:00
.babelrc feat: relocate core packages (#1906) 2021-04-09 17:54:13 +02:00
.eslintignore feat: relocate core packages (#1906) 2021-04-09 17:54:13 +02:00
.eslintrc.json feat: relocate core packages (#1906) 2021-04-09 17:54:13 +02:00
CHANGELOG.md chore: update versions (6-next) (#2456) 2021-10-15 23:13:06 +02:00
htpasswd refactor: config module, experiments renamed to flags (#1996) 2021-04-09 17:54:25 +02:00
jest.config.js feat: relocate core packages (#1906) 2021-04-09 17:54:13 +02:00
LICENSE feat: relocate core packages (#1906) 2021-04-09 17:54:13 +02:00
package.json chore: update versions (6-next) (#2456) 2021-10-15 23:13:06 +02:00
README.md feat: allow other password hashing algorithms (#1917) (#2072) 2021-04-09 17:54:35 +02:00
tsconfig.build.json feat: add typescript project references settings (#1933) 2021-04-09 17:54:19 +02:00
tsconfig.json refactor: remove @verdaccio/commons-api in favor @verdaccio/core and remove duplication (#2455) 2021-09-26 00:08:00 +02:00

verdaccio (latest) Known Vulnerabilities CircleCI codecov FOSSA Status backers discord MIT node

Verdaccio Module For User Auth Via Htpasswd

verdaccio-htpasswd is a default authentication plugin for the Verdaccio.

This plugin is being used as dependency after v3.0.0-beta.x. The v2.x still contains this plugin built-in.

Install

As simple as running:

$ npm install -g verdaccio-htpasswd

Configure

auth:
    htpasswd:
        file: ./htpasswd
        # Maximum amount of users allowed to register, defaults to "+infinity".
        # You can set this to -1 to disable registration.
        #max_users: 1000
        # Hash algorithm, possible options are: "bcrypt", "md5", "sha1", "crypt".
        #algorithm: bcrypt
        # Rounds number for "bcrypt", will be ignored for other algorithms.
        #rounds: 10

Logging In

To log in using NPM, run:

    npm adduser --registry  https://your.registry.local

Generate htpasswd username/password combination

If you wish to handle access control using htpasswd file, you can generate username/password combination form here and add it to htpasswd file.

How does it work?

The htpasswd file contains rows corresponding to a pair of username and password separated with a colon character. The password is encrypted using the UNIX system's crypt method and may use MD5 or SHA1.

Plugin Development in Verdaccio

There are many ways to extend Verdaccio, currently it support authentication plugins, middleware plugins (since v2.7.0) and storage plugins since (v3.x).

License

FOSSA Status