You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Mingliang Liu (JIRA)" <ji...@apache.org> on 2016/05/07 10:14:12 UTC

[jira] [Updated] (HADOOP-13105) Support timeouts in LDAP queries in LdapGroupsMapping.

     [ https://issues.apache.org/jira/browse/HADOOP-13105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mingliang Liu updated HADOOP-13105:
-----------------------------------
    Attachment: HADOOP-13105.000.patch

Hi [~cnauroth], thanks for reporting this.

# In the {{LdapGroupsMapping}}, we are also missing the {{com.sun.jndi.ldap.connect.timeout}} property for the env. I suppose this is orthogonal to the read timeouts. Should we address this as well?
# I had a look at the JNDI API documentation you kindly posted. I'm not sure I understand it correctly or the documentation is stale, but I was not able to reproduce the timed out exception using the [ReadTimeoutTest.java|https://docs.oracle.com/javase/tutorial/displayCode.html?code=https://docs.oracle.com/javase/tutorial/jndi/newstuff/examples/ReadTimeoutTest.java]. If we only set the {{com.sun.jndi.ldap.read.timeout}} env, the {{new InitialDirContext(env)}} will be stuck at connection phase and the read (query) operation will never be really issued. The test is running forever. However, if I set the {{com.sun.jndi.ldap.connect.timeout}}, the {{LDAP response read timed out}} naming exception will be thrown as expected.
# That's said, to test the {{com.sun.jndi.ldap.read.timeout}} feature is not as easy as to test the connect timeout. I'm wondering if the mock/spy will really help us here.

See the v0 patch attached. I can make the property values configurable.

> Support timeouts in LDAP queries in LdapGroupsMapping.
> ------------------------------------------------------
>
>                 Key: HADOOP-13105
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13105
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: security
>            Reporter: Chris Nauroth
>            Assignee: Mingliang Liu
>         Attachments: HADOOP-13105.000.patch
>
>
> {{LdapGroupsMapping}} currently does not set timeouts on the LDAP queries.  This can create a risk of a very long/infinite wait on a connection.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org