ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

rubycas-server SQLEncrypted authentication results in error.

Added by Nagaraj Ganachari at 2011-08-29 06:39 pm

Hi all,

I have installed redmine_cas plugin for chiliproject from git://gitorious.org/redmine_cas/redmine_cas.git. The chiliproject uses hashed_password in users table. In my rubycas-server I use SQLEncrypted authenticator. My config file for rubycas-server has.

authenticator:
class: CASServer::Authenticators::SQLEncrypted
database:
adapter: mysql
database: my_database
username: username
password: password
host: localhost
user_table: users
username_column: login
encrypt_function: 'user.hashed_password == Digest::SHA1.hexdigest("#{user.salt} + Digest::SHA1.hexdigest(#{@hashed_password})")'

I found chiliproject is using SHA1 in the file model/user.rb, it stores the password in the format 'SHA1)'

When I try to login it throws the error:

ActiveRecord::SubclassNotFound at /login
The single-table inheritance mechanism failed to locate the subclass: 'User'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite CASServer::Authenticators::SQLEncrypted::CASUser_0.inheritance_column to use another column for that information.

Is my authenticator configuration correct?

Please help me to find the solutions.

--
Nagaraj


Replies (3)

RE: rubycas-server SQLEncrypted authentication results in error. - Added by Felix Schäfer at 2011-08-30 04:54 am

I'm sorry but we don't know each and every plugin out there. Have you tried asking the author of the plugin for help?

RE: rubycas-server SQLEncrypted authentication results in error. - Added by Nagaraj Ganachari at 2011-08-30 05:10 am

Hi Felix,

I did not ask the authors, I just wanted to know the type of
passwords stored in users table, is it SQLEncrypted or SQLMd5? once I
know this, I can choose correct authenticator.

Thank you.

RE: rubycas-server SQLEncrypted authentication results in error. - Added by Felix Schäfer at 2011-08-30 05:25 am

From what I see, the plugin doesn't load correctly independently of the configuration…

Anyway, the passwords stored in the DB in the users table are Digest::SHA1.hexdigest("#{salt}#{Digest::SHA1.hexdigest(password)}"), the salt being a ActiveSupport::SecureRandom.hex(16) stored in the users table too.

(1-3/3)