wmernagh-rubycas-server 0.6.99.336

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. data/CHANGELOG.txt +1 -0
  2. data/History.txt +245 -0
  3. data/LICENSE.txt +504 -0
  4. data/Manifest.txt +74 -0
  5. data/PostInstall.txt +3 -0
  6. data/README.txt +25 -0
  7. data/Rakefile +4 -0
  8. data/bin/rubycas-server +26 -0
  9. data/bin/rubycas-server-ctl +22 -0
  10. data/config/hoe.rb +76 -0
  11. data/config/requirements.rb +15 -0
  12. data/config.example.yml +442 -0
  13. data/custom_views.example.rb +11 -0
  14. data/lib/casserver/authenticators/active_directory_ldap.rb +11 -0
  15. data/lib/casserver/authenticators/base.rb +48 -0
  16. data/lib/casserver/authenticators/client_certificate.rb +46 -0
  17. data/lib/casserver/authenticators/ldap.rb +138 -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 +102 -0
  21. data/lib/casserver/authenticators/sql_encrypted.rb +75 -0
  22. data/lib/casserver/authenticators/sql_md5.rb +19 -0
  23. data/lib/casserver/authenticators/test.rb +19 -0
  24. data/lib/casserver/cas.rb +308 -0
  25. data/lib/casserver/conf.rb +112 -0
  26. data/lib/casserver/controllers.rb +452 -0
  27. data/lib/casserver/environment.rb +26 -0
  28. data/lib/casserver/models.rb +218 -0
  29. data/lib/casserver/postambles.rb +174 -0
  30. data/lib/casserver/utils.rb +30 -0
  31. data/lib/casserver/version.rb +9 -0
  32. data/lib/casserver/views.rb +243 -0
  33. data/lib/casserver.rb +111 -0
  34. data/lib/rubycas-server/version.rb +1 -0
  35. data/lib/rubycas-server.rb +1 -0
  36. data/lib/themes/cas.css +121 -0
  37. data/lib/themes/notice.png +0 -0
  38. data/lib/themes/ok.png +0 -0
  39. data/lib/themes/simple/bg.png +0 -0
  40. data/lib/themes/simple/login_box_bg.png +0 -0
  41. data/lib/themes/simple/logo.png +0 -0
  42. data/lib/themes/simple/theme.css +28 -0
  43. data/lib/themes/urbacon/bg.png +0 -0
  44. data/lib/themes/urbacon/login_box_bg.png +0 -0
  45. data/lib/themes/urbacon/logo.png +0 -0
  46. data/lib/themes/urbacon/theme.css +33 -0
  47. data/lib/themes/warning.png +0 -0
  48. data/misc/basic_cas_single_signon_mechanism_diagram.png +0 -0
  49. data/misc/basic_cas_single_signon_mechanism_diagram.svg +652 -0
  50. data/resources/init.d.sh +58 -0
  51. data/script/console +10 -0
  52. data/script/destroy +14 -0
  53. data/script/generate +14 -0
  54. data/script/txt2html +82 -0
  55. data/setup.rb +1585 -0
  56. data/tasks/deployment.rake +34 -0
  57. data/tasks/environment.rake +7 -0
  58. data/tasks/website.rake +17 -0
  59. data/vendor/isaac_0.9.1/LICENSE +26 -0
  60. data/vendor/isaac_0.9.1/README +78 -0
  61. data/vendor/isaac_0.9.1/TODO +3 -0
  62. data/vendor/isaac_0.9.1/VERSIONS +3 -0
  63. data/vendor/isaac_0.9.1/crypt/ISAAC.rb +171 -0
  64. data/vendor/isaac_0.9.1/isaac.gemspec +39 -0
  65. data/vendor/isaac_0.9.1/setup.rb +596 -0
  66. data/vendor/isaac_0.9.1/test/TC_ISAAC.rb +76 -0
  67. data/website/index.html +40 -0
  68. data/website/index.txt +3 -0
  69. data/website/javascripts/rounded_corners_lite.inc.js +285 -0
  70. data/website/stylesheets/screen.css +138 -0
  71. data/website/template.html.erb +40 -0
  72. metadata +146 -0
