synapses-cas 0.1.0 → 0.1.1

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