Juan Hernandez has posted comments on this change.

Change subject: engine: Integrate Atlassian Crowd Client as a new 
Authentication Domain
......................................................................


Patch Set 1:

I think that maybe a better way to integrate additional authentication 
providers with the engine is to use the service provider mechanism available in 
Java. The idea is that the ServiceProvider class can automatically look for 
classes implementing a given interface if the class names of the 
implementations are provided in a META-INF/services/com.example.TheInteface 
file.

With some small changes to the current LdapBroker interface, and using this 
service provider interface mechanism the engine could load any authentication 
provider whose .jar files are dropped in the lib directory of the .ear.

I prepared a patch as a proof of concept of this mechanism:

http://gerrit.ovirt.org/9414

The crowd integration could then be in the same source tree than the engine or 
even in a different one. What would be required is to make some small changes 
to the CrowdBrokerImpl class, something like this:

  public class CrowdBrokerImpl extends LdapBrokerBase {
      // The type of the broker:
      private static final String TYPE = "Crowd";

      // The set of domains managed by this broker:
      private static final Set<String> DOMAINS = Collections.singleton("crowd");

      @Override
      public Set<String> getDomains() {
          return DOMAINS;
      }

      @Override
      protected String getBrokerType () {
          return TYPE;
      }
  }

The classes of the Crowd integration could go in their own .jar file, including 
a ./src/main/resources/services/org.ovirt.engine.core.bll.adbroker.LdapBroker 
text file with the following content (just one line):

  org.ovirt.engine.core.bll.CrowdBrokerImpl

When the .jar containing the classes and this text is copied to the 
engine.ear/lib directory (including its dependecies) the engine automatically 
picks the new broker.

This easily allows deployments with or without the crowd integration.

--
To view, visit http://gerrit.ovirt.org/9324
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ide867f16d092eb329c0ce2fccf4ebd02f3aae0df
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Justin Hammond <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Justin Hammond <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Sharad Mishra <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to