Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change dn: dn= to dn: cn= #26

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
*.iml
target
dependency-reduced-pom.xml
log
work
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM maven:3.2-jdk-7-onbuild
VOLUME /usr/src/app/etc
WORKDIR /usr/src/app


# Defaults that work with
# https://registry.hub.docker.com/u/durdn/atlassian-crowd/dockerfile/
ENV CROWD_APP_NAME crowd-ldap-server
ENV CROWD_APP_PW crowd-ldap-server
ENV CROWD_APP_URL http://crowd:8095/
ENV CROWD_URL http://crowd:8095/crowd

EXPOSE 10389

CMD ["/usr/src/app/run.sh"]
101 changes: 99 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,106 @@
# Crowd LDAP Server

Implementation of an LDAP server that delegates authentication to an Atlassian Crowd installation
Implementation of an LDAP server that delegates authentication to an
[Atlassian Crowd](https://www.atlassian.com/software/crowd/overview) installation
using the Crowd REST API.

This service allows your favourite SSO authentication source to be used from many legacy devices, appliances and systems.

The LDAP implementation is based on the Apache Directory Server v1.5.7, which is distributed under the Apache v2.0 License.
The LDAP implementation is based on the [Apache Directory Server](https://directory.apache.org/) v1.5.7,
which is distributed under the [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0).

## License

[Crowd LDAP Server Bundle](https://github.com/dwimberger/crowd-ldap-server) is
licenced under the [Apache License v2.0](LICENSE.txt).

Copyright 2012 [Dieter Wimberger](http://dieter.wimpi.net)

See [NOTICE.txt](NOTICE.txt) for details.

## Building

To build this source code, you will need [Apache Maven 3](https://maven.apache.org/download.html) and
[Java JDK 7](http://www.oracle.com/technetwork/java/javase/downloads/) or newer.

Then run:

mvn clean install



## Configuration

You will need to edit `etc/crowd.properties` to specify the connection details of the
Crowd server after
[adding an application to Crowd](https://confluence.atlassian.com/display/CROWD/Adding+an+Application)

If you are running `run.sh` you can alternatively set the configuration using these shell variables:

CROWD_APP_NAME
CROWD_APP_PW
CROWD_APP_URL
CROWD_URL

You can configure the LDAP port (default: 10389) and enable SSL in `etc/crowd-ldap-server.properties`


## Running

You can run this service by executing:

./run.sh

or on Windows:

run.bat

## Docker image

This application is also available as an [Docker](https://www.docker.com/) image
[stain/crowd-ldap-server](https://registry.hub.docker.com/u/stain/crowd-ldap-server/).

docker pull stain/crowd-ldap-server

To instead build the Docker image from this source:

docker build -t crowd-ldap-server .


To run the image you will need to expose the port `10389` and specify the environment variables:

docker run -p 10389:10389 -e CROWD_URL=http://crowd.example.com:8095/crowd -e CROWD_APP_PW s3cret stain/crowd-ldap-server

The default variables are:

CROWD_APP_NAME crowd-ldap-server
CROWD_APP_PW crowd-ldap-server
CROWD_APP_URL http://crowd:8095/
CROWD_URL http://crowd:8095/crowd

This can thus be combined with the
[atlassian-crowd](https://registry.hub.docker.com/u/durdn/atlassian-crowd/) docker image:

docker run -p 8095:8095 --name crowd griff/crowd

After setting up http://localhost:8095/crowd with a valid license, you can
[add an application to Crowd](https://confluence.atlassian.com/display/CROWD/Adding+an+Application) for
`crowd-ldap-server` as a _Generic Application_.

For the _URL_ field either use `http://example.com/` (as the LDAP server has not got a web interface) or
the URL of the service that ultimately will be using the LDAP server.

For the _Remote Address_ field you should set the IP address as a range `172.17.0.0/16`
as Docker will allocate virtual IP addresses dynamically. Note that the
actual range will vary per host.

To determine the IP address range, try

$ docker run busybox head -n1 /etc/hosts
172.17.0.21 1489e30925d0

Finally start the `crowd-ldap-server` container:

docker run --link crowd:crowd -p 10389:10389 -e CROWD_APP_PW s3cret stain/crowd-ldap-server


Loading