uchouhan-rubycas-server 1.0.a

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