rubycas-server 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.txt CHANGED
@@ -1,3 +1,41 @@
1
+ === 0.6.0 :: 2008-03-28
2
+
3
+ * Much of the supporting functionality that makes RubyCAS-Server
4
+ act as a well-behaved Linux service has been abstracted out
5
+ into its own library. This new library is called Picnic and is
6
+ now a gem dependency for RubyCAS-Server. You can find out more about
7
+ it at http://code.google.com/p/camping-picnic/.
8
+ * The logout action will now accept a 'destination' parameter in lieu of
9
+ 'service'. This means that if a 'destination' parameter is given with
10
+ some URL, the logout action will show the login form, allowing the user
11
+ to immedietly log back in to the service specified by 'destination'.
12
+ * The logout action will now accept a 'url' parameter. If given, the logout
13
+ page will show a message indicating that the CAS session has been terminated
14
+ and instructing the user to click on a link to follow the given URL. If the
15
+ 'url' parameter is given, the login form will NOT be shown on the logout
16
+ page (see above).
17
+ * When an authentication failure occurs (because the user submitted
18
+ invalid credentials or the login ticket is missing), the server
19
+ now returns a 401 (Unauthorized) response instead of 200.
20
+ * An encryption-enabled version of the SQL authenticator is now
21
+ available. For more info have a look at:
22
+ http://code.google.com/p/rubycas-server/wiki/UsingTheSQLEncryptedAuthenticator
23
+ * Better compatibility with Oracle databases. The database migration
24
+ no longer tries to create tables with long names when long
25
+ table names are not supported by the underlying database connector
26
+ (issue #15).
27
+ * The server now automatically removes leading and trailing whitespace from
28
+ the username entered by users. Passwords however are left intact, with no
29
+ whitespace removed.
30
+ * The server can now be configured to automatically downcase the
31
+ username entered by users (dowcase_username option). So if a user
32
+ enters "JSmith", the system will convert it to "jsmith" if the
33
+ downcase_username option is set to true.
34
+ * The server can now be made to bind to a specific address. See the
35
+ :bind_address option in the config.example.yml file.
36
+ * Fixed bug with ActiveRecord 2.0.2 where service tickets were not
37
+ being given a type (issue #37).
38
+
1
39
  === 0.5.1 :: 2007-12-20
2
40
 
3
41
  * Tickets generated by the server should now be a lot more secure.
data/Manifest.txt CHANGED
@@ -12,15 +12,18 @@ lib/casserver/authenticators/active_directory_ldap.rb
12
12
  lib/casserver/authenticators/base.rb
13
13
  lib/casserver/authenticators/ldap.rb
14
14
  lib/casserver/authenticators/sql.rb
15
+ lib/casserver/authenticators/sql_encrypted.rb
15
16
  lib/casserver/authenticators/test.rb
16
17
  lib/casserver/cas.rb
17
18
  lib/casserver/conf.rb
18
19
  lib/casserver/controllers.rb
20
+ lib/casserver/environment.rb
19
21
  lib/casserver/models.rb
20
22
  lib/casserver/postambles.rb
21
23
  lib/casserver/utils.rb
22
24
  lib/casserver/version.rb
23
25
  lib/casserver/views.rb
26
+ lib/rubycas-server.rb
24
27
  lib/themes/cas.css
25
28
  lib/themes/notice.png
26
29
  lib/themes/ok.png
@@ -35,18 +38,8 @@ lib/themes/urbacon/theme.css
35
38
  lib/themes/warning.png
36
39
  resources/init.d.sh
37
40
  setup.rb
41
+ test/test_cas.rb
38
42
  test/test_casserver.rb
39
- vendor/camping-1.5.180/CHANGELOG
40
- vendor/camping-1.5.180/COPYING
41
- vendor/camping-1.5.180/README
42
- vendor/camping-1.5.180/Rakefile
43
- vendor/camping-1.5.180/lib/camping-unabridged.rb
44
- vendor/camping-1.5.180/lib/camping.rb
45
- vendor/camping-1.5.180/lib/camping/db.rb
46
- vendor/camping-1.5.180/lib/camping/fastcgi.rb
47
- vendor/camping-1.5.180/lib/camping/reloader.rb
48
- vendor/camping-1.5.180/lib/camping/session.rb
49
- vendor/camping-1.5.180/lib/camping/webrick.rb
50
43
  vendor/isaac_0.9.1/LICENSE
51
44
  vendor/isaac_0.9.1/README
52
45
  vendor/isaac_0.9.1/TODO
data/README.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  = RubyCAS-Server
2
2
 
3
- *Copyright*:: 2007 Urbacon Ltd.
3
+ *Copyright*:: 2008 Urbacon Ltd.
4
4
  *Authors*:: Matt Zukowski <matt at roughest dot net>, Jason Zylks
5
5
  *Homepage*:: http://rubycas-server.googlecode.com
6
6
 
data/Rakefile CHANGED
@@ -19,9 +19,9 @@ RUBYFORGE_PROJECT = "rubycas-server" # The unix name for your project
19
19
  HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
20
20
 
21
21
  DEPS = [
22
- # ['camping', '>= 1.5'], # camping is now bundled with rubycas-server
23
22
  ['activesupport', '>= 1.4.0'],
24
- ['activerecord', '>=1.15.3']
23
+ ['activerecord', '>=1.15.3'],
24
+ ['picnic', '>=0.6.3']
25
25
  ]
26
26
 
27
27
 
data/bin/rubycas-server CHANGED
@@ -1,56 +1,25 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'optparse'
4
-
5
- local_casserver = File.expand_path(File.dirname(File.expand_path(__FILE__))+'/../lib/casserver.rb')
6
- if File.exists? local_casserver
7
- # use local rubycas-server installation
8
- $: << File.dirname(local_casserver)
9
- path = File.dirname(local_casserver)+"/"
3
+ if File.exists?(picnic = File.expand_path(File.dirname(File.expand_path(__FILE__))+'/../vendor/picnic/lib'))
4
+ $: << picnic
5
+ elsif File.exists?(picnic = File.expand_path(File.dirname(File.expand_path(__FILE__))+'/../../picnic/lib'))
6
+ $: << picnic
10
7
  else
11
- # use gem installation
12
- path = ""
13
8
  require 'rubygems'
14
- gem 'rubycas-server'
15
- end
16
-
17
- OptionParser.new do |opts|
18
- opts.banner = "Usage: rubycas-server [options]"
19
-
20
- opts.on("-c", "--config FILE", "Use config file (default is /etc/rubycas-server/config.yml)") do |c|
21
- puts "Using config file #{c}"
22
- $CONFIG_FILE = c
23
- end
24
9
 
25
- opts.on("-d", "--daemonize", "Run as a daemon (only when using webrick or mongrel)") do |c|
26
- $DAEMONIZE = true
27
- end
28
-
29
- opts.on("-P", "--pid_file FILE", "Use pid file (default is /etc/rubycas-server/rubycas-server.pid)") do |c|
30
- if $DAEMONIZE && !File.exists?(c)
31
- puts "Using pid file '#{c}'"
32
- $PID_FILE = c
33
- elsif File.exists?(c)
34
- puts "The pid file already exists. Is rubycas-server running?\n" +
35
- "You will have to first manually remove the pid file at '#{c}' to start the server as a daemon."
36
- exit 1
37
- else
38
- puts "Not running as Daemon. Ignoring pid option"
39
- end
40
- end
41
-
42
- opts.on_tail("-h", "--help", "Show this message") do
43
- puts opts
44
- exit
10
+ # make things backwards-compatible for rubygems < 0.9.0
11
+ unless Object.method_defined? :gem
12
+ alias gem require_gem
45
13
  end
46
14
 
47
- opts.on_tail("-v", "--version", "Show version number") do
48
- require "#{path}casserver/version"
49
- puts "rubycas-server-#{CASServer::VERSION::STRING}"
50
- exit
51
- end
52
- end.parse!
15
+ gem 'picnic'
16
+ end
17
+
18
+ require 'picnic/cli'
53
19
 
54
- $RUN = true
20
+ cli = Picnic::Cli.new(
21
+ 'rubycas-server',
22
+ :app_path => File.expand_path(File.dirname(File.expand_path(__FILE__)))
23
+ )
55
24
 
56
- load "#{path}casserver.rb"
25
+ cli.handle_cli_input
@@ -1,163 +1,22 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'optparse'
4
-
5
- @options = {}
6
- @options[:pid_file] = "/etc/rubycas-server/rubycas-server.pid"
7
- @options[:conf_file] = nil
8
- @options[:verbose] = false
9
-
10
- def start
11
- # use local rubycas-server bin if it exists and is executable -- makes debugging easier
12
- bin = File.dirname(File.expand_path(__FILE__)) + "/rubycas-server"
13
-
14
- if File.exists?(bin)
15
- exec = "ruby #{bin}"
16
- else
17
- exec = "rubycas-server"
18
- end
3
+ if File.exists?(picnic = File.expand_path(File.dirname(File.expand_path(__FILE__))+'/../vendor/picnic/lib'))
4
+ $: << picnic
5
+ elsif File.exists?(picnic = File.expand_path(File.dirname(File.expand_path(__FILE__))+'/../../picnic/lib'))
6
+ $: << picnic
7
+ else
8
+ require 'rubygems'
19
9
 
20
- case get_state
21
- when :ok
22
- $stderr.puts "rubycas-server is already running"
23
- exit 1
24
- when :not_running, :empty_pid
25
- $stderr.puts "The pid file '#{@options[:pid_file]}' exists but rubycas-server is not running." +
26
- " The pid file will be automatically deleted for you, but this shouldn't have happened!"
27
- File.delete(@options[:pid_file])
28
- when :dead
29
- $stderr.puts "The pid file '#{@options[:pid_file]}' exists but rubycas-server is not running." +
30
- " Please delete the pid file first."
31
- exit 1
32
- when :missing_pid
33
- # we should be good to go (unless the server is already running without a pid file)
34
- else
35
- $stderr.puts "rubycas-server could not be started. Try looking in the log file for more info."
36
- exit 1
10
+ # make things backwards-compatible for rubygems < 0.9.0
11
+ unless Object.method_defined? :gem
12
+ alias gem require_gem
37
13
  end
38
-
39
- cmd = "#{exec} -d -P #{@options[:pid_file]}"
40
- cmd += " -c #{@options[:conf_file]}" if !@options[:conf_file].nil?
41
-
42
- puts ">>> #{cmd}" if @options[:verbose]
43
-
44
- output = `#{cmd}`
45
14
 
46
- puts "<<< #{output}" if @options[:verbose]
47
-
48
- if s = get_state == :ok
49
- exit 0
50
- else
51
- $stderr.puts "rubycas-server could not start properly! (#{s})\nTry running with the --verbose option for details."
52
- case s
53
- when :missing_pid
54
- exit 4
55
- when :not_running
56
- exit 3
57
- when :dead
58
- exit 1
59
- else
60
- exit 4
61
- end
62
- end
15
+ gem 'picnic'
63
16
  end
64
17
 
65
- def stop
66
- if File.exists? @options[:pid_file]
67
- pid = open(@options[:pid_file]).read.to_i
68
- begin
69
- Process.kill("TERM", pid)
70
- exit 0
71
- rescue Errno::ESRCH
72
- $stderr.puts "rubycas-server process '#{pid}' does not exist."
73
- exit 1
74
- end
75
- else
76
- $stderr.puts "#{@options[:pid_file]} not found. Is rubycas-server running?"
77
- exit 4
78
- end
79
- end
18
+ require 'picnic/service_control'
80
19
 
81
- def status
82
- case get_state
83
- when :ok
84
- puts "rubycas-server appears to be up and running."
85
- exit 0
86
- when :missing_pid
87
- $stderr.puts "rubycas-server does not appear to be running (pid file not found)."
88
- exit 3
89
- when :empty_pid
90
- $stderr.puts "rubycas-server does not appear to be running (pid file exists but is empty)."
91
- when :not_running
92
- $stderr.puts "rubycas-server is not running."
93
- exit 1
94
- when :dead
95
- $stderr.puts "rubycas-server is dead or unresponsive."
96
- exit 102
97
- end
98
- end
99
-
100
- def get_state
101
- if File.exists? @options[:pid_file]
102
- pid = File.read(@options[:pid_file]).strip
103
-
104
- return :empty_pid unless pid and !pid.empty? # pid file exists but is empty
105
-
106
- state = `ps -p #{pid} -o state=`.strip
107
- if state == ''
108
- return :not_running
109
- elsif state == 'R' || state == 'S'
110
- return :ok
111
- else
112
- return :dead
113
- end
114
- else
115
- # TODO: scan through the process table to see if server is running without pid file
116
- return :missing_pid
117
- end
118
- end
119
-
120
- OptionParser.new do |opts|
121
- opts.banner = "Usage: #{$0} (start|stop|restart) [options]"
122
- opts.banner += "\nruby-server-ctl is only usable when using webrick or mongrel"
123
-
124
- opts.on("-c", "--config FILE", "Path to rubycas-server configuration file") { |value| @options[:conf_file] = value }
125
- opts.on("-P", "--pid_file FILE", "Path to rubycas-server pid file") { |value| @options[:pid_file] = value }
126
- opts.on('-v', '--verbose', "Print all called commands and output.") { |value| @options[:verbose] = value }
127
-
128
- if ARGV.empty?
129
- puts opts
130
- exit
131
- else
132
- @cmd = opts.parse!(ARGV)
133
- if @cmd.nil?
134
- puts opts
135
- exit
136
- end
137
- end
138
- end
139
-
140
- if !@options[:conf_file].nil? && !File.exists?(@options[:conf_file])
141
- puts "Invalid path to rubycas-server configuration file: #{@options[:conf_file]}"
142
- exit
143
- end
144
-
145
- case @cmd[0]
146
- when "start":
147
- puts "Starting rubycas-server..."
148
- start
149
- when "stop":
150
- puts "Stopping rubycas-server..."
151
- stop
152
- when "restart":
153
- puts "Restarting rubycas-server..."
154
- stop
155
- start
156
- when "status":
157
- puts "Checking status of rubycas-server..."
158
- status
159
- else
160
- puts "Invalid command. Usage: rubycas-server-ctl [-cPv] start|stop|restart|status"
161
- end
20
+ ctl = Picnic::ServiceControl.new('rubycas-server')
162
21
 
163
- exit
22
+ ctl.handle_cli_input
data/config.example.yml CHANGED
@@ -1,39 +1,62 @@
1
1
  # IMPORTANT NOTE ABOUT YAML CONFIGURATION FILES
2
- # ---> Be sure to use spaces instead of tabs for indentation. Yaml is white-space sensitive!
2
+ # ---> Be sure to use spaces instead of tabs for indentation. YAML is
3
+ # white-space sensitive!
3
4
 
4
- ##### SERVER ########################################################################
5
+ ##### SERVER ###################################################################
5
6
 
6
7
  # Under what environment are you running the CAS server? The following methods
7
8
  # are currently supported:
8
9
  #
9
10
  # webrick -- run as a stand-alone webrick server; this is the default method
10
- # mongrel -- run as a stand-alone mongrel server; fast, but you'll need to install
11
- # mongrel and run it behind an https reverse proxy like Pound or Apache 2.2's mod_proxy)
12
- # cgi -- slow, but simple to set up if you're already familliar with deploying CGI scripts
13
- # fastcgi -- see http://www.fastcgi.com (e.g. under Apache you can use this with mod_fastcgi)
11
+ # mongrel -- run as a stand-alone mongrel server; fast, but you'll need to
12
+ # install mongrel and run it behind an https reverse proxy like Pound
13
+ # or Apache 2.2's mod_proxy)
14
+ # cgi -- slow, but simple to set up if you're already familliar with
15
+ # deploying CGI scripts
16
+ # fastcgi -- see http://www.fastcgi.com (e.g. under Apache you can use this with
17
+ # mod_fastcgi)
14
18
  #
15
19
  # The cgi and fastcgi methods have not been thoroughly tested!
16
20
  # Please report any problems to the authors.
17
21
  #
18
- # IMPORTANT: If you use mongrel, you will need to run the server behind a reverse proxy
19
- # (Pound, Apache 2.2 with mod_proxy, etc.) since mongrel does not support SSL/HTTPS.
20
- # See the RubyCAS-Server install docs for more info. Also, mongrel requries
21
- # Camping 1.5.180 which as of writing is only available via SVN. You can install
22
- # this by running `gem install camping --source code.whytheluckystiff.net`
22
+ # IMPORTANT: If you use mongrel, you will need to run the server behind a
23
+ # reverse proxy (Pound, Apache 2.2 with mod_proxy, etc.) since
24
+ # mongrel does not support SSL/HTTPS. See the RubyCAS-Server install
25
+ # docs for more info.
23
26
 
24
27
  ### webrick example
25
28
 
26
29
  server: webrick
27
30
  port: 443
28
31
  ssl_cert: /path/to/your/ssl.pem
29
- # ssl_key: /path/to/your/private_key.pem <-- if private key is separate from cert
30
32
 
31
- ### mongrel example (since mongrel doesn't support SSL on its own, you will have to run
32
- ### this behind an https reverse proxy)
33
+ # If private key is separate from cert
34
+ #ssl_key: /path/to/your/private_key.pem
35
+
36
+ # By default the login page will be available at the root path
37
+ # (e.g. https://example.foo/). The uri_path option lets you serve it from a
38
+ # different path (e.g. https://example.foo/cas).
39
+ #uri_path: /cas
40
+
41
+ # Bind the server to a specific address. Use 0.0.0.0 to listen on all
42
+ # available interfaces.
43
+ #bind_address: 0.0.0.0
44
+
45
+ ### mongrel example (since mongrel doesn't support SSL on its own, you will have
46
+ ### to run this behind an https reverse proxy)
33
47
 
34
48
  #server: mongrel
35
49
  #port: 110011
36
50
 
51
+ # By default the login page will be available at the root path
52
+ # (e.g. https://example.foo/). The uri_path option lets you serve it from a
53
+ # different path (e.g. https://example.foo/cas).
54
+ #uri_path: /cas
55
+
56
+ # Bind the server to a specific address. Use 0.0.0.0 to listen on all
57
+ # available interfaces.
58
+ #bind_address: 0.0.0.0
59
+
37
60
  ### cgi example (you'll need to serve this via an SSL-capable server like Apache)
38
61
 
39
62
  #server: cgi
@@ -43,11 +66,12 @@ ssl_cert: /path/to/your/ssl.pem
43
66
  #server: fastcgi
44
67
 
45
68
 
46
- ##### DATABASE #######################################################################
69
+ ##### DATABASE #################################################################
47
70
 
48
71
  # Set up the database connection. Make sure that this database is secure!
49
72
  #
50
- # By default, we use MySQL, since it is widely used and does not require any additional
73
+ # By default, we use MySQL, since it is widely used and does not require any
74
+ # additional
51
75
  # ruby libraries besides ActiveRecord.
52
76
  #
53
77
  # With MySQL, your config would be something like the following:
@@ -62,34 +86,39 @@ database:
62
86
  host: localhost
63
87
 
64
88
  #
65
- # Instead of MySQL you can use SQLite3, PostgreSQL, MSSQL, or anything else supported
66
- # by ActiveRecord.
89
+ # Instead of MySQL you can use SQLite3, PostgreSQL, MSSQL, or anything else
90
+ # supported by ActiveRecord.
67
91
  #
68
- # With SQLite3 (which does not require a separate database server), your configuration
69
- # would look something like the following (don't forget to install the
70
- # sqlite3-ruby gem beforehand!):
92
+ # With SQLite3 (which does not require a separate database server), your
93
+ # configuration would look something like the following (don't forget to install
94
+ # the sqlite3-ruby gem beforehand!):
71
95
  #
72
96
  #database:
73
97
  # adapter: sqlite3
74
98
  # dbfile: /var/lib/casserver.db
75
99
 
76
100
 
77
- ##### AUTHENTICATION #################################################################
101
+ ##### AUTHENTICATION ###########################################################
78
102
 
79
103
  # Configure how username/passwords are validated.
80
104
  #
81
- # !!! YOU MUST CONFIGURE ONE (AND ONLY ONE) OF THESE AUTHENTICATION METHODS !!!
105
+ # !!! YOU MUST CONFIGURE ONE OF THESE AUTHENTICATION METHODS !!!
82
106
  #
83
107
  # Currently there are three built-in methods for authentication:
84
- # SQL, ActiveDirectory, and LDAP. If none of these work for you, it is relatively
85
- # easy to write your own custom Authenticator class.
108
+ # SQL, ActiveDirectory, and LDAP. If none of these work for you, it is
109
+ # relatively easy to write your own custom Authenticator class.
110
+ #
111
+ # === SQL Authentication =======================================================
86
112
  #
87
- # ==> SQL Authentication:
88
113
  # The simplest method is to validate against a SQL database. This assumes
89
114
  # that all of your users are stored in a table that has a 'username' column
90
115
  # and a 'password' column. When the user logs in, CAS conects to this database
91
- # and look for a matching username/password in the users table. If a matching
116
+ # and looks for a matching username/password in the users table. If a matching
92
117
  # username and password is found, authentication is successful.
118
+ #
119
+ # If you prefer to have your passwords stored in an encrypted form, have a
120
+ # look at the SQLEncrypted authenticator:
121
+ # http://code.google.com/p/rubycas-server/wiki/UsingTheSQLEncryptedAuthenticator
93
122
  #
94
123
  # Example:
95
124
  #
@@ -101,12 +130,13 @@ database:
101
130
  # username: root
102
131
  # password:
103
132
  # server: localhost
104
- # user_table: user
133
+ # user_table: users
105
134
  # username_column: username
106
135
  # password_column: password
107
136
  #
108
137
  #
109
- # ==> ActiveDirectory Authentication:
138
+ # === ActiveDirectory Authentication ===========================================
139
+ #
110
140
  # This method authenticates against Microsoft's Active Directory using LDAP.
111
141
  # You must enter your ActiveDirectory server, and base DN. The port number
112
142
  # and LDAP filter are optional. You must also enter a CN and password
@@ -137,12 +167,13 @@ database:
137
167
  # omit the auth_user and auth_password values in the above example.
138
168
  #
139
169
  #
140
- # ==> LDAP Authentication:
170
+ # === LDAP Authentication ======================================================
171
+ #
141
172
  # This is a more general version of the ActiveDirectory authenticator.
142
173
  # The configuration is similar, except you don't need an authenticator
143
174
  # username or password. Note that this authenticator hasn't been widely
144
175
  # tested, so it is not guaranteed to work.
145
- #
176
+ #=====
146
177
  #authenticator:
147
178
  # class: CASServer::Authenticators::ActiveDirectoryLDAP
148
179
  # ldap:
@@ -152,19 +183,21 @@ database:
152
183
  # filter: (objectClass=person)
153
184
  #
154
185
  #
155
- # ==> Custom Authentication:
186
+ # === Custom Authentication ====================================================
187
+ #
156
188
  # It should be relatively easy to write your own Authenticator class. Have a look
157
189
  # at the built-in authenticators in the casserver/authenticators directory. Your
158
190
  # authenticator should extend the CASServer::Authenticators::Base class and must
159
- # implement a validate() method that takes a single hash argument. When the user submits
160
- # the login form, the username and password they entered is passed to validate()
161
- # as a hash under :username and :password keys. In the future, this hash
162
- # might also contain other data such as the domain that the user is logging in to.
191
+ # implement a validate() method that takes a single hash argument. When the user
192
+ # submits the login form, the username and password they entered is passed to
193
+ # validate() as a hash under :username and :password keys. In the future, this
194
+ # hash might also contain other data such as the domain that the user is logging
195
+ # in to.
163
196
  #
164
- # To use your custom authenticator, specify it's class name and path to the source file
165
- # in the authenticator section of the config. Any other parameters you specify in the
166
- # authenticator configuration will be passed on to the authenticator and made availabe in
167
- # the validate() method as an @options hash.
197
+ # To use your custom authenticator, specify it's class name and path to the
198
+ # source file in the authenticator section of the config. Any other parameters
199
+ # you specify in the authenticator configuration will be passed on to the
200
+ # authenticator and made availabe in the validate() method as an @options hash.
168
201
  #
169
202
  # Example:
170
203
  #
@@ -174,10 +207,11 @@ database:
174
207
  # option_a: foo
175
208
  # another_option: yeeha
176
209
  #
177
- # ==> Multiple Authenticators
178
- # If you need to have more than one source for authentication, such as an LDAP directory
179
- # and a database, you can use multiple authenticators by making :authenticator an array
180
- # of authenticators.
210
+ # === Multiple Authenticators ==================================================
211
+ #
212
+ # If you need to have more than one source for authentication, such as an LDAP
213
+ # directory and a database, you can use multiple authenticators by making
214
+ # :authenticator an array of authenticators.
181
215
  #
182
216
  #authenticator:
183
217
  # -
@@ -203,15 +237,17 @@ database:
203
237
  # authenticator and on failure fall through to the second authenticator.
204
238
  #
205
239
 
206
- ##### LOOK & FEEL ######################################################################
240
+
241
+ ##### LOOK & FEEL ##############################################################
207
242
 
208
243
  # Set the path to the theme directory that determines how your CAS pages look.
209
244
  #
210
- # Custom themes are not well supported yet, but will be in the near future. In the
211
- # meantime, if you want to create a custom theme, you can create a subdirectory
212
- # under the CASServer's themes dir (for example, '/usr/lib/ruby/1.8/gems/casserver-xxx/lib/themes',
213
- # if you installed CASServer on Linux as a gem). A theme is basically just a theme.css
214
- # file that overrides the themes/cas.css styles along with a collection of image files
245
+ # Custom themes are not well supported yet, but will be in the near future. In
246
+ # the meantime, if you want to create a custom theme, you can create a
247
+ # subdirectory under the CASServer's themes dir (for example,
248
+ # '/usr/lib/ruby/1.8/gems/casserver-xxx/lib/themes', if you installed CASServer
249
+ # on Linux as a gem). A theme is basically just a theme.css file that overrides
250
+ # the themes/cas.css styles along with a collection of image files
215
251
  # like logo.png and bg.png.
216
252
  #
217
253
  # By default, we use the 'simple' theme which you can find in themes/simple.
@@ -220,15 +256,18 @@ theme: simple
220
256
  # The name of your company/organization. This will show up on the login page.
221
257
  organization: CAS
222
258
 
223
- # A short bit of text that shows up on the login page. You can make this blank if you prefer.
259
+ # A short bit of text that shows up on the login page. You can make this blank
260
+ # if you prefer to have no extra text shown at the bottom of the login box.
224
261
  infoline: Powered by <a href="http://code.google.com/p/rubycas-server/">RubyCAS-Server</a>
225
262
 
226
263
  # Custom views file. Overrides methodes in lib/casserver/views.rb
227
264
  #custom_views_file: /path/to/custom/views.rb
228
265
 
229
- ##### LOGGING #########################################################################
230
266
 
231
- # Configure general logging. This log is where you'll want to look in case of problems.
267
+ ##### LOGGING ##################################################################
268
+
269
+ # Configure general logging. This log is where you'll want to look in case of
270
+ # problems.
232
271
  #
233
272
  # You may want to change the file to something like /var/log/casserver.log
234
273
  # Set the level to DEBUG if you want more detailed logging.
@@ -239,31 +278,41 @@ log:
239
278
 
240
279
 
241
280
  # If you want full database logging, uncomment this next section.
242
- # Every SQL query will be logged here. This is useful for debugging database problems.
281
+ # Every SQL query will be logged here. This is useful for debugging database
282
+ # problems.
243
283
  #
244
284
  #db_log:
245
285
  # file: /var/log/casserver_db.log
246
286
 
247
287
 
248
- ##### OTHER ###########################################################################
288
+ ##### OTHER ####################################################################
249
289
 
250
290
  # You can set various ticket expiry times (specify the value in seconds).
251
291
 
252
- # Expired login and service tickets are no longer usable this many seconds after they
253
- # are created. (Defaults to 5 minutes)
292
+ # Expired login and service tickets are no longer usable this many seconds after
293
+ # they are created. (Defaults to 5 minutes)
254
294
 
255
295
  #login_ticket_expiry: 300
256
296
  #service_ticket_expiry: 300
257
297
 
258
- # Proxy- and ticket-granting tickets do not expire -- normally they are made invalid only
259
- # when the user logs out. But the server must periodically delete them to prevent buildup of
260
- # stale data. PGTs and TGTs will be deleted during server startup if they are this many
261
- # seconds old. (Defaults to 48 hours)
298
+ # Proxy- and ticket-granting tickets do not expire -- normally they are made
299
+ # invalid only when the user logs out. But the server must periodically delete
300
+ # them to prevent buildup of stale data. PGTs and TGTs will be deleted during
301
+ # server startup if they are this many seconds old. (Defaults to 48 hours)
262
302
 
263
303
  #proxy_granting_ticket_expiry: 172800
264
304
  #ticket_granting_ticket_expiry: 172800
265
305
 
266
- # If you would prefer that ticket-granting ticket expiry be enforced (in effect limiting
267
- # the maximum length of a session), you can set expire_sessions to true.
306
+ # If you would prefer that ticket-granting ticket expiry be enforced (in effect
307
+ # limiting the maximum length of a session), you can set expire_sessions to true.
308
+
309
+ #expire_sessions: false
310
+
311
+
312
+ # If you want the usernames entered on the login page to be automatically
313
+ # downcased (converted to lowercase), enable the following option. When this
314
+ # option is set to true, if the user enters "JSmith" as their username, the
315
+ # system will automatically
316
+ # convert this to "jsmith".
268
317
 
269
- # expire_sessions: false
318
+ #downcase_username: true