Coder Social home page Coder Social logo

geminabox-ldap's Introduction

geminabox-ldap

Gem "in a box" with LDAP/AD authentication & branding on Docker

A Quick Demo

To upload a gem, authenticate as tesla with password password.

docker run -d -p 2222:9292 woodie/geminabox-ldap

Production Usage

Make sure /var/lib/geminabox-data is backed up on the host. Pass configuration information by environment file (see examples below):

docker run -d -p 2222:9292 --restart unless-stopped --env-file our.env \
-v /var/lib/geminabox-data:/app/data:rw woodie/geminabox-ldap:latest

Nginx Proxy

Use Nginx and setup a CNAME. For testing, add the hostname rubygems.example.com to your /etc/hosts file.

docker run -d -p 80:80 --restart unless-stopped \
-v /var/run/docker.sock:/tmp/docker.sock:ro woodie/nginx-proxy:latest

General Configuration

Environment variables that should be passed to the container can go in our.env file. The RACK_ENV variable tell rack to behave in production mode (especially regarding errors). The VIRTUAL_HOST is used by the Nginx, the HEADER_IMAGE will replace the generic image, and the AUTH_BACKDOOR provides an upload token for users that have already authenticated.

# General configuration
RACK_ENV=production
PUBLISH_PORT=2222
VIRTUAL_HOST=rubygems.example.com
HEADER_IMAGE=http://bit.ly/2lJIYsJ
AUTH_BACKDOOR=allow

LDAP/AD Configuration

When LDAP_BIND_DN is not provided, LDAP_ATTRIBUTE, LDAP_BRANCH and LDAP_BASE are used to construct a DN for LDAP authentication, while sAMAccountname and LDAP_BASE are used for Active Directory. Use LDAP_MEMBER to restrict gem uploads to a specific group.

# Sample LDAP configurtion (test-credentials: 'tesla', 'password')
LDAP_ATTRIBUTE=uid
LDAP_BASE=DC=example,DC=com
LDAP_MEMBER=OU=scientists
LDAP_HOST=ldap.forumsys.com

# SAMPLE LDAP configurtion (test-credentials: 'testdev2', 'password')
LDAP_ATTRIBUTE=uid
LDAP_BASE=DC=zflexsoftware,DC=com
LDAP_BRANCH=OU=users,OU=developers
LDAP_MEMBER=CN=devgroup1
LDAP_HOST=www.zflexldap.com
LDAP_BIND_DN=cn=ro_admin,ou=sysadmins,dc=zflexsoftware,dc=com
LDAP_BIND_PASSWORD=zflexpass

# Sample AD configurtion
LDAP_ATTRIBUTE=sAMAccountname
LDAP_BASE=DC=example,DC=com
LDAP_MEMBER=CN=DEVELOPERS
LDAP_HOST=example.com

Documentation

The FAQ is intended to be generic, provide best practices. Corrections and suggestions are welcome.

geminabox-ldap's People

Contributors

woodie avatar

Watchers

James Cloos avatar

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.