This example contains the source code for an example implementation of
both the ExternalLoginProvider and the DynamicParticipantSynchronizationProvider
interface, based on Java property files.
Click the following link to download the sources for this example as ZIP file:
The location of the property file to be used has to be configured by
setting the User.Registry property, which defaults to user-registry.properties.
In general a DynamicParticipantSynchronizationProvider takes
care of retrieving authorization information for an authenticated user as well
as detail about this user itself from an external user registry. This example
shows how to retrieve this information from a plain Java property file.
The general syntax of such user registry property file is:
ExternalLoginProvider implementation may be
used to authenticate users against this password.Group.$id$.Name / Department.$id$.Name entry.For more detailed information on the DynamicParticipantSynchronizationProvider
interface please refer to chapter
Integrating External User Repositories of the
Programming Guide.
This example can be used in projects which are based on the WAR and EAR archetypes.
For a plain Spring WAR deployment please open the pom.xml file of the corresponding project
into an editor. For EAR deployments you have to use the pom.xml which is located either
in the config module (JBoss only) or in the ejb module (WebLogic and WebSphere).
After this please include the following dependency there:
<dependency>
<groupId>org.eclipse.stardust.examples</groupId>
<artifactId>properties-sync</artifactId>
<version>${ipp.version}</version>
<scope>runtime</scope>
</dependency>
In a last step the following properties must be included in the server side carnot.properties:
User.Registry=C:/Development/user-registry-file.properties Security.Authentication.LoginService=org.eclipse.stardust.examples.authorization.properties.PropertyFileLoginService Security.Authorization.SynchronizationProvider=org.eclipse.stardust.examples.authorization.properties.PropertyFileSynchronizationProvider Security.Authorization.SynchronizationStrategy=org.eclipse.stardust.examples.authorization.properties.AlwaysSyncStrategy
Note that you have to adapt the path and the file name of the User.Registry property according to your environment.
Please note that this example assumes that the Engine is using implicit authentication. Further details can be found in the Security chapter of the Operation Guide.