prathe_devise_ldap_authenticatable 0.4.10
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.md +187 -0
- data/Rakefile +52 -0
- data/VERSION +1 -0
- data/devise_ldap_authenticatable.gemspec +133 -0
- data/lib/devise_ldap_authenticatable.rb +48 -0
- data/lib/devise_ldap_authenticatable/exception.rb +6 -0
- data/lib/devise_ldap_authenticatable/ldap_adapter.rb +242 -0
- data/lib/devise_ldap_authenticatable/logger.rb +11 -0
- data/lib/devise_ldap_authenticatable/model.rb +101 -0
- data/lib/devise_ldap_authenticatable/routes.rb +8 -0
- data/lib/devise_ldap_authenticatable/schema.rb +14 -0
- data/lib/devise_ldap_authenticatable/strategy.rb +36 -0
- data/lib/devise_ldap_authenticatable/version.rb +4 -0
- data/lib/generators/devise_ldap_authenticatable/install_generator.rb +62 -0
- data/lib/generators/devise_ldap_authenticatable/templates/ldap.yml +51 -0
- data/rails/init.rb +2 -0
- data/test/devise_ldap_authenticatable_test.rb +8 -0
- data/test/ldap/base.ldif +73 -0
- data/test/ldap/clear.ldif +26 -0
- data/test/ldap/local.schema +6 -0
- data/test/ldap/run-server.sh +10 -0
- data/test/ldap/server.pem +38 -0
- data/test/ldap/slapd-ssl-test.conf +107 -0
- data/test/ldap/slapd-test.conf +107 -0
- data/test/rails_app/Gemfile +22 -0
- data/test/rails_app/Gemfile.lock +159 -0
- data/test/rails_app/Rakefile +7 -0
- data/test/rails_app/app/controllers/application_controller.rb +4 -0
- data/test/rails_app/app/controllers/posts_controller.rb +15 -0
- data/test/rails_app/app/helpers/application_helper.rb +2 -0
- data/test/rails_app/app/helpers/posts_helper.rb +2 -0
- data/test/rails_app/app/models/post.rb +2 -0
- data/test/rails_app/app/models/user.rb +10 -0
- data/test/rails_app/app/views/layouts/application.html.erb +26 -0
- data/test/rails_app/app/views/posts/index.html.erb +2 -0
- data/test/rails_app/config.ru +4 -0
- data/test/rails_app/config/application.rb +46 -0
- data/test/rails_app/config/boot.rb +13 -0
- data/test/rails_app/config/cucumber.yml +8 -0
- data/test/rails_app/config/database.yml +25 -0
- data/test/rails_app/config/environment.rb +5 -0
- data/test/rails_app/config/environments/development.rb +22 -0
- data/test/rails_app/config/environments/production.rb +46 -0
- data/test/rails_app/config/environments/test.rb +34 -0
- data/test/rails_app/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails_app/config/initializers/devise.rb +140 -0
- data/test/rails_app/config/initializers/inflections.rb +10 -0
- data/test/rails_app/config/initializers/mime_types.rb +5 -0
- data/test/rails_app/config/initializers/secret_token.rb +7 -0
- data/test/rails_app/config/initializers/session_store.rb +8 -0
- data/test/rails_app/config/ldap.yml +22 -0
- data/test/rails_app/config/ldap_with_erb.yml +23 -0
- data/test/rails_app/config/ldap_with_uid.yml +18 -0
- data/test/rails_app/config/locales/devise.en.yml +39 -0
- data/test/rails_app/config/locales/en.yml +5 -0
- data/test/rails_app/config/routes.rb +64 -0
- data/test/rails_app/config/ssl_ldap.yml +21 -0
- data/test/rails_app/config/ssl_ldap_with_erb.yml +23 -0
- data/test/rails_app/config/ssl_ldap_with_uid.yml +18 -0
- data/test/rails_app/db/migrate/20100708120302_create_posts.rb +14 -0
- data/test/rails_app/db/migrate/20100708120448_devise_create_users.rb +26 -0
- data/test/rails_app/db/schema.rb +41 -0
- data/test/rails_app/db/seeds.rb +7 -0
- data/test/rails_app/features/manage_logins.feature +35 -0
- data/test/rails_app/features/step_definitions/login_steps.rb +21 -0
- data/test/rails_app/features/step_definitions/web_steps.rb +219 -0
- data/test/rails_app/features/support/env.rb +58 -0
- data/test/rails_app/features/support/paths.rb +38 -0
- data/test/rails_app/lib/tasks/.gitkeep +0 -0
- data/test/rails_app/lib/tasks/cucumber.rake +53 -0
- data/test/rails_app/public/404.html +26 -0
- data/test/rails_app/public/422.html +26 -0
- data/test/rails_app/public/500.html +26 -0
- data/test/rails_app/public/images/rails.png +0 -0
- data/test/rails_app/public/javascripts/application.js +2 -0
- data/test/rails_app/public/javascripts/controls.js +965 -0
- data/test/rails_app/public/javascripts/dragdrop.js +974 -0
- data/test/rails_app/public/javascripts/effects.js +1123 -0
- data/test/rails_app/public/javascripts/prototype.js +4874 -0
- data/test/rails_app/public/javascripts/rails.js +118 -0
- data/test/rails_app/public/stylesheets/.gitkeep +0 -0
- data/test/rails_app/script/cucumber +10 -0
- data/test/rails_app/script/rails +6 -0
- data/test/rails_app/test/factories/users.rb +14 -0
- data/test/rails_app/test/functional/posts_controller_test.rb +58 -0
- data/test/rails_app/test/performance/browsing_test.rb +9 -0
- data/test/rails_app/test/test_helper.rb +36 -0
- data/test/rails_app/test/unit/helpers/posts_helper_test.rb +4 -0
- data/test/rails_app/test/unit/post_test.rb +4 -0
- data/test/rails_app/test/unit/user_test.rb +254 -0
- data/test/test_helper.rb +3 -0
- metadata +161 -0
@@ -0,0 +1,51 @@
|
|
1
|
+
## Authorizations
|
2
|
+
# Uncomment out the merging for each enviornment that you'd like to include.
|
3
|
+
# You can also just copy and paste the tree (do not include the "authorizations") to each
|
4
|
+
# enviornment if you need something different per enviornment.
|
5
|
+
authorizations: &AUTHORIZATIONS
|
6
|
+
group_base: ou=groups,dc=test,dc=com
|
7
|
+
## Requires config.ldap_check_group_membership in devise.rb be true
|
8
|
+
# Can have multiple values, must match all to be authorized
|
9
|
+
required_groups:
|
10
|
+
# If only a group name is given, membership will be checked against "uniqueMember"
|
11
|
+
- cn=admins,ou=groups,dc=test,dc=com
|
12
|
+
- cn=users,ou=groups,dc=test,dc=com
|
13
|
+
# If an array is given, the first element will be the attribute to check against, the second the group name
|
14
|
+
- ["moreMembers", "cn=users,ou=groups,dc=test,dc=com"]
|
15
|
+
## Requires config.ldap_check_attributes in devise.rb to be true
|
16
|
+
## Can have multiple attributes and values, must match all to be authorized
|
17
|
+
require_attribute:
|
18
|
+
objectClass: inetOrgPerson
|
19
|
+
authorizationRole: postsAdmin
|
20
|
+
|
21
|
+
## Enviornments
|
22
|
+
|
23
|
+
development:
|
24
|
+
host: localhost
|
25
|
+
port: 389
|
26
|
+
attribute: cn
|
27
|
+
base: ou=people,dc=test,dc=com
|
28
|
+
admin_user: cn=admin,dc=test,dc=com
|
29
|
+
admin_password: admin_password
|
30
|
+
ssl: false
|
31
|
+
# <<: *AUTHORIZATIONS
|
32
|
+
|
33
|
+
test:
|
34
|
+
host: localhost
|
35
|
+
port: 3389
|
36
|
+
attribute: cn
|
37
|
+
base: ou=people,dc=test,dc=com
|
38
|
+
admin_user: cn=admin,dc=test,dc=com
|
39
|
+
admin_password: admin_password
|
40
|
+
ssl: simple_tls
|
41
|
+
# <<: *AUTHORIZATIONS
|
42
|
+
|
43
|
+
production:
|
44
|
+
host: localhost
|
45
|
+
port: 636
|
46
|
+
attribute: cn
|
47
|
+
base: ou=people,dc=test,dc=com
|
48
|
+
admin_user: cn=admin,dc=test,dc=com
|
49
|
+
admin_password: admin_password
|
50
|
+
ssl: start_tls
|
51
|
+
# <<: *AUTHORIZATIONS
|
data/rails/init.rb
ADDED
data/test/ldap/base.ldif
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
# ldapadd -x -h localhost -p 3389 -D "cn=admin,dc=test,dc=com" -w secret -f base.ldif
|
2
|
+
|
3
|
+
dn: dc=test,dc=com
|
4
|
+
objectClass: dcObject
|
5
|
+
objectClass: organizationalUnit
|
6
|
+
dc: test
|
7
|
+
ou: Test
|
8
|
+
|
9
|
+
dn: ou=people,dc=test,dc=com
|
10
|
+
objectClass: organizationalUnit
|
11
|
+
ou: people
|
12
|
+
|
13
|
+
dn: ou=others,dc=test,dc=com
|
14
|
+
objectClass: organizationalUnit
|
15
|
+
ou: others
|
16
|
+
|
17
|
+
dn: ou=groups,dc=test,dc=com
|
18
|
+
objectClass: organizationalUnit
|
19
|
+
ou: groups
|
20
|
+
|
21
|
+
# example.user@test.com, people, test.com
|
22
|
+
dn: cn=example.user@test.com,ou=people,dc=test,dc=com
|
23
|
+
objectClass: inetOrgPerson
|
24
|
+
objectClass: authorizations
|
25
|
+
sn: User
|
26
|
+
uid: example_user
|
27
|
+
mail: example.user@test.com
|
28
|
+
cn: example.user@test.com
|
29
|
+
authorizationRole: blogUser
|
30
|
+
userPassword:: e1NTSEF9ZXRYaE9NcjRjOGFiTjlqYUxyczZKSll5MFlaZUF1NURCVWhhY0E9PQ=
|
31
|
+
=
|
32
|
+
|
33
|
+
# other.user@test.com
|
34
|
+
dn: cn=other.user@test.com,ou=others,dc=test,dc=com
|
35
|
+
objectClass: inetOrgPerson
|
36
|
+
objectClass: authorizations
|
37
|
+
objectClass: organizationalPerson
|
38
|
+
objectClass: person
|
39
|
+
objectClass: top
|
40
|
+
sn: Other
|
41
|
+
uid: other_user
|
42
|
+
cn: other.user@test.com
|
43
|
+
authorizationRole: blogUser
|
44
|
+
userPassword:: e1NIQX1IQXdtdk13RGF1ZUpyZDhwakxXMzZ6Yi9jTUU9
|
45
|
+
|
46
|
+
# example.admin@test.com, people, test.com
|
47
|
+
dn: cn=example.admin@test.com,ou=people,dc=test,dc=com
|
48
|
+
objectClass: inetOrgPerson
|
49
|
+
objectClass: authorizations
|
50
|
+
objectClass: organizationalPerson
|
51
|
+
objectClass: person
|
52
|
+
objectClass: top
|
53
|
+
sn: Admin
|
54
|
+
uid: example_admin
|
55
|
+
cn: example.admin@test.com
|
56
|
+
authorizationRole: blogAdmin
|
57
|
+
userPassword:: e1NIQX0wcUNXaERISGFwWmc3ekJxZWRRanBzNW1EUDA9
|
58
|
+
|
59
|
+
# users, groups, test.com
|
60
|
+
dn: cn=users,ou=groups,dc=test,dc=com
|
61
|
+
objectClass: authorizations
|
62
|
+
objectClass: groupOfUniqueNames
|
63
|
+
objectClass: top
|
64
|
+
uniqueMember: cn=example.user@test.com,ou=people,dc=test,dc=com
|
65
|
+
authorizationRole: cn=example.admin@test.com,ou=people,dc=test,dc=com
|
66
|
+
cn: users
|
67
|
+
|
68
|
+
# users, groups, test.com
|
69
|
+
dn: cn=admins,ou=groups,dc=test,dc=com
|
70
|
+
objectClass: groupOfUniqueNames
|
71
|
+
objectClass: top
|
72
|
+
uniqueMember: cn=example.admin@test.com,ou=people,dc=test,dc=com
|
73
|
+
cn: admins
|
@@ -0,0 +1,26 @@
|
|
1
|
+
dn: cn=admins,ou=groups,dc=test,dc=com
|
2
|
+
changetype: delete
|
3
|
+
|
4
|
+
dn: cn=users,ou=groups,dc=test,dc=com
|
5
|
+
changetype: delete
|
6
|
+
|
7
|
+
dn: cn=example.admin@test.com,ou=people,dc=test,dc=com
|
8
|
+
changetype: delete
|
9
|
+
|
10
|
+
dn: cn=example.user@test.com,ou=people,dc=test,dc=com
|
11
|
+
changetype: delete
|
12
|
+
|
13
|
+
dn: cn=other.user@test.com,ou=others,dc=test,dc=com
|
14
|
+
changetype: delete
|
15
|
+
|
16
|
+
dn: ou=groups,dc=test,dc=com
|
17
|
+
changetype: delete
|
18
|
+
|
19
|
+
dn: ou=people,dc=test,dc=com
|
20
|
+
changetype: delete
|
21
|
+
|
22
|
+
dn: ou=others,dc=test,dc=com
|
23
|
+
changetype: delete
|
24
|
+
|
25
|
+
dn: dc=test,dc=com
|
26
|
+
changetype: delete
|
@@ -0,0 +1,38 @@
|
|
1
|
+
-----BEGIN RSA PRIVATE KEY-----
|
2
|
+
MIICXQIBAAKBgQC/hxFetCTh++3sEwchxuscH5TID0Wj2S/heBjY6RuK5rPrAcUg
|
3
|
+
rA7jFEFilEQYpfGe3LIMBkr5pP4aR1NrLuvKZaHuBvRLwOcU7SbuFQ3FQLaJA3UK
|
4
|
+
E2IOH9wMg1BMcG1WbzB1nKc650omKo7KqOAIYFFVq3gzlDRUmHF6dCAnvwIDAQAB
|
5
|
+
AoGAcOBJfGbu1cCEF/2e1mlFZu214bIeeNInRdphynSXpuUQZBBG/Vpp66qkXlTD
|
6
|
+
TUN/gwDObgfHaBm1KAehQioFC9ys1Iymlt8IeRYXH9Tkl7URe30QGAGjdIPohWpZ
|
7
|
+
xl/aMrpQVvQukaStRNoJXA32j+tuR2KbxAK6bu9iLzXvCQECQQD6AOzHVDB06ZjF
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
|
+
# This file should NOT be world readable.
|
4
|
+
#
|
5
|
+
include /etc/openldap/schema/core.schema
|
6
|
+
include /etc/openldap/schema/cosine.schema
|
7
|
+
include /etc/openldap/schema/inetorgperson.schema
|
8
|
+
include /etc/openldap/schema/nis.schema
|
9
|
+
|
10
|
+
## Local definitions
|
11
|
+
# include /etc/openldap/schema/local.schema
|
12
|
+
include local.schema
|
13
|
+
|
14
|
+
# Allow LDAPv2 client connections. This is NOT the default.
|
15
|
+
allow bind_v2
|
16
|
+
|
17
|
+
# Do not enable referrals until AFTER you have a working directory
|
18
|
+
# service AND an understanding of referrals.
|
19
|
+
#referral ldap://root.openldap.org
|
20
|
+
|
21
|
+
pidfile openldap-data/run/slapd.pid
|
22
|
+
argsfile openldap-data/run/slapd.args
|
23
|
+
|
24
|
+
# Load dynamic backend modules:
|
25
|
+
modulepath /usr/lib/openldap
|
26
|
+
|
27
|
+
# modules available in openldap-servers-overlays RPM package:
|
28
|
+
# moduleload accesslog.la
|
29
|
+
# moduleload auditlog.la
|
30
|
+
# moduleload denyop.la
|
31
|
+
# moduleload dyngroup.la
|
32
|
+
# moduleload dynlist.la
|
33
|
+
# moduleload lastmod.la
|
34
|
+
# moduleload pcache.la
|
35
|
+
# moduleload ppolicy.la
|
36
|
+
# moduleload refint.la
|
37
|
+
# moduleload retcode.la
|
38
|
+
# moduleload rwm.la
|
39
|
+
# moduleload smbk5pwd.la
|
40
|
+
# moduleload syncprov.la
|
41
|
+
# moduleload translucent.la
|
42
|
+
# moduleload unique.la
|
43
|
+
# moduleload valsort.la
|
44
|
+
|
45
|
+
# modules available in openldap-servers-sql RPM package:
|
46
|
+
# moduleload back_sql.la
|
47
|
+
|
48
|
+
# The next three lines allow use of TLS for encrypting connections using a
|
49
|
+
# dummy test certificate which you can generate by changing to
|
50
|
+
# /etc/pki/tls/certs, running "make slapd.pem", and fixing permissions on
|
51
|
+
# slapd.pem so that the ldap user or group can read it. Your client software
|
52
|
+
# may balk at self-signed certificates, however.
|
53
|
+
|
54
|
+
## For LDAPS
|
55
|
+
TLSCACertificateFile server.pem
|
56
|
+
TLSCertificateFile server.pem
|
57
|
+
TLSCertificateKeyFile server.pem
|
58
|
+
|
59
|
+
# TLSVerifyClient never
|
60
|
+
|
61
|
+
# Sample security restrictions
|
62
|
+
# Require integrity protection (prevent hijacking)
|
63
|
+
# Require 112-bit (3DES or better) encryption for updates
|
64
|
+
# Require 63-bit encryption for simple bind
|
65
|
+
# security ssf=1 update_ssf=112 simple_bind=64
|
66
|
+
|
67
|
+
# Sample access control policy:
|
68
|
+
# Root DSE: allow anyone to read it
|
69
|
+
# Subschema (sub)entry DSE: allow anyone to read it
|
70
|
+
# Other DSEs:
|
71
|
+
# Allow self write access
|
72
|
+
# Allow authenticated users read access
|
73
|
+
# Allow anonymous users to authenticate
|
74
|
+
# Directives needed to implement policy:
|
75
|
+
|
76
|
+
# access to dn.base="dc=esc" by * read
|
77
|
+
# access to dn.base="cn=Subschema" by * read
|
78
|
+
access to *
|
79
|
+
by self write
|
80
|
+
by * read
|
81
|
+
by anonymous auth
|
82
|
+
|
83
|
+
#
|
84
|
+
# if no access controls are present, the default policy
|
85
|
+
# allows anyone and everyone to read anything but restricts
|
86
|
+
# updates to rootdn. (e.g., "access to * by * read")
|
87
|
+
#
|
88
|
+
# rootdn can always read and write EVERYTHING!
|
89
|
+
|
90
|
+
#######################################################################
|
91
|
+
# ldbm and/or bdb database definitions
|
92
|
+
#######################################################################
|
93
|
+
|
94
|
+
database bdb
|
95
|
+
|
96
|
+
suffix "dc=test,dc=com"
|
97
|
+
directory openldap-data
|
98
|
+
rootdn "cn=admin,dc=test,dc=com"
|
99
|
+
## rootpw = secret
|
100
|
+
rootpw {SSHA}fFjKcZb4cfOAcwSjJer8nCGOEVRUnwCC
|
101
|
+
|
102
|
+
# Indices to maintain for this database
|
103
|
+
index objectClass eq,pres
|
104
|
+
index ou,cn,mail,surname,givenname eq,pres,sub
|
105
|
+
index uidNumber,gidNumber,loginShell eq,pres
|
106
|
+
index uid,memberUid eq,pres,sub
|
107
|
+
index nisMapName,nisMapEntry eq,pres,sub
|
@@ -0,0 +1,107 @@
|
|
1
|
+
#
|
2
|
+
# See slapd.conf(5) for details on configuration options.
|
3
|
+
# This file should NOT be world readable.
|
4
|
+
#
|
5
|
+
include /etc/openldap/schema/core.schema
|
6
|
+
include /etc/openldap/schema/cosine.schema
|
7
|
+
include /etc/openldap/schema/inetorgperson.schema
|
8
|
+
include /etc/openldap/schema/nis.schema
|
9
|
+
|
10
|
+
## Local definitions
|
11
|
+
# include /etc/openldap/schema/local.schema
|
12
|
+
include local.schema
|
13
|
+
|
14
|
+
# Allow LDAPv2 client connections. This is NOT the default.
|
15
|
+
allow bind_v2
|
16
|
+
|
17
|
+
# Do not enable referrals until AFTER you have a working directory
|
18
|
+
# service AND an understanding of referrals.
|
19
|
+
#referral ldap://root.openldap.org
|
20
|
+
|
21
|
+
pidfile openldap-data/run/slapd.pid
|
22
|
+
argsfile openldap-data/run/slapd.args
|
23
|
+
|
24
|
+
# Load dynamic backend modules:
|
25
|
+
modulepath /usr/lib/openldap
|
26
|
+
|
27
|
+
# modules available in openldap-servers-overlays RPM package:
|
28
|
+
# moduleload accesslog.la
|
29
|
+
# moduleload auditlog.la
|
30
|
+
# moduleload denyop.la
|
31
|
+
# moduleload dyngroup.la
|
32
|
+
# moduleload dynlist.la
|
33
|
+
# moduleload lastmod.la
|
34
|
+
# moduleload pcache.la
|
35
|
+
# moduleload ppolicy.la
|
36
|
+
# moduleload refint.la
|
37
|
+
# moduleload retcode.la
|
38
|
+
# moduleload rwm.la
|
39
|
+
# moduleload smbk5pwd.la
|
40
|
+
# moduleload syncprov.la
|
41
|
+
# moduleload translucent.la
|
42
|
+
# moduleload unique.la
|
43
|
+
# moduleload valsort.la
|
44
|
+
|
45
|
+
# modules available in openldap-servers-sql RPM package:
|
46
|
+
# moduleload back_sql.la
|
47
|
+
|
48
|
+
# The next three lines allow use of TLS for encrypting connections using a
|
49
|
+
# dummy test certificate which you can generate by changing to
|
50
|
+
# /etc/pki/tls/certs, running "make slapd.pem", and fixing permissions on
|
51
|
+
# slapd.pem so that the ldap user or group can read it. Your client software
|
52
|
+
# may balk at self-signed certificates, however.
|
53
|
+
|
54
|
+
# ## For LDAPS
|
55
|
+
# TLSCACertificateFile server.pem
|
56
|
+
# TLSCertificateFile server.pem
|
57
|
+
# TLSCertificateKeyFile server.pem
|
58
|
+
#
|
59
|
+
# TLSVerifyClient demand
|
60
|
+
|
61
|
+
# Sample security restrictions
|
62
|
+
# Require integrity protection (prevent hijacking)
|
63
|
+
# Require 112-bit (3DES or better) encryption for updates
|
64
|
+
# Require 63-bit encryption for simple bind
|
65
|
+
# security ssf=1 update_ssf=112 simple_bind=64
|
66
|
+
|
67
|
+
# Sample access control policy:
|
68
|
+
# Root DSE: allow anyone to read it
|
69
|
+
# Subschema (sub)entry DSE: allow anyone to read it
|
70
|
+
# Other DSEs:
|
71
|
+
# Allow self write access
|
72
|
+
# Allow authenticated users read access
|
73
|
+
# Allow anonymous users to authenticate
|
74
|
+
# Directives needed to implement policy:
|
75
|
+
|
76
|
+
# access to dn.base="dc=esc" by * read
|
77
|
+
# access to dn.base="cn=Subschema" by * read
|
78
|
+
access to *
|
79
|
+
by self write
|
80
|
+
by * read
|
81
|
+
by anonymous auth
|
82
|
+
|
83
|
+
#
|
84
|
+
# if no access controls are present, the default policy
|
85
|
+
# allows anyone and everyone to read anything but restricts
|
86
|
+
# updates to rootdn. (e.g., "access to * by * read")
|
87
|
+
#
|
88
|
+
# rootdn can always read and write EVERYTHING!
|
89
|
+
|
90
|
+
#######################################################################
|
91
|
+
# ldbm and/or bdb database definitions
|
92
|
+
#######################################################################
|
93
|
+
|
94
|
+
database bdb
|
95
|
+
|
96
|
+
suffix "dc=test,dc=com"
|
97
|
+
directory openldap-data
|
98
|
+
rootdn "cn=admin,dc=test,dc=com"
|
99
|
+
## rootpw = secret
|
100
|
+
rootpw {SSHA}fFjKcZb4cfOAcwSjJer8nCGOEVRUnwCC
|
101
|
+
|
102
|
+
# Indices to maintain for this database
|
103
|
+
index objectClass eq,pres
|
104
|
+
index ou,cn,mail,surname,givenname eq,pres,sub
|
105
|
+
index uidNumber,gidNumber,loginShell eq,pres
|
106
|
+
index uid,memberUid eq,pres,sub
|
107
|
+
index nisMapName,nisMapEntry eq,pres,sub
|
@@ -0,0 +1,22 @@
|
|
1
|
+
source 'http://rubygems.org'
|
2
|
+
|
3
|
+
gem 'rails', '3.0.0'
|
4
|
+
gem 'sqlite3-ruby', :require => 'sqlite3'
|
5
|
+
|
6
|
+
gem "devise", "~> 1.4.0"
|
7
|
+
gem "devise_ldap_authenticatable", :path => "../../"
|
8
|
+
|
9
|
+
group :test do
|
10
|
+
gem "ruby-debug"
|
11
|
+
gem "mocha"
|
12
|
+
gem "shoulda"
|
13
|
+
gem 'factory_girl_rails'
|
14
|
+
gem "cucumber-rails"
|
15
|
+
gem "database_cleaner"
|
16
|
+
gem "capybara"
|
17
|
+
gem "launchy"
|
18
|
+
gem "autotest-rails"
|
19
|
+
gem "ZenTest"
|
20
|
+
gem "redgreen"
|
21
|
+
gem "autotest-growl"
|
22
|
+
end
|