Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 07:12 Go to next message
Garcia de Mirasierra Perez is currently offline Garcia de Mirasierra PerezFriend
Messages: 15
Registered: August 2015
Junior Member
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 09:06 Go to previous messageGo to next message
Edgar Mueller is currently offline Edgar MuellerFriend
Messages: 17
Registered: March 2016
Junior Member
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/


--
Edgar Mueller

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 09:20 Go to previous messageGo to next message
Edgar Mueller is currently offline Edgar MuellerFriend
Messages: 17
Registered: March 2016
Junior Member
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/


--
Edgar Mueller

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 16:46 Go to previous message
Garcia de Mirasierra Perez is currently offline Garcia de Mirasierra PerezFriend
Messages: 15
Registered: August 2015
Junior Member

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 Jun 23 12:31:56 GMT 2018

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

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

Back to the top