Michael Shareghi created KARAF-6424:
---------------------------------------

             Summary: Custom LoginModules broken in 4.2.3 without re-compilation
                 Key: KARAF-6424
                 URL: https://issues.apache.org/jira/browse/KARAF-6424
             Project: Karaf
          Issue Type: Bug
          Components: karaf
    Affects Versions: 4.2.3
            Reporter: Michael Shareghi


Custom LoginModules deriving from AbstractKarafLoginModule are broken since 
karaf 4.2.3, due to a new precondition to the commit() method. A protected 
boolean value called "succeeded", was added at the base class, and LoginModules 
which extend AbstractKarafLoginModule must now set *succeeded* to *true* in the 
login() method before returning, even if the return value itself true.  If they 
do not, the base class's commit() method clears the user and principals and the 
login is aborted.

 

This doesn't affect the built-in Karaf LoginModules because they were all 
updated  to include the succeeded=true login statement. However, I didn't see 
anything in the documentation that specifies this new requirement.

 

Please consider a base class design that preserve backwards compatibility and 
doesn't require subclasses to implement new side-effects to continue working.  

[https://github.com/apache/karaf/commit/d2f19a5a89f50970075faba4ecfbd799035e390e#diff-a2ebf916f22840dae40b465b685f50d3]

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to