GithubHelp home page GithubHelp logo

oeph / verdaccio-bitbucket-server Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 2.0 1.04 MB

Verdaccio Authentication Plugin for Bitbucket Server

License: MIT License

JavaScript 100.00%
verdaccio verdaccio-plugin verdaccio-bitbucket-server npm auth bitbucket-server verdaccio-auth-plugin verdaccio-auth

verdaccio-bitbucket-server's Introduction

verdaccio-bitbucket-server

npm npm GitHub code size in bytes NPM

Verdaccio Authentication Plugin for Bitbucket Server

Installation

$ npm install -g verdaccio-bitbucket-server

Plugin Configuration

auth:
  bitbucket-server:
    url: "http://your-server:port"
    allow: "Team A, Developer" # optional; default = ""
    roleTypes: [groups, projects] # optional; default = [groups, projects, repos]
    limit: 100 # optional; default = 100
    cache: false # optional; default = { max: 50, maxAge: 1000 * 60 }

allow

The "allow" config can be used to restrict access to Verdaccio based on groups of the user from bitbucket server. In the above example, only users that have the group "Team A" or "Developer" can login.

Default: "" (empty: all groups are allowed to log in)

Hint: This can only be used if the roleTypes config is not used or does include "groups"

roleTypes

The "roleTypes" specifies, which entities are used for the retrieval of user roles.

Default: [groups, projects, repos]

limit

The "limit" config specifies how many entities are fetched from the server, since paging of the responses is currently not supported.

Default: 100

cache

The "cache" config specifies the lru-cache options. The cache is used to cache requests against bitbucket api.

Hint: Caching can be disabled by specifying false.

Default: { max: 50, maxAge: 1000 * 60 }

Package Configuration

package:
  '**':
    access: $authenticated
    publish: $REPO_WRITE
    proxy: npmjs
    bitbucketServer: true

Access rules

General rules:

  • $all
  • $authenticated

Package rules:

  • $REPO_READ
  • $REPO_WRITE
  • $REPO_ADMIN

The package rules will match the respective rights for the repository.

verdaccio-bitbucket-server's People

Contributors

dependabot[bot] avatar lbevilacqua avatar oeph avatar viceice avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

verdaccio-bitbucket-server's Issues

Groups API returns all the groups, not the ones the user is member

My configuration is:

  bitbucket-server:
    url: http://git.xxx.xxx/
    roleTypes: [groups]
    allow: verdaccio

While making sure the configuration was working in our environment, I noticed that I could login with or without the "verdaccio" group membership. Turns out that making a request to the /rest/api/1.0/groups with my credentials returns also groups that my user isn't member of.

Cache bitbucket server responses

With auth enabled for access packages, this plugin add a lot of load to bitbucket.

This plugin should cache the responses at least for a configurable amount of time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.