[
https://issues.apache.org/jira/browse/KNOX-3379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18096415#comment-18096415
]
ASF subversion and git services commented on KNOX-3379:
-------------------------------------------------------
Commit ad6c15958ba2ba3e78a5fd5225a43327003fa288 in knox's branch
refs/heads/master from Sandor Molnar
[ https://gitbox.apache.org/repos/asf?p=knox.git;h=ad6c15958 ]
KNOX-3377: KNOX-3378: KNOX-3379: Support secure LDAP (LDAPS) for the Knox
embedded LDAP service (#1305)
> Support LDAPS for the LdapProxyBackend connection to the remote LDAP server
> ---------------------------------------------------------------------------
>
> Key: KNOX-3379
> URL: https://issues.apache.org/jira/browse/KNOX-3379
> Project: Apache Knox
> Issue Type: Sub-task
> Components: Server
> Affects Versions: 3.0.0
> Reporter: Sandor Molnar
> Assignee: Sandor Molnar
> Priority: Critical
> Fix For: 3.0.0
>
>
> Enable the LdapProxyBackend to connect to the remote/backing LDAP server over
> LDAPS. Today an l{{{}daps:// {{}}}}URL is parsed but the connection is always
> plaintext because SSL is never applied to the LdapConnectionConfig. Apply TLS
> to both the pooled search connections and the short-lived authentication
> (bind) connection.
> +Changes:+
> - Per-backend configuration ({{{}gateway.ldap.interceptor.<name>.*{}}}):
> -- {{{}useSsl{}}}: enable LDAPS (auto-enabled when the URL uses the ldaps://
> scheme).
> -- {{{}trustAllCertificates{}}}: skip certificate validation (test/dev only).
> -- {{{}trustStore / trustStoreType / trustStorePassword{}}}: truststore used
> to validate the server certificate (defaults to the JVM default trust store
> when unset).
> -- {{{}sslProtocol, enabledProtocols, enabledCipherSuites{}}}: TLS
> protocol/cipher tuning.
> -- {{{}connectionTimeout{}}}: LDAP response timeout (ms).
> - Trust material built once and applied to both connection paths.
> +Required dependency alignment (runtime):+
> - Apache Directory client API 2.0.0 → 2.1.8. The 2.0.0 client's SSL code
> calls MINA APIs (SslFilter.setUseClientMode, etc.) removed in MINA 2.2.x,
> causing {{NoSuchMethodError}} under the MINA 2.2.8 Knox ships. 2.1.8 targets
> MINA 2.2.x.
> - ApacheDS server 2.0.0.AM26 → 2.0.0.AM27. AM26's LdapsInitializer
> references NoVerificationTrustManager, which directory-api 2.1.8 removed;
> AM27 is built against directory-api 2.1.x + MINA 2.2.x, keeping the front-end
> LDAPS transport working.
> - MINA stays at 2.2.8 (unchanged; CVE requirement).
> - Pin all directory-api artifacts to a single version and converge
> {{commons-collections4 to 4.5.0 }}to keep one consistent classpath.
> - Because {{NoVerificationTrustManager}} no longer exists in 2.1.8, the
> backend provides its own trust-all X509TrustManager for the
> {{trustAllCertificates}} path.
> +Acceptance criteria:+
> - The backend performs user/group lookups and binds against a remote LDAP
> server over TLS.
> - An untrusted server certificate is rejected when validation is enabled; a
> configured truststore or {{trustAllCertificates}} allows the connection.
> - Existing plaintext backend behavior is unchanged when useSsl is not set.
> - Integration test drives the backend over an SSL-enabled embedded server
> (lookups + binds) and verifies untrusted-cert rejection.
> - Existing LDAP tests, the shared gateway-demo-ldap server, and reactor-wide
> dependency convergence all remain green after the version bumps.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)