Skip to content

Commit 0665855

Browse files
authored
Merge pull request #76 from marklogic/feature/ssl-testing
Added docs section on configuring SSL
2 parents 4db87e5 + 901091f commit 0665855

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/configuration.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,24 @@ Note that if the username or password contain either a `@` or a `:` character, y
5959
[percent encoding](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding) into the correct character
6060
triplet. For example, a password of `sp@r:k` must appear in the `spark.marklogic.client.uri` string as `sp%40r%3Ak`.
6161

62+
### Configuring SSL
63+
64+
If the MarkLogic app server that the connector will connect to requires SSL, you will need to configure the
65+
`spark.marklogic.client.sslProtocol` option. The common approach is to set this to `default`, causing the associated
66+
JVM's certificate store - typically the `$JAVA_HOME/jre/lib/security/cacerts` file - to be used for establishing an
67+
SSL connection. The certificate store should contain the public certificate associated with the SSL certificate template
68+
used by the MarkLogic app server.
69+
70+
If you receive an error containing a message of "PKIX path building failed", the most likely issue is that your JVM's
71+
certificate store does not contain the public certificate associated with the MarkLogic app server, or your Spark
72+
environment may be using a JVM different from the one you think it is.
73+
[This guide](https://www.baeldung.com/jvm-certificate-store-errors) provides some common solutions for solving this
74+
error.
75+
76+
If you receive an `javax.net.ssl.SSLPeerUnverifiedException` error, you will need to adjust the
77+
`spark.marklogic.client.sslHostnameVerifier` option. A value of `ANY` will disable hostname verification,
78+
which may be appropriate in a development or test environment.
79+
6280
## Read options
6381

6482
These options control how the connector reads data from MarkLogic. See [the guide on reading](reading.md) for more

0 commit comments

Comments
 (0)