From 5c000411cb2834e7d1d2ef42269901c65fbd0436 Mon Sep 17 00:00:00 2001 From: Armando Segnini Date: Fri, 5 Apr 2019 14:25:53 +0200 Subject: [PATCH 1/2] Add ldap.cache-ttl The ldap.cache-ttl property was missing. --- presto-docs/src/main/sphinx/security/ldap.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/presto-docs/src/main/sphinx/security/ldap.rst b/presto-docs/src/main/sphinx/security/ldap.rst index 849d33b38072f..f1ac73d58f4c0 100644 --- a/presto-docs/src/main/sphinx/security/ldap.rst +++ b/presto-docs/src/main/sphinx/security/ldap.rst @@ -102,6 +102,7 @@ Password authentication needs to be configured to use LDAP. Create an password-authenticator.name=ldap ldap.url=ldaps://ldap-server:636 ldap.user-bind-pattern= + ldap.cache-ttl=2h ======================================================= ====================================================== Property Description @@ -113,6 +114,10 @@ Property Description must contain the pattern ``${USER}`` which will be replaced by the actual username during the password authentication. Example: ``${USER}@corp.example.com``. +``ldap.cache-ttl`` The time to cache the password authentication. This + property must be specified using a string, Example: + Use ``45s`` to set this property to 45 seconds. + Default value is ``1.00h`` (1 hour). ======================================================= ====================================================== Based on the LDAP server implementation type, the property From 86cd54a4dfa5b88f326e92c6fe6351604e14e667 Mon Sep 17 00:00:00 2001 From: Armando Segnini Date: Fri, 5 Apr 2019 14:31:17 +0200 Subject: [PATCH 2/2] Add ConfigDescription to setLdapCacheTtl Add ConfigDescription to setLdapCacheTtl --- .../src/main/java/com/facebook/presto/password/LdapConfig.java | 1 + 1 file changed, 1 insertion(+) diff --git a/presto-password-authenticators/src/main/java/com/facebook/presto/password/LdapConfig.java b/presto-password-authenticators/src/main/java/com/facebook/presto/password/LdapConfig.java index 426d299f154d9..903d9540d2f8c 100644 --- a/presto-password-authenticators/src/main/java/com/facebook/presto/password/LdapConfig.java +++ b/presto-password-authenticators/src/main/java/com/facebook/presto/password/LdapConfig.java @@ -92,6 +92,7 @@ public Duration getLdapCacheTtl() } @Config("ldap.cache-ttl") + @ConfigDescription("The time to cache the password authentication. Example: 2.00h") public LdapConfig setLdapCacheTtl(Duration ldapCacheTtl) { this.ldapCacheTtl = ldapCacheTtl;