1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-17 07:45:52 +01:00
verdaccio/website/translated_docs/zh-Hans/protect-your-dependencies.md

45 lines
1.4 KiB
Markdown
Raw Normal View History

New Crowdin translations (#456) * New translations ansible.md (Chinese Simplified) * New translations packages.md (Chinese Simplified) * New translations windows.md (Chinese Simplified) * New translations web.md (Chinese Simplified) * New translations use-cases.md (Chinese Simplified) * New translations uplinks.md (Chinese Simplified) * New translations test.md (Chinese Simplified) * New translations ssl.md (Chinese Simplified) * New translations server.md (Chinese Simplified) * New translations reverse-proxy.md (Chinese Simplified) * New translations repositories.md (Chinese Simplified) * New translations protect-your-dependencies.md (Chinese Simplified) * New translations plugins.md (Chinese Simplified) * New translations notifications.md (Chinese Simplified) * New translations auth.md (Chinese Simplified) * New translations logger.md (Chinese Simplified) * New translations kubernetes.md (Chinese Simplified) * New translations install.md (Chinese Simplified) * New translations index.md (Chinese Simplified) * New translations iis-server.md (Chinese Simplified) * New translations home.md (Chinese Simplified) * New translations docker.md (Chinese Simplified) * New translations dev-plugins.md (Chinese Simplified) * New translations contributing.md (Chinese Simplified) * New translations config.md (Chinese Simplified) * New translations cli.md (Chinese Simplified) * New translations build.md (Chinese Simplified) * New translations en.json (Chinese Simplified) * New translations en.json (Chinese Simplified) * New translations en.json (Chinese Simplified) * New translations en.json (Chinese Simplified) * New translations install.md (Chinese Simplified) * New translations install.md (Chinese Simplified) * New translations home.md (Chinese Simplified) * New translations cli.md (Chinese Simplified) * New translations config.md (Chinese Simplified) * New translations config.md (Chinese Simplified) * New translations config.md (Chinese Simplified) * New translations auth.md (Chinese Simplified) * New translations config.md (Chinese Simplified) * New translations auth.md (Chinese Simplified) * New translations auth.md (Chinese Simplified) * New translations config.md (Chinese Simplified) * New translations en.json (Spanish) * New translations en.json (Spanish) * New translations en.json (Spanish) * New translations en.json (Spanish) * New translations en.json (Spanish) * New translations config.md (Chinese Simplified) * New translations config.md (Spanish) * New translations config.md (Urdu (Pakistan)) * New translations config.md (Chinese Traditional, Hong Kong) * New translations config.md (Portuguese, Brazilian) * New translations config.md (Chinese Traditional)
2018-01-08 20:45:03 +01:00
---
id: protect-your-dependencies
title: Protecting packages
---
`verdaccio` allows you protect publish, to achieve that you will need to set up correctly your [packages acces](packages).
### Package configuration
Let's see for instance the following set up. You have a set of dependencies what are prefixed with `my-company-*` and you need to protect them from anonymous or another logged user without right credentials.
```yaml
'my-company-*':
access: admin teamA teamB teamC
publish: admin teamA
proxy: npmjs
```
With this configuration, basically we allow to groups **admin** and **teamA** to * publish* and **teamA** **teamB** **teamC** *access* to such dependencies.
### Use case: teamD try to access the dependency
So, if I am logged as **teamD**. I shouldn't be able to access all dependencies that match with `my-company-*` pattern.
```bash
➜ npm whoami
teamD
```
I won't have access to such dependencies and also won't be visible via web for user **teamD**. If I try to access the following will happen.
```bash
➜ npm install my-company-core
npm ERR! code E403
npm ERR! 403 Forbidden: webpack-1@latest
```
or with `yarn`
```bash
➜ yarn add my-company-core
yarn add v0.24.6
info No lockfile found.
[1/4]
error An unexpected error occurred: "http://localhost:5555/webpack-1: unregistered users are not allowed to access package my-company-core".
```