mdarifmustafa / vt-middleware

Automatically exported from code.google.com/p/vt-middleware
0 stars 0 forks source link

vt-ldap: error in the commit method AbstractLoginModule #110

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I think there is an error in the commit method of the class 
edu.vt.middleware.ldap.jaas.AbstractLoginModule. This method always return 
true. When you for examle have defined multiple LdapLoginModules in the jaas 
configuration with SUFFICIENT and the last LoginModule was successful, then the 
subject only contains a LdapPrincipal and all other principals are ignored.

Maybe
-----
if (!this.success) {
   return false;
} else {
  return true;
}
----
instead of
----
return true;

Original issue reported on code.google.com by steffen....@fu-berlin.de on 4 Apr 2011 at 2:47

GoogleCodeExporter commented 8 years ago

Original comment by dfis...@gmail.com on 4 Apr 2011 at 8:57

GoogleCodeExporter commented 8 years ago
Reviewed commit(), abort(), and logout() methods.
Fixed commit() to return false on failed login.
Updated abort() to handle a failed commit.
Added support for a clearPass option.
See r1878 on the vt-ldap-3 branch.

I had trouble mocking up a test case for this, please review and comment if 
this patch fixed your issue.
Other JAAS unit tests are passing.

Original comment by dfis...@gmail.com on 5 Apr 2011 at 3:18

GoogleCodeExporter commented 8 years ago
Pushed snapshot:
http://vt-middleware.googlecode.com/svn/maven2/edu/vt/middleware/vt-ldap/3.3.3-S
NAPSHOT/

Original comment by dfis...@gmail.com on 7 Apr 2011 at 7:27

GoogleCodeExporter commented 8 years ago
Added unit test for sufficient in r1900.

Original comment by dfis...@gmail.com on 11 Apr 2011 at 8:00

GoogleCodeExporter commented 8 years ago

Original comment by dfis...@gmail.com on 12 Apr 2011 at 5:43