<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Fast LDAP user lookup at runtime</title><link>https://answers.axonivy.com/questions/3544/fast-ldap-user-lookup-at-runtime</link><description>&lt;p&gt;In my project I read users at runtime via Ivy API: SecurityContext.findUser("theUser");&lt;/p&gt;
&lt;p&gt;This works reasonably well in my company environment. But if I deploy the project the the productive engine (to the cloud) this user lookups can take up to 2 minutes. At least if I search for a not existing user? How can I speed it up? The security system here is configured to use an LDAP. Shouldn't this be a fast protocol?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3544/fast-ldap-user-lookup-at-runtime" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 14 Nov 2018 09:51:22 -0500</lastBuildDate><item><title>Answer by Christian Strebel</title><link>https://answers.axonivy.com/questions/3544/fast-ldap-user-lookup-at-runtime/3546</link><description>&lt;p&gt;&lt;strong&gt;Before 7.2:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can configure additional properties of an security system not that ease, see:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://answers.axonivy.com/questions/893/how-can-i-specify-additional-properties-attributes-for-an-external-security-system"&gt;How can I specify additional properties/attributes for an External Security System?&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christian Strebel</dc:creator><pubDate>Wed, 14 Nov 2018 09:51:22 -0500</pubDate><guid>https://answers.axonivy.com/questions/3544/fast-ldap-user-lookup-at-runtime/3546</guid></item><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/3544/fast-ldap-user-lookup-at-runtime/3545</link><description>&lt;p&gt;&lt;strong&gt;7.2 and later:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The solution is to use our cached user lookup: &lt;code&gt;SecurityContext.findUserWithoutLookup("theUser")&lt;/code&gt;
As the users are synchronized once a day into our cache table, this should be sufficient for most use cases.&lt;/p&gt;
&lt;p&gt;An additional improvement for cloud access to a company LDAP is to disable refereal following:
&lt;code&gt;"java.naming.referral": ignore&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;With this setting you speed up the lookup for not existing names as following referalls (browsing attached ADs) could take ages if you come from a different network.&lt;/p&gt;
&lt;p&gt;Such a config in 7.2 could look as follows
&lt;img alt="alt text" src="https://answers.axonivy.com/upfiles/ivyYaml_referral-ignore.png"&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Wed, 14 Nov 2018 03:10:36 -0500</pubDate><guid>https://answers.axonivy.com/questions/3544/fast-ldap-user-lookup-at-runtime/3545</guid></item></channel></rss>