You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To use SSL, you have to set the configuration `useSsl` to `true` and set a `SSLContext`
151
-
(see [example code](https://github.com/arangodb/arangodb-java-driver/blob/main/test-functional/src/test-ssl/java/com/arangodb/SslExampleTest.java)).
156
+
To use SSL, you have to set the configuration `useSsl` to `true`.
157
+
By default, the driver uses the default `SSLContext`.
158
+
To change this, you can provide the `SSLContext` instance to use:
152
159
153
160
```java
154
161
ArangoDB arangoDB =newArangoDB.Builder()
@@ -157,6 +164,22 @@ ArangoDB arangoDB = new ArangoDB.Builder()
157
164
.build();
158
165
```
159
166
167
+
Alternatively, the driver can create a new `SSLContext` using the provided
168
+
configuration. In this case, it is required to set the configuration `sslCertValue`
169
+
with the SSL certificate value as Base64-encoded String:
170
+
171
+
```java
172
+
ArangoDB arangoDB =newArangoDB.Builder()
173
+
.useSsl(true)
174
+
.sslCertValue("<certificate>") // SSL certificate as Base64-encoded String
See the [example code](https://github.com/arangodb/arangodb-java-driver/blob/main/test-functional/src/test-ssl/java/com/arangodb/SslExampleTest.java)
181
+
for more details on SSL configuration.
182
+
160
183
## Connection Pooling
161
184
162
185
The driver keeps a pool of connections for each host, the max amount of
@@ -194,9 +217,9 @@ To use this feature just call the method `host(String, int)` multiple times.
194
217
195
218
```java
196
219
ArangoDB arangoDB =newArangoDB.Builder()
197
-
.host("host1", 8529)
198
-
.host("host2", 8529)
199
-
.build();
220
+
.host("host1", 8529)
221
+
.host("host2", 8529)
222
+
.build();
200
223
```
201
224
202
225
The driver is also able to acquire a list of known hosts in a cluster. For this the driver has
-`responseQueueTimeSamples(Integer)`: amount of samples kept for queue time metrics, (default: `10`)
90
-
-`compression(Compression)`: the `content-encoding` and `accept-encoding` to use for HTTP requests, possible values are: `NONE`, `DEFLATE`, `GZIP`, (default: `NONE`)
91
-
-`compressionThreshold(Integer)`: the minimum HTTP request body size (in bytes) to trigger compression, (default: `1024`)
92
-
-`compressionLevel`: compression level between 0 and 9, (default: `6`)
93
-
-`serde(ArangoSerde)`: serde to serialize and deserialize user-data
94
-
-`serdeProviderClass(Class<? extends ArangoSerdeProvider>)`: serde provider to be used to instantiate the user-data serde
95
-
-`protocolConfig(ProtocolConfig)`: configuration specific for the used protocol provider implementation
96
-
-`pipelining(Boolean):`: use HTTP pipelining, (`HTTP/1.1` only, default `false`)
83
+
-`sslCertValue(String)`: SSL certificate value as Base64-encoded String
84
+
-`sslAlgorithm(String)`: Name of the SSL Trust manager algorithm (default: `SunX509`)
85
+
-`sslProtocol(String)`: Name of the SSLContext protocol (default: `TLS`)
-`responseQueueTimeSamples(Integer)`: Amount of samples kept for queue time metrics, (default: `10`)
93
+
-`compression(Compression)`: The `content-encoding` and `accept-encoding` to use for HTTP requests, possible values are: `NONE`, `DEFLATE`, `GZIP`, (default: `NONE`)
94
+
-`compressionThreshold(Integer)`: The minimum HTTP request body size (in bytes) to trigger compression, (default: `1024`)
95
+
-`compressionLevel`: Compression level between 0 and 9, (default: `6`)
96
+
-`serde(ArangoSerde)`: Serde to serialize and deserialize user-data
97
+
-`serdeProviderClass(Class<? extends ArangoSerdeProvider>)`: Serde provider to be used to instantiate the user-data serde
98
+
-`protocolConfig(ProtocolConfig)`: Configuration specific for the used protocol provider implementation
99
+
-`pipelining(Boolean):`: Use HTTP pipelining, (`HTTP/1.1` only, default `false`)
97
100
98
101
### HTTP Protocol Provider Configuration
99
102
@@ -134,6 +137,9 @@ The properties read are:
134
137
-`password`
135
138
-`jwt`
136
139
-`useSsl`
140
+
-`sslCertValue`: SSL certificate as Base64-encoded string
To use SSL, you have to set the configuration `useSsl` to `true` and set a `SSLContext`
155
-
(see [example code](https://github.com/arangodb/arangodb-java-driver/blob/main/test-functional/src/test-ssl/java/com/arangodb/SslExampleTest.java)).
160
+
To use SSL, you have to set the configuration `useSsl` to `true`.
161
+
By default, the driver uses the default `SSLContext`.
162
+
To change this, you can provide the `SSLContext` instance to use:
156
163
157
164
```java
158
165
ArangoDB arangoDB =newArangoDB.Builder()
@@ -161,6 +168,22 @@ ArangoDB arangoDB = new ArangoDB.Builder()
161
168
.build();
162
169
```
163
170
171
+
Alternatively, the driver can create a new `SSLContext` using the provided
172
+
configuration. In this case, it is required to set the configuration `sslCertValue`
173
+
with the SSL certificate value as Base64-encoded String:
174
+
175
+
```java
176
+
ArangoDB arangoDB =newArangoDB.Builder()
177
+
.useSsl(true)
178
+
.sslCertValue("<certificate>") // SSL certificate as Base64-encoded String
See the [example code](https://github.com/arangodb/arangodb-java-driver/blob/main/test-functional/src/test-ssl/java/com/arangodb/SslExampleTest.java)
185
+
for more details on SSL configuration.
186
+
164
187
## Connection Pooling
165
188
166
189
The driver keeps a pool of connections for each host, the max amount of
@@ -198,9 +221,9 @@ To use this feature just call the method `host(String, int)` multiple times.
198
221
199
222
```java
200
223
ArangoDB arangoDB =newArangoDB.Builder()
201
-
.host("host1", 8529)
202
-
.host("host2", 8529)
203
-
.build();
224
+
.host("host1", 8529)
225
+
.host("host2", 8529)
226
+
.build();
204
227
```
205
228
206
229
The driver is also able to acquire a list of known hosts in a cluster. For this the driver has
0 commit comments