kch-rubycas-server 0.8.0.20090715

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. data/CHANGELOG.txt +1 -0
  2. data/History.txt +270 -0
  3. data/LICENSE.txt +504 -0
  4. data/Manifest.txt +85 -0
  5. data/PostInstall.txt +3 -0
  6. data/README.rdoc +26 -0
  7. data/Rakefile +4 -0
  8. data/bin/rubycas-server +13 -0
  9. data/bin/rubycas-server-ctl +9 -0
  10. data/config.example.yml +544 -0
  11. data/config.ru +38 -0
  12. data/config/hoe.rb +78 -0
  13. data/config/requirements.rb +15 -0
  14. data/custom_views.example.rb +11 -0
  15. data/lib/casserver.rb +58 -0
  16. data/lib/casserver/authenticators/active_directory_ldap.rb +11 -0
  17. data/lib/casserver/authenticators/base.rb +48 -0
  18. data/lib/casserver/authenticators/client_certificate.rb +46 -0
  19. data/lib/casserver/authenticators/google.rb +54 -0
  20. data/lib/casserver/authenticators/ldap.rb +147 -0
  21. data/lib/casserver/authenticators/ntlm.rb +88 -0
  22. data/lib/casserver/authenticators/open_id.rb +22 -0
  23. data/lib/casserver/authenticators/sql.rb +102 -0
  24. data/lib/casserver/authenticators/sql_encrypted.rb +77 -0
  25. data/lib/casserver/authenticators/sql_md5.rb +19 -0
  26. data/lib/casserver/authenticators/sql_rest_auth.rb +77 -0
  27. data/lib/casserver/authenticators/test.rb +19 -0
  28. data/lib/casserver/cas.rb +322 -0
  29. data/lib/casserver/conf.rb +75 -0
  30. data/lib/casserver/controllers.rb +456 -0
  31. data/lib/casserver/load_picnic.rb +19 -0
  32. data/lib/casserver/localization.rb +82 -0
  33. data/lib/casserver/models.rb +265 -0
  34. data/lib/casserver/postambles.rb +174 -0
  35. data/lib/casserver/utils.rb +30 -0
  36. data/lib/casserver/version.rb +9 -0
  37. data/lib/casserver/views.rb +245 -0
  38. data/lib/rubycas-server.rb +1 -0
  39. data/lib/rubycas-server/version.rb +1 -0
  40. data/po/de_DE/rubycas-server.po +119 -0
  41. data/po/es_ES/rubycas-server.po +115 -0
  42. data/po/fr_FR/rubycas-server.po +116 -0
  43. data/po/ja_JP/rubycas-server.po +118 -0
  44. data/po/pl_PL/rubycas-server.po +115 -0
  45. data/po/pt_BR/rubycas-server.po +115 -0
  46. data/po/ru_RU/rubycas-server.po +110 -0
  47. data/po/rubycas-server.pot +104 -0
  48. data/public/themes/cas.css +121 -0
  49. data/public/themes/notice.png +0 -0
  50. data/public/themes/ok.png +0 -0
  51. data/public/themes/simple/bg.png +0 -0
  52. data/public/themes/simple/login_box_bg.png +0 -0
  53. data/public/themes/simple/logo.png +0 -0
  54. data/public/themes/simple/theme.css +28 -0
  55. data/public/themes/urbacon/bg.png +0 -0
  56. data/public/themes/urbacon/login_box_bg.png +0 -0
  57. data/public/themes/urbacon/logo.png +0 -0
  58. data/public/themes/urbacon/theme.css +33 -0
  59. data/public/themes/warning.png +0 -0
  60. data/resources/init.d.sh +58 -0
  61. data/script/console +10 -0
  62. data/script/destroy +14 -0
  63. data/script/generate +14 -0
  64. data/script/txt2html +82 -0
  65. data/setup.rb +1585 -0
  66. data/tasks/deployment.rake +34 -0
  67. data/tasks/environment.rake +7 -0
  68. data/tasks/localization.rake +11 -0
  69. data/tasks/website.rake +17 -0
  70. data/vendor/isaac_0.9.1/LICENSE +26 -0
  71. data/vendor/isaac_0.9.1/README +78 -0
  72. data/vendor/isaac_0.9.1/TODO +3 -0
  73. data/vendor/isaac_0.9.1/VERSIONS +3 -0
  74. data/vendor/isaac_0.9.1/crypt/ISAAC.rb +171 -0
  75. data/vendor/isaac_0.9.1/isaac.gemspec +39 -0
  76. data/vendor/isaac_0.9.1/setup.rb +596 -0
  77. data/vendor/isaac_0.9.1/test/TC_ISAAC.rb +76 -0
  78. metadata +193 -0
