mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-06 22:40:26 -05:00
Merge pull request #242 from verdaccio/update_wiki
(doc): Upload wiki documentation
This commit is contained in:
commit
8ecf4ae0a9
3 changed files with 99 additions and 7 deletions
|
@ -15,13 +15,13 @@ from a fresh look at the code and the outstanding issues. So here we are 🎉
|
|||
* [Setting up *uplinks*](uplinks.md)
|
||||
* [Packages Access](packages.md)
|
||||
* [Enable Notifications](notifications.md)
|
||||
* [Installing Plugins](plugins.md)
|
||||
* [Authorization and access](auth.md)
|
||||
<!---
|
||||
* [Logs](logs.md)
|
||||
* [Configure the Web](web.md)
|
||||
|
||||
* [Understand the storage](storage.md)
|
||||
* [Authorization and access](auth.md)
|
||||
* [Installing Plugins](plugins.md)
|
||||
-->
|
||||
|
||||
## Advanced Configurations
|
||||
|
@ -42,7 +42,3 @@ from a fresh look at the code and the outstanding issues. So here we are 🎉
|
|||
|
||||
* [Ansible](ansible.md)
|
||||
* [Docker](docker.md)
|
||||
|
||||
## Extends Verdaccio
|
||||
|
||||
* [Plugins](plugins.md)
|
||||
|
|
38
wiki/auth.md
Normal file
38
wiki/auth.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Authentification
|
||||
|
||||
The authentification is tied to the auth [plugin](plugins.md) you are using. The package restrictions also is handled by the [Package Access](packages.md).
|
||||
|
||||
The client authentification is handled by `npm` client itself. Once you login to the application:
|
||||
|
||||
```bash
|
||||
npm adduser --registry http://localhost:4873
|
||||
```
|
||||
|
||||
A token is generated in the `npm` configuration file hosted in your user home folder. For more information about `.npmrc` read the [official documentation](https://docs.npmjs.com/files/npmrc).
|
||||
|
||||
```bash
|
||||
cat .npmrc
|
||||
registry=http://localhost:5555/
|
||||
//localhost:5555/:_authToken="secretVerdaccioToken"
|
||||
//registry.npmjs.org/:_authToken=secretNpmjsToken
|
||||
```
|
||||
|
||||
## Default htpasswd
|
||||
|
||||
In order to simplify the setup, `verdaccio` use a build-in plugin based on `htpasswd`.
|
||||
|
||||
```yaml
|
||||
auth:
|
||||
htpasswd:
|
||||
file: ./htpasswd
|
||||
# Maximum amount of users allowed to register, defaults to "+inf".
|
||||
# You can set this to -1 to disable registration.
|
||||
#max_users: 1000
|
||||
```
|
||||
|
||||
Property | Type | Required | Example | Support | Description
|
||||
--- | --- | --- | --- | --- | ---
|
||||
file | string | Yes | ./htpasswd | all | file that host the encrypted credentials
|
||||
max_users | number | No | 1000 | all | set limit of users
|
||||
|
||||
In case to decide do not allow user to login, you can set `max_users: -1`.
|
|
@ -1,4 +1,62 @@
|
|||
This is a pre release of plugins compatible with **Verdaccio**.
|
||||
# Plugins
|
||||
|
||||
Verdaccio is an plugabble aplication. Currently supports multiple plugins only for [Auhtentification](auth.md) but there are plans to [improve the plugin system](https://github.com/verdaccio/verdaccio/issues/169). If you are intested to develop your own plugin, read the [development](development.md) section.
|
||||
|
||||
## Usage
|
||||
|
||||
### Installation
|
||||
|
||||
```bash
|
||||
$> npm install --global verdaccio-activedirectory
|
||||
```
|
||||
`verdaccio` as a sinopia fork it has backward compability with plugins that are compatible with `sinopia@1.4.0`. In such case the installation is the same.
|
||||
|
||||
```
|
||||
&> npm install --global sinopia-memory
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
Open the `config.yaml` file and update the `auth` section as follows:
|
||||
|
||||
The default configuration looks like this, due we use a build-in `htpasswd` plugin by default that you can disable just commenting out the following lines.
|
||||
|
||||
```yaml
|
||||
htpasswd:
|
||||
file: ./htpasswd
|
||||
# Maximum amount of users allowed to register, defaults to "+inf".
|
||||
# You can set this to -1 to disable registration.
|
||||
#max_users: 1000
|
||||
```
|
||||
|
||||
and replacing them with (in case you decide to use a `ldap` plugin.
|
||||
|
||||
```yaml
|
||||
auth:
|
||||
activedirectory:
|
||||
url: "ldap://10.0.100.1"
|
||||
baseDN: 'dc=sample,dc=local'
|
||||
domainSuffix: 'sample.local'
|
||||
```
|
||||
|
||||
### Multiple Auth plugins
|
||||
|
||||
This is tecnically possible, the plugins order becames important, the the credentials will resolved in order.
|
||||
|
||||
```yaml
|
||||
auth:
|
||||
htpasswd:
|
||||
file: ./htpasswd
|
||||
# Maximum amount of users allowed to register, defaults to "+inf".
|
||||
# You can set this to -1 to disable registration.
|
||||
#max_users: 1000
|
||||
activedirectory:
|
||||
url: "ldap://10.0.100.1"
|
||||
baseDN: 'dc=sample,dc=local'
|
||||
domainSuffix: 'sample.local'
|
||||
```
|
||||
|
||||
This is a list of plugins compatible with **Verdaccio**.
|
||||
|
||||
## Sinopia Legacy Plugins
|
||||
|
||||
|
|
Loading…
Reference in a new issue