Aurora Simple Authentication Server
A small scale authentication server to provide multiple applications one point of contact for authentication against LDAP et al data stores. The system will respond with a temporary Authenticated Token to be used for the session. There will also be a client-side library for use in Ruby available.
The authentication server will also have a component for user management including permissions and access management.
sudo gem install aurora
An Aurora server is created on a specific port which listens diligently for all
requests and are routed accordingly. The most basic part of an Aurora server is
authenticate block. This passes the username and password to pass auth-
entication with and will return either a new Token for future authentication
requests or false. (NOTE: These details could change.)
Essentially what you have to do is set up hooks for the server to call when a
particular action is requested, starting with
authenticate and then moving
on to more custom functionality.
Because the server is not designed with any actual authentication checks, it is totally up to the implementer to authenticate users, be it through an LDAP data store or a MySQL database. This provides a great deal of flexibility, but a good deal of burden and responsibility. Aurora just makes it possible to centralize your authentication outside of your applications (though, with a little creativity, you could certainly decentralize it with Aurora as well).
Here’s a quick sample of how to set up the most basic of Aurora authentication servers.
Aurora::Server::Base.new('http://localhost:2828/', :logger_level => Logger::INFO) do |serv, uri, logger| serv.authenticate do |user, pass| # perform authentication here if authenticated # successfully bound/authenticated Aurora::Server::Token.new(user, pass) else false end end end
authenticated value is something that would be set by the developer/user
perform authentication here segment and is not something magical
provided by Aurora. It is simply a boolean value.
How to submit patches
The trunk repository is
svn://rubyforge.org/var/svn/aurora/trunk for anonymous access.
This code is free to use under the terms of the MIT license.