@@ -0,0 +1,85 @@
1
+ CHANGELOG.txt
2
+ History.txt
3
+ LICENSE.txt
4
+ Manifest.txt
5
+ PostInstall.txt
6
+ README.txt
7
+ Rakefile
8
+ bin/rubycas-server
9
+ bin/rubycas-server-ctl
10
+ config.example.yml
11
+ config.ru
12
+ config/hoe.rb
13
+ config/requirements.rb
14
+ custom_views.example.rb
15
+ lib/casserver.rb
16
+ lib/casserver/authenticators/active_directory_ldap.rb
17
+ lib/casserver/authenticators/base.rb
18
+ lib/casserver/authenticators/client_certificate.rb
19
+ lib/casserver/authenticators/google.rb
20
+ lib/casserver/authenticators/ldap.rb
21
+ lib/casserver/authenticators/ntlm.rb
22
+ lib/casserver/authenticators/open_id.rb
23
+ lib/casserver/authenticators/sql.rb
24
+ lib/casserver/authenticators/sql_encrypted.rb
25
+ lib/casserver/authenticators/sql_md5.rb
26
+ lib/casserver/authenticators/sql_rest_auth.rb
27
+ lib/casserver/authenticators/test.rb
28
+ lib/casserver/cas.rb
29
+ lib/casserver/conf.rb
30
+ lib/casserver/controllers.rb
31
+ lib/casserver/load_picnic.rb
32
+ lib/casserver/localization.rb
33
+ lib/casserver/models.rb
34
+ lib/casserver/postambles.rb
35
+ lib/casserver/utils.rb
36
+ lib/casserver/version.rb
37
+ lib/casserver/views.rb
38
+ lib/rubycas-server.rb
39
+ lib/rubycas-server/version.rb
40
+ locale/de_DE/LC_MESSAGES/rubycas-server.mo
41
+ locale/es_ES/LC_MESSAGES/rubycas-server.mo
42
+ locale/fr_FR/LC_MESSAGES/rubycas-server.mo
43
+ locale/ja_JP/LC_MESSAGES/rubycas-server.mo
44
+ locale/pl_PL/LC_MESSAGES/rubycas-server.mo
45
+ locale/pt_BR/LC_MESSAGES/rubycas-server.mo
46
+ locale/ru_RU/LC_MESSAGES/rubycas-server.mo
47
+ po/de_DE/rubycas-server.po
48
+ po/es_ES/rubycas-server.po
49
+ po/fr_FR/rubycas-server.po
50
+ po/ja_JP/rubycas-server.po
51
+ po/pl_PL/rubycas-server.po
52
+ po/pt_BR/rubycas-server.po
53
+ po/ru_RU/rubycas-server.po
54
+ po/rubycas-server.pot
55
+ public/themes/cas.css
56
+ public/themes/notice.png
57
+ public/themes/ok.png
58
+ public/themes/simple/bg.png
59
+ public/themes/simple/favicon.png
60
+ public/themes/simple/login_box_bg.png
61
+ public/themes/simple/logo.png
62
+ public/themes/simple/theme.css
63
+ public/themes/urbacon/bg.png
64
+ public/themes/urbacon/login_box_bg.png
65
+ public/themes/urbacon/logo.png
66
+ public/themes/urbacon/theme.css
67
+ public/themes/warning.png
68
+ resources/init.d.sh
69
+ script/console
70
+ script/destroy
71
+ script/generate
72
+ script/txt2html
73
+ setup.rb
74
+ tasks/deployment.rake
75
+ tasks/environment.rake
76
+ tasks/localization.rake
77
+ tasks/website.rake
78
+ vendor/isaac_0.9.1/LICENSE
79
+ vendor/isaac_0.9.1/README
80
+ vendor/isaac_0.9.1/TODO
81
+ vendor/isaac_0.9.1/VERSIONS
82
+ vendor/isaac_0.9.1/crypt/ISAAC.rb
83
+ vendor/isaac_0.9.1/isaac.gemspec
84
+ vendor/isaac_0.9.1/setup.rb
85
+ vendor/isaac_0.9.1/test/TC_ISAAC.rb
@@ -0,0 +1,3 @@
1
+
2
+ For more information on RubyCAS-Server, see http://code.google.com/p/rubycas-server
3
+
@@ -0,0 +1,26 @@
1
+ = RubyCAS-Server
2
+
3
+ *Copyright*:: Portions contributed by Matt Zukowski are copyright (c) 2008 Urbacon Ltd.
4
+ Other portions are copyright of their respective authors.
5
+ *Authors*:: See http://github.com/gunark/rubycas-server/commits/
6
+ *Homepage*:: http://rubycas-server.googlecode.com
7
+
8
+ For info and installation instructions please see http://code.google.com/p/rubycas-server
9
+
10
+
11
+ == License
12
+
13
+ RubyCAS-Server is free software; you can redistribute it and/or modify
14
+ it under the terms of the GNU Lesser General Public License as published
15
+ by the Free Software Foundation; either version 2 of the License, or
16
+ (at your option) any later version.
17
+
18
+ RubyCAS-Server is distributed in the hope that it will be useful,
19
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ GNU General Public License for more details.
22
+
23
+ You should have received a copy of the GNU Lesser General Public License
24
+ along with RubyCAS-Server; if not, write to the Free Software
25
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
+
@@ -0,0 +1,4 @@
1
+ require 'config/requirements'
2
+ require 'config/hoe' # setup Hoe + all gem configuration
3
+
4
+ Dir['tasks/**/*.rake'].each { |rake| load rake }
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.expand_path(File.dirname(__FILE__)+"/../lib/casserver/load_picnic")
4
+
5
+ require 'picnic/cli'
6
+
7
+ cli = Picnic::Cli.new(
8
+ 'rubycas-server',
9
+ :app_module => 'CASServer',
10
+ :app_file => File.expand_path(File.dirname(__FILE__)+"/../lib/casserver.rb")
11
+ )
12
+
13
+ cli.handle_cli_input
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.expand_path(File.dirname(__FILE__)+"/../lib/casserver/load_picnic")
4
+
5
+ require 'picnic/service_control'
6
+
7
+ ctl = Picnic::ServiceControl.new('rubycas-server')
8
+
9
+ ctl.handle_cli_input
@@ -0,0 +1,544 @@
1
+ # IMPORTANT NOTE ABOUT YAML CONFIGURATION FILES
2
+ # ---> Be sure to use spaces instead of tabs for indentation. YAML is
3
+ # white-space sensitive!
4
+
5
+ ##### SERVER SETUP ################################################################
6
+
7
+ # There are several ways to run RubyCAS-Server:
8
+ #
9
+ # webrick -- stand-alone WEBrick server; should work out-of-the-box; this is
10
+ # the default method, but probably not suited for high-traffic usage
11
+ # mongrel -- stand-alone Mongrel server; fast, but you'll need to install
12
+ # and compile Mongrel and run it behind an https reverse proxy like
13
+ # Pound or Apache 2.2's mod_proxy (since Mongrel cannot serve out
14
+ # over SSL on its own).
15
+ # passenger -- served out by Apache via the mod_rails/mod_rack module
16
+ # (see http://www.modrails.com/)
17
+ #
18
+ # The following are exampe configurations for each of these three methods:
19
+ #
20
+
21
+
22
+ ###
23
+ ### WEBrick example
24
+ ###
25
+ # WEBrick is a simple, all-Ruby web server. This is the easiest method for running
26
+ # RubyCAS-Server. All you need is an SSL certificate (enter its path under the
27
+ # ssl_cert option). WEBrick is fine for sites with low to medium traffic, but for
28
+ # high-performance scenarios you may want to look into deploying using Mongrel
29
+ # or Passenger.
30
+
31
+ server: webrick
32
+ port: 443
33
+ ssl_cert: /path/to/your/ssl.pem
34
+
35
+ # If your private key is separate from cert
36
+
37
+ #ssl_key: /path/to/your/private_key.pem
38
+
39
+
40
+ # By default the login page will be available at the root path
41
+ # (e.g. https://login.example.net/). The uri_path option lets you serve it from a
42
+ # different path (e.g. https://login.example.net/cas).
43
+
44
+ #uri_path: /cas
45
+
46
+
47
+ # This lets you bind the server to a specific address. Use 0.0.0.0 to listen on
48
+ # all available interfaces (this is the default).
49
+
50
+ #bind_address: 0.0.0.0
51
+
52
+
53
+ ###
54
+ ### Mongrel example
55
+ ###
56
+ # Mongrel is much faster than WEBrick, but there are two caveats:
57
+ # 1. Since Mongrel can't serve out encrypted HTTP on its own (and CAS requires this),
58
+ # you will have to set up a reverse proxy like Pound or Apache's mod_proxy and
59
+ # route through it requests to the Mongrel server. So for example,
60
+ # your Pound server will receive all of the requests to RubyCAS-Server on port 443,
61
+ # and forward them to the Mongrel server listening on port 11011.
62
+ # 2. Some of Mongrel's components are compiled into native binaries, so if you are
63
+ # installing on Linux, make sure you have all of the standard build tools
64
+ # available. The binaries should be automatically compiled for you when you
65
+ # install the mogrel gem (if you're runnings Windows, pre-compiled
66
+ # binaries will be downloaded and installed, so don't worry about this).
67
+
68
+ #server: mongrel
69
+ #port: 110011
70
+
71
+
72
+ # Bind the server to a specific address. Use 0.0.0.0 to listen on all
73
+ # available interfaces (this is the default).
74
+
75
+ #bind_address: 0.0.0.0
76
+
77
+ ### Reverse proxy configuration examples
78
+ # If you're using mod_proxy, your Apache vhost config should look something like this:
79
+ #
80
+ # Listen 443
81
+ # <VirtualHost *:443>
82
+ # ServerAdmin admin@example.net
83
+ # ServerName login.example.net
84
+ #
85
+ # SSLEngine On
86
+ # SSLCertificateFile /etc/apache2/ssl.crt/example.pem
87
+ #
88
+ # # Don't do forward proxying, we only want reverse proxying
89
+ # ProxyRequests Off
90
+ #
91
+ # <Proxy balancer://rubycas>
92
+ # Order allow,deny
93
+ # Allow from all
94
+ # BalancerMember http://127.0.0.1:11011
95
+ # </Proxy>
96
+ # </VirtualHost>
97
+ #
98
+ # For Pound, the config should be something like:
99
+ #
100
+ # ListenHTTPS
101
+ # Address 0.0.0.0
102
+ # Port 11011
103
+ # Cert "/etc/ssl/example.pem"
104
+ #
105
+ # Service
106
+ # BackEnd
107
+ # Address localhost
108
+ # Port 443
109
+ # End
110
+ # End
111
+ # End
112
+
113
+
114
+ ###
115
+ ### Phusion Passenger (running under Apache configured for SSL)
116
+ ###
117
+
118
+ # No additional configuration is requried to run RubyCAS-Server under
119
+ # passsenger. Just follow the normal instructions for a Passenger app
120
+ # (see http://www.modrails.com/).
121
+ #
122
+ # Here's an example Apache vhost config for RubyCAS-Server and Passenger:
123
+ #
124
+ # Listen 442
125
+ # <VirtualHost *:442>
126
+ # ServerAdmin admin@example.net
127
+ # ServerName login.example.net
128
+ #
129
+ # SSLEngine On
130
+ # SSLCertificateFile /etc/apache2/ssl.crt/example.pem
131
+ #
132
+ # RailsAutoDetect off
133
+ #
134
+ # DocumentRoot /usr/lib/ruby/gems/1.8/gems/rubycas-server-0.8.0/public
135
+ #
136
+ # <Directory "/usr/lib/ruby/gems/1.8/gems/rubycas-server-0.8.0/public">
137
+ # AllowOverride all
138
+ # Allow from all
139
+ # </Directory>
140
+ # </VirtualHost>
141
+ #
142
+
143
+
144
+ ##### DATABASE #################################################################
145
+
146
+ # Set up the database connection. Make sure that this database is secure!
147
+ #
148
+ # By default, we use MySQL, since it is widely used and does not require any
149
+ # additional
150
+ # ruby libraries besides ActiveRecord.
151
+ #
152
+ # With MySQL, your config would be something like the following:
153
+ # (be sure to create the casserver database in MySQL beforehand,
154
+ # i.e. `mysqladmin -u root create casserver`)
155
+
156
+ database:
157
+ adapter: mysql
158
+ database: casserver
159
+ username: root
160
+ password:
161
+ host: localhost
162
+
163
+
164
+ #
165
+ # Instead of MySQL you can use SQLite3, PostgreSQL, MSSQL, or anything else
166
+ # supported by ActiveRecord.
167
+ #
168
+ # With SQLite3 (which does not require a separate database server), your
169
+ # configuration would look something like the following (don't forget to install
170
+ # the sqlite3-ruby gem beforehand!):
171
+
172
+ #database:
173
+ # adapter: sqlite3
174
+ # dbfile: /var/lib/casserver.db
175
+
176
+
177
+ ##### AUTHENTICATION ###########################################################
178
+
179
+ # Configure how username/passwords are validated.
180
+ #
181
+ # !!! YOU MUST CONFIGURE AT LEAST ONE OF THESE AUTHENTICATION METHODS !!!
182
+ #
183
+ # There are several built-in methods for authentication:
184
+ # SQL, ActiveDirectory, LDAP, and GoogleAccounts. If none of these work for you,
185
+ # it is relatively easy to write your own custom Authenticator class (see below).
186
+ #
187
+ # === SQL Authentication =======================================================
188
+ #
189
+ # The simplest method is to validate against a SQL database. This assumes
190
+ # that all of your users are stored in a table that has a 'username' column
191
+ # and a 'password' column. When the user logs in, CAS connects to this database
192
+ # and looks for a matching username/password in the users table. If a matching
193
+ # username and password is found, authentication is successful.
194
+ #
195
+ # If you prefer to have your passwords stored in an encrypted form, have a
196
+ # look at the SQLEncrypted authenticator:
197
+ # http://code.google.com/p/rubycas-server/wiki/UsingTheSQLEncryptedAuthenticator
198
+ #
199
+ # If your users table stores passwords with MD5 hashing (for example as with
200
+ # Drupal) try using the SQLMd5 version of the SQL authenticator.
201
+ #
202
+ # Example:
203
+ #
204
+ #authenticator:
205
+ # class: CASServer::Authenticators::SQL
206
+ # database:
207
+ # adapter: mysql
208
+ # database: some_database_with_users_table
209
+ # username: root
210
+ # password:
211
+ # host: localhost
212
+ # user_table: users
213
+ # username_column: username
214
+ # password_column: password
215
+ #
216
+ # When replying to a CAS client's validation request, the server will normally
217
+ # provide the client with the authenticated user's username. However it is
218
+ # possible for the server to provide the client with additional attributes.
219
+ # You can configure the SQL authenticator to provide data from additional
220
+ # columns in the users table by listing the names of the columns under the
221
+ # 'extra_attributes' option. Note though that this functionality is experimental.
222
+ # It should work with RubyCAS-Client, but may or may not work with other CAS
223
+ # clients.
224
+ #
225
+ # For example, with this configuration, the 'full_name' and 'access_level'
226
+ # columns will be provided to your CAS clients along with the username:
227
+ #
228
+ #authenticator:
229
+ # class: CASServer::Authenticators::SQL
230
+ # database:
231
+ # adapter: mysql
232
+ # database: some_database_with_users_table
233
+ # user_table: users
234
+ # username_column: username
235
+ # password_column: password
236
+ # extra_attributes: full_name, access_level
237
+ #
238
+ #
239
+ # === Google Authentication ====================================================
240
+ #
241
+ # The Google authenticator allows users to log in to your CAS server using
242
+ # their Google account credentials (i.e. the same email and password they
243
+ # would use to log in to Google services like Gmail). This authenticator
244
+ # requires no special configuration -- just specify its class name:
245
+ #
246
+ #authenticator:
247
+ # class: CASServer::Authenticators::Google
248
+ #
249
+ # Note that as with all authenticators, it is possible to use the Google
250
+ # authenticator alongside other authenticators. For example, CAS can first
251
+ # attempt to validate the account with Google, and if that fails, fall back
252
+ # to some other local authentication mechanism.
253
+ #
254
+ # For example:
255
+ #
256
+ #authenticator:
257
+ # - class: CASServer::Authenticators::Google
258
+ # - class: CASServer::Authenticators::SQL
259
+ # database:
260
+ # adapter: mysql
261
+ # database: some_database_with_users_table
262
+ # user: root
263
+ # password:
264
+ # host: localhost
265
+ # user_table: user
266
+ # username_column: username
267
+ # password_column: password
268
+ #
269
+ #
270
+ # === ActiveDirectory Authentication ===========================================
271
+ #
272
+ # This method authenticates against Microsoft's Active Directory using LDAP.
273
+ # You must configure the ActiveDirectory server, and base DN. The port number
274
+ # and LDAP filter are optional. You must also enter a CN and password
275
+ # for a special "authenticator" user. This account is used to log in to
276
+ # the ActiveDirectory server and search LDAP. This does not have to be an
277
+ # administrative account -- it only has to be able to search for other
278
+ # users.
279
+ #
280
+ # Note that the auth_user parameter must be the user's CN (Common Name).
281
+ # In Active Directory, the CN is genarally the user's full name, which is usually
282
+ # NOT the same as their username (sAMAccountName).
283
+ #
284
+ # For example:
285
+ #
286
+ #authenticator:
287
+ # class: CASServer::Authenticators::ActiveDirectoryLDAP
288
+ # ldap:
289
+ # host: ad.example.net
290
+ # port: 389
291
+ # base: dc=example,dc=net
292
+ # filter: (objectClass=person)
293
+ # auth_user: authenticator
294
+ # auth_password: itsasecret
295
+ #
296
+ # A more complicated example, where the authenticator will use TLS encryption,
297
+ # will ignore users with disabled accounts, and will pass on the 'cn' and 'mail'
298
+ # attributes to CAS clients:
299
+ #
300
+ #authenticator:
301
+ # class: CASServer::Authenticators::ActiveDirectoryLDAP
302
+ # ldap:
303
+ # host: ad.example.net
304
+ # port: 636
305
+ # base: dc=example,dc=net
306
+ # filter: (objectClass=person) & !(msExchHideFromAddressLists=TRUE)
307
+ # auth_user: authenticator
308
+ # auth_password: itsasecret
309
+ # encryption: simple_tls
310
+ # extra_attributes: cn, mail
311
+ #
312
+ # It is possible to authenticate against Active Directory without the
313
+ # authenticator user, but this requires that users type in their CN as
314
+ # the username rather than typing in their sAMAccountName. In other words
315
+ # users will likely have to authenticate by typing their full name,
316
+ # rather than their username. If you prefer to do this, then just
317
+ # omit the auth_user and auth_password values in the above example.
318
+ #
319
+ #
320
+ # === LDAP Authentication ======================================================
321
+ #
322
+ # This is a more general version of the ActiveDirectory authenticator.
323
+ # The configuration is similar, except you don't need an authenticator
324
+ # username or password. The following example has been reported to work
325
+ # for a basic OpenLDAP setup.
326
+ #
327
+ #authenticator:
328
+ # class: CASServer::Authenticators::LDAP
329
+ # ldap:
330
+ # host: ldap.example.net
331
+ # port: 389
332
+ # base: dc=example,dc=net
333
+ # username_attribute: uid
334
+ # filter: (objectClass=person)
335
+ #
336
+ # If you need more secure connections via TSL, specify the 'encryption'
337
+ # option and change the port. This example also forces the authenticator
338
+ # to connect using a special "authenticator" user with the given
339
+ # username and password (see the ActiveDirectoryLDAP authenticator
340
+ # explanation above):
341
+ #
342
+ #authenticator:
343
+ # class: CASServer::Authenticators::LDAP
344
+ # ldap:
345
+ # host: ldap.example.net
346
+ # port: 636
347
+ # base: dc=example,dc=net
348
+ # filter: (objectClass=person)
349
+ # encryption: simple_tls
350
+ # auth_user: cn=admin,dc=example,dc=net
351
+ # auth_password: secret
352
+ #
353
+ # If you need additional data about the user passed to the client (for example,
354
+ # their 'cn' and 'mail' attributes, you can specify the list of attributes
355
+ # under the extra_attributes config option:
356
+ #
357
+ #authenticator:
358
+ # class: CASServer::Authenticators::LDAP
359
+ # ldap:
360
+ # host: ldap.example.net
361
+ # port: 389
362
+ # base: dc=example,dc=net
363
+ # filter: (objectClass=person)
364
+ # extra_attributes: cn, mail
365
+ #
366
+ # Note that the above functionality is somewhat limited by client compatibility.
367
+ # See the SQL authenticator notes above for more info.
368
+ #
369
+ #
370
+ # === Custom Authentication ====================================================
371
+ #
372
+ # It should be relatively easy to write your own Authenticator class. Have a look
373
+ # at the built-in authenticators in the casserver/authenticators directory. Your
374
+ # authenticator should extend the CASServer::Authenticators::Base class and must
375
+ # implement a validate() method that takes a single hash argument. When the user
376
+ # submits the login form, the username and password they entered is passed to
377
+ # validate() as a hash under :username and :password keys. In the future, this
378
+ # hash might also contain other data such as the domain that the user is logging
379
+ # in to.
380
+ #
381
+ # To use your custom authenticator, specify it's class name and path to the
382
+ # source file in the authenticator section of the config. Any other parameters
383
+ # you specify in the authenticator configuration will be passed on to the
384
+ # authenticator and made availabe in the validate() method as an @options hash.
385
+ #
386
+ # Example:
387
+ #
388
+ #authenticator:
389
+ # class: FooModule::MyCustomAuthenticator
390
+ # source: /path/to/source.rb
391
+ # option_a: foo
392
+ # another_option: yeeha
393
+ #
394
+ # === Multiple Authenticators ==================================================
395
+ #
396
+ # If you need to have more than one source for authentication, such as an LDAP
397
+ # directory and a database, you can use multiple authenticators by making
398
+ # :authenticator an array of authenticators.
399
+ #
400
+ #authenticator:
401
+ # -
402
+ # class: CASServer::Authenticators::ActiveDirectoryLDAP
403
+ # ldap:
404
+ # host: ad.example.net
405
+ # port: 389
406
+ # base: dc=example,dc=net
407
+ # filter: (objectClass=person)
408
+ # -
409
+ # class: CASServer::Authenticators::SQL
410
+ # database:
411
+ # adapter: mysql
412
+ # database: some_database_with_users_table
413
+ # user: root
414
+ # password:
415
+ # host: localhost
416
+ # user_table: user
417
+ # username_column: username
418
+ # password_column: password
419
+ #
420
+ # During authentication, the user credentials will be checked against the first
421
+ # authenticator and on failure fall through to the second authenticator.
422
+ #
423
+
424
+
425
+ ##### LOOK & FEEL ##############################################################
426
+
427
+ # Set the path to the theme directory that determines how your CAS pages look.
428
+ #
429
+ # Custom themes are not well supported yet, but will be in the near future. In
430
+ # the meantime, if you want to create a custom theme, you can create a
431
+ # subdirectory under the CASServer's themes dir (for example,
432
+ # '/usr/lib/ruby/1.8/gems/casserver-xxx/public/themes', if you installed CASServer
433
+ # on Linux as a gem). A theme is basically just a theme.css file that overrides
434
+ # the themes/cas.css styles along with a collection of image files
435
+ # like logo.png and bg.png.
436
+ #
437
+ # By default, we use the 'simple' theme which you can find in themes/simple.
438
+ theme: simple
439
+
440
+ # The name of your company/organization. This will show up on the login page.
441
+ organization: CAS
442
+
443
+ # A short bit of text that shows up on the login page. You can make this blank
444
+ # if you prefer to have no extra text shown at the bottom of the login box.
445
+ infoline: Powered by <a href="http://code.google.com/p/rubycas-server/">RubyCAS-Server</a>
446
+
447
+ # Custom views file. Overrides methodes in lib/casserver/views.rb
448
+ #custom_views_file: /path/to/custom/views.rb
449
+
450
+ ##### LOCALIZATION (L10N) #######################################################
451
+ # The server will attempt to detect the user's locale and show text in the
452
+ # appropriate language based on:
453
+ #
454
+ # 1. The 'lang' URL parameter (if any)
455
+ # 2. The 'lang' cookie (if any)
456
+ # 3. The HTTP_ACCEPT_LANGUAGE header supplied by the user's browser.
457
+ # 4. The HTTP_USER_AGENT header supplied by the user's browser.
458
+ #
459
+ # If the locale cannot be established based on one of the above checks (in the
460
+ # shown order), then the below 'default_locale' option will be used.
461
+ #
462
+ # The format is the same as standard linux locales (langagecode_COUNTRYCODE):
463
+ #
464
+ # ru_RU - Russian, Russia
465
+ # eo_AQ - Esperanto, Antarctica
466
+ #
467
+ # It will also work if you leave out the region (i.e. just "ru" for Russian,
468
+ # "eo" for Esperanto).
469
+ #
470
+ # If you are interested in contributing new translations or have corrections
471
+ # to the existing translations, see
472
+ # http://code.google.com/p/rubycas-server/wiki/HowToContribueTranslations
473
+ #
474
+ default_locale: en
475
+
476
+ ##### LOGGING ##################################################################
477
+
478
+ # Configure general logging. This log is where you'll want to look in case of
479
+ # problems.
480
+ #
481
+ # You may want to change the file to something like /var/log/casserver.log
482
+ # Set the level to DEBUG if you want more detailed logging.
483
+
484
+ log:
485
+ file: /var/log/casserver.log
486
+ level: INFO
487
+
488
+
489
+ # If you want full database logging, uncomment this next section.
490
+ # Every SQL query will be logged here. This is useful for debugging database
491
+ # problems.
492
+ #
493
+ #db_log:
494
+ # file: /var/log/casserver_db.log
495
+
496
+
497
+ ##### SINGLE SIGN-OUT ##########################################################
498
+
499
+ # When a user logs in to a CAS-enabled client application, that application
500
+ # generally opens its own local user session. When the user then logs out
501
+ # through the CAS server, each of the CAS-enabled client applications need
502
+ # to be notified so that they can close their own local sessions for that user.
503
+ #
504
+ # Up until recently this was not possible within CAS. However, a method for
505
+ # performing this notification was recently added to the protocol (in CAS 3.1).
506
+ # This works exactly as described above -- when the user logs out, the CAS
507
+ # server individually contacts each client service and notifies it of the
508
+ # logout. Currently not all client applications support this, so this
509
+ # behaviour is disabled by default. To enable it, uncomment the following
510
+ # configuration line. Note that currently it is not possible to enable
511
+ # or disable single-sign-out on a per-service basis, but this functionality
512
+ # is planned for a future release.
513
+
514
+ #enable_single_sign_out: true
515
+
516
+
517
+ ##### OTHER ####################################################################
518
+
519
+ # You can set various ticket expiry times (specify the value in seconds).
520
+
521
+ # Unused login and service tickets become unusable this many seconds after
522
+ # they are created. (Defaults to 5 minutes)
523
+
524
+ #maximum_unused_login_ticket_lifetime: 300
525
+ #maximum_unused_service_ticket_lifetime: 300
526
+
527
+ # The server must periodically delete old tickets (login tickets, service tickets
528
+ # proxy-granting tickets, and ticket-granting tickets) to prevent buildup of
529
+ # stale data. This effectively limits the maximum length of a CAS session to
530
+ # the lifetime given here (in seconds). (Defaults to 48 hours)
531
+ #
532
+ # Note that this limit is not enforced on the client side; it refers only to the
533
+ # the maximum lifetime of tickets on the CAS server.
534
+
535
+ #maximum_session_lifetime: 172800
536
+
537
+
538
+ # If you want the usernames entered on the login page to be automatically
539
+ # downcased (converted to lowercase), enable the following option. When this
540
+ # option is set to true, if the user enters "JSmith" as their username, the
541
+ # system will automatically
542
+ # convert this to "jsmith".
543
+
544
+ #downcase_username: true