Skip to content

Commit c6c7f1b

Browse files
authored
Merge pull request #663 from marklogic/feature/ssl-project-updates
Updating the ssl-project example
2 parents 01502e1 + c075d4a commit c6c7f1b

File tree

4 files changed

+13
-19
lines changed

4 files changed

+13
-19
lines changed

examples/ssl-project/README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
This project shows how to use a certificate template to enable SSL connections on an app server (in this case, the
2-
REST API server). Two things to note in this project:
1+
This project demonstrates how to use a certificate template to enable SSL connections on an app server.
32

4-
1. The src/main/ml-config/servers/rest-api-server.json config file shows an example of referring to the ID of a
5-
certificate template.
6-
1. The gradle.properties file shows how the mlSimpleSsl property is used to tell ml-gradle to use an SSL connection
7-
when loading modules.
3+
The project currently uses the `mlSimpleSsl` property to tell ml-gradle to use a "trust everything" approach for
4+
communicating with the project's REST API server. This is only used for demonstration purposes and is not recommended
5+
for a production environment. See
6+
[this guide on SSL with ml-gradle](https://github.com/marklogic/ml-gradle/wiki/Loading-modules-via-SSL) for
7+
information on properly configuring SSL usage.
8+
9+
Note the inclusion of an `ext` block in this project's `build.gradle` file. This automates the generation of a temp
10+
certificate for the certificate template. This can also be accomplished by updating the app server via the MarkLogic
11+
Admin UI; the Admin UI will check for a temp for the app server's certificate template and will create one if it does
12+
not yet exist.

examples/ssl-project/gradle.properties

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ mlHost=localhost
22
mlAppName=ssl-project
33
mlRestPort=8180
44
mlUsername=admin
5-
mlPassword=admin
5+
mlPassword=change in gradle-local.properties
66

77
# Since the REST API server for this sample project is configured to use a certificate template for SSL, we set this
88
# property to use a very simple SSLContext for communicating with the REST API server. This SSLContext is required for
99
# loading modules - i.e. in order to load options/services/transforms via the REST API server, we need an SSL connection.
1010
#
11-
# You can configure a more sophisticated SSLContext by setting the restSslContext property on mlAppConfig in an ext block in build.gradle.
12-
#
1311
# Starting in 3.17.0, there are additional properties for configuring an SSL connection based on the JVM's
1412
# default keystore. See the Property Reference page in the ml-gradle Wiki for more information.
1513
mlSimpleSsl=true

examples/ssl-project/src/main/ml-config/servers/README.md

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
22
"server-name": "%%NAME%%",
3-
"authentication": "digestbasic",
4-
"ssl-certificate-template": "%%certificate-templates-id-ssl-project-template%%"
3+
"ssl-certificate-template": "ssl-project-template"
54
}

0 commit comments

Comments
 (0)