Skip to content

Commit

Permalink
Imported.
Browse files Browse the repository at this point in the history
This was originally developed in the jenkins-infra/jira repository, but
moved over here as it is useful outside JIRA.
  • Loading branch information
kohsuke committed Mar 28, 2015
0 parents commit 7d30bf1
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM nickstenning/slapd

RUN apt-get -y update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y ldap-utils
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Test LDAP Container

This container runs OpenLDAP, like `ldap.jenkins-ci.org`, except that it uses bogus test data instead
of real production data. This is useful as a test fixture.
59 changes: 59 additions & 0 deletions data.ldif
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#
# Dummy user database for testing
#
# User 'kohsuke' is admin, user 'alice' is a regular user.
# Both has the password 'password'
#

#dn: dc=jenkins-ci,dc=org
#objectClass: top
#objectClass: dcObject
#objectClass: organization
#o: Jenkins users
#dc: Jenkins-Ci
#description: Jenkins users

#dn: cn=admin,dc=jenkins-ci,dc=org
#objectClass: simpleSecurityObject
#objectClass: organizationalRole
#cn: admin
#description: LDAP administrator
#userPassword: {SSHA}yI6cZwQadOA1e+/f+T+H3eCQQhRzYWx0

dn: ou=people,dc=jenkins-ci,dc=org
objectClass: organizationalUnit
ou: people

dn: ou=groups,dc=jenkins-ci,dc=org
objectClass: organizationalUnit
ou: groups

dn: cn=admins,ou=groups,dc=jenkins-ci,dc=org
objectClass: groupOfNames
cn: admins
description: people with infrastructure admin access
member: cn=kohsuke,ou=people,dc=jenkins-ci,dc=org

dn: cn=all,ou=groups,dc=jenkins-ci,dc=org
objectClass: groupOfNames
cn: all
member: cn=kohsuke,ou=people,dc=jenkins-ci,dc=org
member: cn=kohsuke2,ou=people,dc=jenkins-ci,dc=org

dn: cn=kohsuke,ou=people,dc=jenkins-ci,dc=org
objectClass: inetOrgPerson
cn: kohsuke
mail: [email protected]
givenName: Kohsuke
employeeNumber: kohsuke
preferredLanguage: yyy
sn: Kawaguchi
userPassword: {SSHA}yI6cZwQadOA1e+/f+T+H3eCQQhRzYWx0

dn: cn=alice,ou=people,dc=jenkins-ci,dc=org
objectClass: inetOrgPerson
cn: alice
mail: [email protected]
givenName: Alice
sn: Ashley
userPassword: {SSHA}yI6cZwQadOA1e+/f+T+H3eCQQhRzYWx0
6 changes: 6 additions & 0 deletions userPasswd.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env ruby
# Ruby script to generate SSHA (Good for LDAP)
require 'digest/sha1'
require 'base64'
hash = "{SSHA}"+Base64.encode64(Digest::SHA1.digest('password'+'salt')+'salt').chomp!
puts 'userPassword: '+hash+"\n"

0 comments on commit 7d30bf1

Please sign in to comment.