data/CHANGELOG.txt ADDED
@@ -0,0 +1 @@
1
+ See History.txt
data/History.txt ADDED
@@ -0,0 +1,245 @@
1
+ === 0.7.0 :: In Progress
2
+
3
+ * New features:
4
+ * Implemented single-sign-out functionality as specified in CAS 3.1. See
5
+ http://www.ja-sig.org/wiki/display/CASUM/Single+Sign+Out.
6
+ * It is now possible to configure Authenticators to return extra attributes
7
+ to CAS clients alongside the username. For an example of how to do this see
8
+ the included SQL authenticator. Also have a look at:
9
+ http://groups.google.com/group/rubycas-server/browse_thread/thread/5eade3793cb590e9
10
+ Note that extra attributes of type other than String or Numeric are serialized
11
+ into YAML format before being sent along to the client.
12
+ * Added an MD5-password version of the SQL authenticator for Drupal and any other
13
+ database that stores its passwords in hashed form (thanks malcolmm).
14
+ * Added new Google authenticator for authenticating against Google/GMail
15
+ accounts.
16
+
17
+ * Changes to existing functionality:
18
+ * Service URIs are now automatically normalized. For example, if the service
19
+ URI given to the server has a 'ticket' parameter, the ticket will now be
20
+ automatically stripped. This is to avert any possible issues raised by
21
+ misbehaving CAS clients (the CAS ticket should never be part of the service
22
+ URI). Same goes for other CAS-related parameters like 'service', 'renew',
23
+ and 'gateway'. Additionally, the trailing '/' and '?' characters are
24
+ automatically stripped from URLs, since, for example, "http://google.com/"
25
+ is almost certainly equivalent to "http://google.com".
26
+ * The expire_sessions config variable is now respected -- ticket granting
27
+ ticket cookies are set with an expiry datetime, so that the SSO session
28
+ is effectively terminated once the ticket_granting_ticket_expiry period
29
+ is reached.
30
+ * If present, the HTTP_X_FORWARDED_FOR header is used for recording the
31
+ client's address. This is useful when the server is running behind a reverse
32
+ proxy, but it should not be considered authoritative since it can be
33
+ easily spoofed.
34
+ * The 'service' field in the 'casserver_st' table has been changed from
35
+ VARCHAR(255) to TEXT in order to accomodate service URIs longer than 255
36
+ characters (fixes issue #46).
37
+ * The CAS XML responses are no longer whitespace-formatted (i.e. Markaby's
38
+ auto-indentation has been turned off). Apparently the whitespace was
39
+ causing problems with mod_auth_cas. See:
40
+ http://groups.google.com/group/rubycas-server/browse_thread/thread/e482fe09999b73d3
41
+ * When used without pre-authentication, the LDAP authenticator now tries to
42
+ bind by searching for the given username in the LDAP directory based on the
43
+ configured username_attribute. Prior to this change the authenticator
44
+ attempted to bind with the LDAP server by assuming that the username credential
45
+ matches the user's CN. This is no longer the case.
46
+ * CAS responses to invalid requests (for example where required parameters
47
+ are missing or incorrect) will now have HTTP status code 422. Internal server
48
+ errors (where the server rather than the client is at fault) have error 500.
49
+ Previously most responses had error code 200, regardless of their contents.
50
+
51
+ * Bug fixes
52
+ * Fixed logout action to work properly with ActiveRecord 2.1 (eager loading behaviour
53
+ was changed upstream forcing a change to the way we look for ProxyGrantingTickets
54
+ to delete on logout).
55
+ * When running under Mongrel, the USR2 signal should now restart the server as
56
+ expected -- however currently this only works when the server is running
57
+ in the foregaround. When daemonized, USR2 will shut down the server without
58
+ restarting (see issue #58).
59
+
60
+ === 0.6.0 :: 2008-03-28
61
+
62
+ * Much of the supporting functionality that makes RubyCAS-Server
63
+ act as a well-behaved Linux service has been abstracted out
64
+ into its own library. This new library is called Picnic and is
65
+ now a gem dependency for RubyCAS-Server. You can find out more about
66
+ it at http://code.google.com/p/camping-picnic/.
67
+ * The logout action will now accept a 'destination' parameter in lieu of
68
+ 'service'. This means that if a 'destination' parameter is given with
69
+ some URL, the logout action will show the login form, allowing the user
70
+ to immedietly log back in to the service specified by 'destination'.
71
+ * The logout action will now accept a 'url' parameter. If given, the logout
72
+ page will show a message indicating that the CAS session has been terminated
73
+ and instructing the user to click on a link to follow the given URL. If the
74
+ 'url' parameter is given, the login form will NOT be shown on the logout
75
+ page (see above).
76
+ * When an authentication failure occurs (because the user submitted
77
+ invalid credentials or the login ticket is missing), the server
78
+ now returns a 401 (Unauthorized) response instead of 200.
79
+ * An encryption-enabled version of the SQL authenticator is now
80
+ available. For more info have a look at:
81
+ http://code.google.com/p/rubycas-server/wiki/UsingTheSQLEncryptedAuthenticator
82
+ * Better compatibility with Oracle databases. The database migration
83
+ no longer tries to create tables with long names when long
84
+ table names are not supported by the underlying database connector
85
+ (issue #15).
86
+ * The server now automatically removes leading and trailing whitespace from
87
+ the username entered by users. Passwords however are left intact, with no
88
+ whitespace removed.
89
+ * The server can now be configured to automatically downcase the
90
+ username entered by users (dowcase_username option). So if a user
91
+ enters "JSmith", the system will convert it to "jsmith" if the
92
+ downcase_username option is set to true.
93
+ * The server can now be made to bind to a specific address. See the
94
+ :bind_address option in the config.example.yml file.
95
+ * Fixed bug with ActiveRecord 2.0.2 where service tickets were not
96
+ being given a type (issue #37).
97
+
98
+ === 0.5.1 :: 2007-12-20
99
+
100
+ * Tickets generated by the server should now be a lot more secure.
101
+ The random string generator used for generating tickets now uses
102
+ Crypt::ISAAC. Tickets have also been extended in length; STs, PTs
103
+ and LTs can now extend up to 32 characters, and PGTs and PGT-IOUs
104
+ up to 64.
105
+
106
+ === 0.5.0 :: 2007-09-20
107
+
108
+ * Gateway requests should now be handled correctly. When the request to the
109
+ login page is made with gateway=true as one of the parameters, the CAS
110
+ server will immediately redirect back to the target service along with
111
+ a service ticket if an SSO session exists for the user (or without a
112
+ service ticket if there is no pre-existing SSO session).
113
+ Note that if you are using RubyCAS-Client and want gatewaying, you will
114
+ need to upgrade it to 1.1.0 as gatewaying was broken in prior versions.
115
+ * If gateway=true is specified as part of the logout URI, the server will
116
+ log the user out and immediately redirect them back to the specified
117
+ service. In other words, you can now do "gatewayed logouts" as well
118
+ as logins.
119
+ * A login ticket can now be remotely requested from the server by placing
120
+ a POST request to '/loginTicket'.
121
+ * The login view can now be made to return only the login form. This is
122
+ done by adding the 'onlyLoginForm' parameter to the '/login' request.
123
+ Optionally, a 'submitToURI' parameter can be supplied to force the login
124
+ form to submit to the given URI (otherwise the server will try to figure
125
+ out the full URI to its own login controller). This functionality may be
126
+ useful when you want to embed the login form in some external page, as
127
+ an IFRAME otherwise.
128
+ * Custom views can now be used to override the default Markaby templates
129
+ by specifying a 'custom_views_file' option in the configuration. See
130
+ custom_views.example.rb. [jzylks]
131
+ * Table names have been shortened to work with Oracle. A migration has
132
+ been added that should do the shortening for you the first time you run
133
+ this new RubyCAS-Server version.
134
+ * Multiple authenticators can now be specified. During authentication,
135
+ credentials are presented to the first authenticator, then the second,
136
+ and so on, until the user is validated by any one authenticator or fails
137
+ validation for all of them. [jzylks]
138
+ * When using webrick, you can now run with SSL disabled by omitting the
139
+ ssl_cert and ssl_key parameters.
140
+ * Changed incorrect MySQL example database configuration -- option should
141
+ be 'host:' not 'server:' (issue #22).
142
+
143
+ === 0.4.2 :: 2007-07-26
144
+
145
+ * The LDAP/AD authenticator has been largely re-written. The code is a bit
146
+ cleaner now, and should work better with non-Active Directory LDAP servers
147
+ (although this has yet to be tested since I don't have access to a non-AD
148
+ LDAP server).
149
+ * The validate() method in your authenticators now receives a :service element
150
+ (in addition to :username, and :password). This is simply the service
151
+ url (if any) specified in the user's CAS request. If you call
152
+ read_standard_credentials(credentials) at the top of your validator, the value
153
+ will also be available as @service along with @username and @password.
154
+ * By request, a :username_prefix option has been added to the ldap
155
+ configuration. If entered, this string will be automatically prefixed to
156
+ the username entered by the user.
157
+ * A bug having to do with handling authenticator errors has been fixed.
158
+ Any authenticator error messages should now be correctly shown on the
159
+ login page.
160
+ * Minor improvements to error messages having to do with login tickets.
161
+ They're a bit more prescriptive now, explaining to the user what steps
162
+ they should take to correct the error.
163
+
164
+ === 0.4.1 :: 2007-06-07
165
+
166
+ * This release restores compatiblity with older versions of rubygems
167
+ (pre-0.9.0). To achieve this, we alias the 'gem' method to the old
168
+ 'require_gem' if 'gem' is not already defined.
169
+ * rubycas-server-ctl will now quiety delete an orphaned .pid file
170
+ instead complaining loudly and refusing to start up.
171
+ * Fixed minor bug in rubycas-server-ctl that sometimes incorrectly reported
172
+ startup problems when in fact the server had started just fine.
173
+
174
+
175
+ === 0.4.0 :: 2007-06-05
176
+
177
+ * Added rubycas-server-ctl script for controlling daemonized server.
178
+ * rubygems-0.9.0 or later is now required.
179
+ * Added system startup script to be used in /etc/init.d on Linux systems.
180
+ * Authenticator can now be loaded from an external file using the 'source'
181
+ configuration option.
182
+ * Better preemptive detection of startup problems with mongrel.
183
+ * User now sees an error message if the service URI is not a valid URI (i.e.
184
+ if it's not URI-encoded or otherwise malformed).
185
+
186
+
187
+ === 0.3.0 :: 2007-03-29
188
+
189
+ * Fixed glaring security problem with LDAP/AD Authenticator where under some
190
+ circumstances blank passwords were accepted as valid.
191
+ * Autocomplete has been turned off on the password field for better security.
192
+ In the future we may allow autocomplete to be re-enabled using a
193
+ configuration setting.
194
+ * When the user visits the login page and is already authenticated (i.e. they
195
+ have a valid ticket granting cookie), a message is shown at the top
196
+ indicating that they are already logged in.
197
+ * sqlite3-ruby is no longer required by the gem as a dependency. The user
198
+ must now install it manually prior to installing rubycas-server. The
199
+ building of sqlite3 native extensions appears to be somewhat flakey
200
+ and probably defeats the original purpose of using it (which was
201
+ to have a CAS server up and running with no additional DB configuration).
202
+ We will use MySQL as the default database adapter instead, since it does
203
+ not require additional libraries and many users will have a MySQL server
204
+ already available.
205
+ * Fixed bug that was causing all proxy-granting tickets to be deleted whenever
206
+ any user logged out. Only the PGTs for the user that is logging out are now
207
+ being deleted.
208
+ * Trailing slashes in service URLs are now ignored when validating service
209
+ and proxy tickets (e.g. "http://www.google.com" and "http://www.google.com/"
210
+ are now considered to be the same service URL).
211
+ * Authenticators now raise AuthenticatorError exceptions when encountering
212
+ a problem/error. This makes it easier to send feedback to the user.
213
+ However, other exceptions should still be raised when errors ought
214
+ not be recoverable (i.e. programming errors).
215
+ * Fixed serious vulnerability in LDAP authenticator where under some
216
+ cirumstances the user could just enter '*' as their username to match
217
+ any username. The LDAP authenticator will now refuse to process logins
218
+ with usernames that contain the characters * ( ) \ / and the NULL
219
+ character \0.
220
+ * Views are no longer xhtml-validated. Markaby's auto-validation was turned
221
+ off to allow for use of the autocomplete property on inputs, since this is
222
+ the only viable way of turning off password storage in IE and Firefox at
223
+ the page level.
224
+ * You can now limit the maximum length of a login session by setting the
225
+ expire_sessions config setting to true.
226
+ * Fixed some minor bugs in the login view.
227
+
228
+
229
+ === 0.2.0 :: 2007-03-20
230
+
231
+ * ruby-casserver now behaves more like a real command-line app, accepting
232
+ various command line arguments including -h (help), -v (version), -c (use
233
+ an alternate config.yml), and -d (daemonize, when using webrick or mongrel
234
+ mode).
235
+ * Special characters in CAS XML responses are now properly encoded into XML
236
+ entities
237
+ * CAS XML responses are no longer auto-indented... Markaby's indentation
238
+ seemed to be causing problems with the PHP CAS client.
239
+ * Misc minor bug fixes/cleanup.
240
+
241
+
242
+ === 0.1.0 :: 2007-03-01
243
+
244
+ * First public release.
245
+