Giter VIP home page Giter VIP logo

conan-ldap-authentication's Introduction

Build Status codecov License: MIT Pypi Download

Conan LDAP Authentication

A LDAP authentication plugin for Conan.io

Features

  • Authenticate to Conan server, through your LDAP server
  • Customize host address, port and DN

Installation

$ pip install conan_ldap_authentication

Or you can clone this repository and store its location in PYTHONPATH.

The plugin uses HOME directory as reference to be installed.
Keep in mind if you are running as root or admin when install the plugin.
If you are root, the file is available there /root/.conan_server
The motivation is because Conan server could be executed by any user on your system.
Each user have it own .conan_server directory.

Configuration

To configure the LDAP authentication in Conan, you need follow two steps:

  1. Add custom authenticator in ~/.conan_server/server.conf
[server]
jwt_secret: ****
jwt_expire_minutes: 120

ssl_enabled: False
port: 9300
public_port:
host_name: localhost

# Check docs.conan.io to implement a different authenticator plugin for conan_server
# if custom_authenticator is not specified, [users] section will be used to authenticate
# the users.
#
custom_authenticator: ldap_authentication

[write_permissions]
# "opencv/2.3.4@lasote/testing": default_user,default_user2

[read_permissions]
# opencv/1.2.3@lasote/testing: default_user default_user2
# By default all users can read all blocks
*/*@*/*: *

[users]
demo: demo
  1. Configure you LDAP server information in ~/.conan_server/ldap_authentication.conf
[ldap]
# LDAP server address
host: ldap://ldap.company.org
# Distinguished name (DN) of the entry
distinguished_name: cn=$username,ou=Users,dc=company,dc=org

You could customize ldap_authentication.conf path, by CONAN_LDAP_AUTHENTICATION_CONFIG_FILE

$ export CONAN_LDAP_AUTHENTICATION_CONFIG_FILE=/etc/conan/cofig/ldap_authentication.conf

To obtain more information, how to use a custom authentication in Conan.io, read the Authentication section

Usage

Just call conan authentication, as before

$ conan user -p my_ldap_password my_ldap_username

Conan will use your username and password to authenticate to registered LDAP server.

Tests and Development

To run all unit tests:

$ nosetests -v --with-coverage --cover-package=conan .

Dependencies

The package pyLDAP needs a bunch of packages installed, without these packages, the installation will fail.

  • python-dev
  • libldap2-dev
  • libsasl2-dev
  • libssl-dev

Docker support

If you want to run Conan server with LDAP support on Docker, you can try to Docker recipe on this repository:

docker build -t conanio/conan_server_ldap .
docker run conanio/conan_server_ldap

License

MIT

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.