Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Poor Authenticator Design
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
mdeiters  
View profile  
 More options Aug 21 2009, 3:15 pm
From: mdeiters <mdeit...@gmail.com>
Date: Fri, 21 Aug 2009 12:15:43 -0700 (PDT)
Local: Fri, Aug 21 2009 3:15 pm
Subject: Poor Authenticator Design
It looks as though when CAS Server boots up it instantiates all of the
authenticators and then during validation each authenticator in $AUTH
is validated against the user's credentials. Later in the code we look
at each authenticator for an error message that is set which seems
completely flawed since these Authenticators are not threadsafe since
the error is stored in a instance variable that could be modified by
multiple users attempting to authenticate at the same time. Am I
understanding the code correctly?

      credentials_are_valid = false
      extra_attributes = {}
      successful_authenticator = nil
      begin
        $AUTH.each do |auth|
          credentials_are_valid = auth.validate(
            :username => @username,
            :password => @password,
            :service => @service,
            :request => @env
          )
          if credentials_are_valid
            extra_attributes.merge!(auth.extra_attributes) unless
auth.extra_attributes.blank?
            successful_authenticator = auth
            break
          end
        end
      rescue CASServer::AuthenticatorError => e
        $LOG.error(e)
        @message = {:type => 'mistake', :message => e.to_s}
        return back_to_login
      end

#later on in the post method of the LoginController

        message = authenticator_with_error &&
authenticator_with_error.error
        message ||= "Sorry the username and/or password you entered is
invalid. Please note after 5 attempts your account will be locked."
        $LOG.warn("Error message from the authenticator - #
{message}")
        @message = {:type => 'mistake', :message => _(message)}

    def authenticator_with_error
      @failed_authenticator ||= $AUTH.select{|auth|auth.respond_to?
(:error)}.first
    end


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Zukowski  
View profile  
 More options Aug 24 2009, 5:23 pm
From: Matt Zukowski <matt.zukow...@gmail.com>
Date: Mon, 24 Aug 2009 14:23:11 -0700 (PDT)
Local: Mon, Aug 24 2009 5:23 pm
Subject: Re: Poor Authenticator Design
http://github.com/gunark/rubycas-server/issues/#issue/6

On Aug 21, 3:15 pm, mdeiters <mdeit...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Zukowski  
View profile  
 More options Sep 18 2009, 3:57 pm
From: Matt Zukowski <matt.zukow...@gmail.com>
Date: Fri, 18 Sep 2009 12:57:28 -0700 (PDT)
Local: Fri, Sep 18 2009 3:57 pm
Subject: Re: Poor Authenticator Design
This has now been fixed -- Authenticators are instantiated at the time
of authentication rather than globally at server startup.

Thanks for bringing this to my attention.

On Aug 24, 5:23 pm, Matt Zukowski <matt.zukow...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan Coutu  
View profile  
 More options Sep 18 2009, 3:59 pm
From: Dan Coutu <co...@snowy-owl.com>
Date: Fri, 18 Sep 2009 15:59:37 -0400
Local: Fri, Sep 18 2009 3:59 pm
Subject: Re: [RubyCAS] Re: Poor Authenticator Design
Ooooooo, nice. Now if the same trick could be done with themes it would
be possible to use a single CAS instance with multiple authenticators
and multiple themed login screens. Powerful!

Dan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Zukowski  
View profile  
 More options Sep 23 2009, 5:12 pm
From: Matt Zukowski <matt.zukow...@gmail.com>
Date: Wed, 23 Sep 2009 17:12:49 -0400
Local: Wed, Sep 23 2009 5:12 pm
Subject: Re: [RubyCAS] Re: Poor Authenticator Design

This change is not sitting well... I had to roll back to the previous
version on our production machine. It looks like the additional
authenticator instances are using up the ActiveRecord connection pool and
sooner or later the server comes to a crawling halt. I don't have the time
and patience right now to figure out how to take care of databse connection
management for authenticators. I'd appreciate it though if anyone using the
latest code from github let me know if they encounter similar issues.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lin Jen-Shin  
View profile  
 More options Sep 24 2009, 12:30 pm
From: Lin Jen-Shin <god...@gmail.com>
Date: Thu, 24 Sep 2009 09:30:45 -0700 (PDT)
Local: Thurs, Sep 24 2009 12:30 pm
Subject: Re: Poor Authenticator Design
I am not sure what's going on here,
but taking a glimpse at this commit:
http://github.com/gunark/rubycas-server/commit/653be6d08421c8d7e87f02...

MRI is not thread-safe in many places,
especially in `require', constants setup, etc.
I don't think instantiating any constants
while serving service is a good idea generally.
That is, just instantiate "all" constants at
boot-up is the safest way.

Kernel#autoload has the same problem.
Avoid them in thread critical process.
Explicitly requiring and instantiating is
tedious and annoying but a lot safer in
multi-threaded environments.

I am not sure if rubycas-server is running
in multi-threaded environments. But if
multi-threaded is considered, we should
explicitly require and instantiate any
shared value, e.g. constants, mutable data, etc.
Or get a mutex which instantiated in boot-up,
for a quick and dirty fix I guess...

Sorry that I don't have enough time to
take a deep look into it. I was doing too
many projects parallelly... /sigh/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lin Jen-Shin  
View profile  
 More options Nov 4 2009, 5:52 am
From: Lin Jen-Shin <god...@gmail.com>
Date: Wed, 4 Nov 2009 02:52:04 -0800 (PST)
Local: Wed, Nov 4 2009 5:52 am
Subject: Re: Poor Authenticator Design
FYI:
I don't have enough time to provide a good patch,
but I am throwing commits to my own fork. Here's
what I do to my fork to try to solve this problem:

http://github.com/godfat/rubycas-server/commit/aa7f50fa71f7232094dbff...

And I was start refatoring to some of internals.
I would try to keep these simple enough to
merge back to mainstream, feel free to use them,
or ask me what is the reason behind any commit,
or provide a patch to my fork.

Sorry I won't do many testing to them since I am
lacking of time to concentrate on this project.

On Sep 25, 12:30 am, Lin Jen-Shin <god...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »