diff --git src/main/java/org/identityconnectors/ldap/LdapConnection.java src/main/java/org/identityconnectors/ldap/LdapConnection.java index f54d9a1..019ed9e 100644 --- src/main/java/org/identityconnectors/ldap/LdapConnection.java +++ src/main/java/org/identityconnectors/ldap/LdapConnection.java @@ -432,7 +432,7 @@ public class LdapConnection { ctx = getAnonymousContext(); } - Attributes attrs = ctx.getAttributes("", new String[]{"vendorVersion", "vendorName", "highestCommittedUSN", "rootDomainNamingContext", "structuralObjectClass"}); + Attributes attrs = ctx.getAttributes("", new String[]{"vendorVersion", "vendorName", "highestCommittedUSN", "rootDomainNamingContext", "structuralObjectClass", "supportedExtension"}); String vendorName = getStringAttrValue(attrs, "vendorName"); if (null != vendorName) { vendorName = vendorName.toLowerCase(); @@ -461,6 +461,13 @@ public class LdapConnection { } } + Set supportedExtensions = getStringAttrValues(attrs, "supportedExtension"); + if (supportedExtensions != null) { + if (supportedExtensions.contains("1.3.6.1.4.1.3327.10.250.3.999")) { + log.info("CA LDAP Directory server has been detected"); + return ServerType.CALDAP; + } + } String vendorVersion = getStringAttrValue(attrs, "vendorVersion"); if (vendorVersion != null) { vendorVersion = vendorVersion.toLowerCase(); diff --git src/main/java/org/identityconnectors/ldap/search/LdapInternalSearch.java src/main/java/org/identityconnectors/ldap/search/LdapInternalSearch.java index c2a26f1..48368dd 100644 --- src/main/java/org/identityconnectors/ldap/search/LdapInternalSearch.java +++ src/main/java/org/identityconnectors/ldap/search/LdapInternalSearch.java @@ -71,6 +71,8 @@ public class LdapInternalSearch { throw new ConnectorException(e); } } catch (NameNotFoundException e) { + throw new ConnectorException(e); + } catch (NamingException e) { if (ServerType.CALDAP.equals(conn.getServerType())){ // CA LDAP with Zos returns a no such object // when an exact search returns no entry. @@ -80,8 +82,6 @@ public class LdapInternalSearch { else { throw new ConnectorException(e); } - } catch (NamingException e) { - throw new ConnectorException(e); } }