RFR [11u]: 8160768: Add capability to custom resolve host/domain names within the default JNDI LDAP provider
Hohensee, Paul
hohensee at amazon.com
Tue Aug 11 17:20:29 UTC 2020
Oracle folks, can we get verification that this CSR matches what Oracle has done?
Thanks,
Paul
On 8/11/20, 8:55 AM, "jdk-updates-dev on behalf of Langer, Christoph" <jdk-updates-dev-retn at openjdk.java.net on behalf of christoph.langer at sap.com> wrote:
Hi,
I've been working on backporting JDK- 8160768: "Add capability to custom resolve host/domain names within the default JNDI LDAP provider" to OpenJDK 11u. This seems to be quite an important enhancement for usage in more complex LDAP setups so there is a certain demand for this backport. Oracle has backported it to their JDK8 and 11 releases already.
Backporting is not so trivial, though, as the original change introduced a new package with two classes in the javax namespace: javax.naming.ldap.spi with classes LdapDnsProvider and LdapDnsProviderResult. To facilitate backporting without having to change the spec, this backport creates package com.sun.jndi.ldap.spi instead of javax.naming.ldap.spi to provide the new service interface. So people wanting to leverage the feature in a JDK < 12 will have to build against the com.sun.jndi.ldap.spi implementation. Furthermore, we can't publicly export package com.sun.jndi.ldap.spi from module java.naming as this is not allowed for a module in the java namespace. So I introduced a new module jdk.naming.ldap for being able to export the new service interface. The service is hooked into java.naming's class LdapCtxFactory by reflective lookup of class com.sun.jndi.ldap.dns.LdapDnsProviderService and triggering its initialization. This in turn will register the LdapDnsProviderServiceInternal singleton for accessing com.sun.jndi.ldap.spi service implementations from java.naming. If a JDK was jlink'ed without module jdk.naming.ldap, the missing LdapDnsProvider facility would then just be ignored quietly.
In my backport I also include the adaptations to the test from the already backported change of JDK-8139965 to improve test stability.
I had to create a backport CSR as well for which I'd also need a review.
Bug: https://bugs.openjdk.java.net/browse/JDK-8160768
Original CSR: https://bugs.openjdk.java.net/browse/JDK-8192975
Original Change: http://hg.openjdk.java.net/jdk/jdk/rev/a609d549992a
Backport CSR: https://bugs.openjdk.java.net/browse/JDK-8251380
Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8160768.11u.0/
Thanks in advance for looking at this.
Best regards
Christoph
More information about the jdk-updates-dev
mailing list