Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMFStore]: What do I to invoke LADPUserVerifier Class(How do I define es.properties file to invoke LADPUserVerifier Class)
[EMFStore]: What do I to invoke LADPUserVerifier Class [message #1761218] Tue, 09 May 2017 03:12 Go to next message
Eclipse UserFriend
Hello Maximilan and Edgar,

I want to use LADP. In es.propeties file I put:
emfstore.accesscontrol.authentication.policy=ldap
...
emfstore.accesscontrol.authentication.ldap.1.url=LDAP://ldap.forumsys.com:389/
emfstore.accesscontrol.authentication.ldap.1.base=ou=mathematicians,dc=example,dc=com

When I do debug. I see that invoke to UserVerifierChain.

My question is: What do I do to use LDAPUserVerifier Class.

Many thanks advanced.

Amalia
Re: [EMFStore]: What do I to invoke LADPUserVerifier Class [message #1761367 is a reply to message #1761218] Wed, 10 May 2017 05:06 Go to previous messageGo to next message
Eclipse UserFriend
Hi Amalia,
we're looking into this and set-up a test case, we'll keep you posted.
--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMFStore]: What do I to invoke LADPUserVerifier Class [message #1761369 is a reply to message #1761367] Wed, 10 May 2017 05:20 Go to previous messageGo to next message
Eclipse UserFriend
Ok, here's the promised test case. In order to access the LDAP server you have to set additional properties in your es.properties file.
The test case tells you which properties you have to set, e.g. 'emfstore.accesscontrol.authentication.ldap.1.authuser' has to be set to 'cn=read-only-admin,dc=example,dc=com', 'emfstore.accesscontrol.authentication.ldap.1.authuser' to 'password' and so on, see the commented parameters in the LDAPUserVerifier constructor.
Hope this helps!

public class LDAPUserVerifierTest extends ESTestWithMockServer {

	@BeforeClass
	public static void beforeClass() {
		startEMFStore();
	}

	@AfterClass
	public static void afterClass() {
		stopEMFStore();
	}

	@Test
	public void ldapVerifyUser() throws AccessControlException {
		final ESOrgUnitRepositoryImpl repository = new ESOrgUnitRepositoryImpl(getServerMock().getServerSpace());
		final ESOrgUnitProvider orgUnitProvider = new ESOrgUnitProviderImpl(repository);
		final LDAPUserVerifier ldapVerifier = new LDAPUserVerifier(
			orgUnitProvider,
			"ldap://ldap.forumsys.com", // url
			"dc=example,dc=com", // base
			"uid", // searchdn
			"cn=read-only-admin,dc=example,dc=com", // authuser 
			"password");  // authpass
		assertTrue(ldapVerifier.verifyPassword("gauss", "password"));
	}

}

--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMFStore]: What do I to invoke LADPUserVerifier Class [message #1761912 is a reply to message #1761369] Thu, 11 May 2017 12:46 Go to previous message
Eclipse UserFriend

Thank you very much Edgar!!


Previous Topic:[EMFStore]: How do you extend loginService
Next Topic:Cannot create genmodel from valid schema.
Goto Forum:
  


Current Time: Sat Jul 12 13:32:00 EDT 2025

Powered by FUDForum. Page generated in 0.06127 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top