Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions examples/ssl-project/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
This project shows how to use a certificate template to enable SSL connections on an app server (in this case, the
REST API server). Two things to note in this project:
This project demonstrates how to use a certificate template to enable SSL connections on an app server.

1. The src/main/ml-config/servers/rest-api-server.json config file shows an example of referring to the ID of a
certificate template.
1. The gradle.properties file shows how the mlSimpleSsl property is used to tell ml-gradle to use an SSL connection
when loading modules.
The project currently uses the `mlSimpleSsl` property to tell ml-gradle to use a "trust everything" approach for
communicating with the project's REST API server. This is only used for demonstration purposes and is not recommended
for a production environment. See
[this guide on SSL with ml-gradle](https://github.com/marklogic/ml-gradle/wiki/Loading-modules-via-SSL) for
information on properly configuring SSL usage.

Note the inclusion of an `ext` block in this project's `build.gradle` file. This automates the generation of a temp
certificate for the certificate template. This can also be accomplished by updating the app server via the MarkLogic
Admin UI; the Admin UI will check for a temp for the app server's certificate template and will create one if it does
not yet exist.
4 changes: 1 addition & 3 deletions examples/ssl-project/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ mlHost=localhost
mlAppName=ssl-project
mlRestPort=8180
mlUsername=admin
mlPassword=admin
mlPassword=change in gradle-local.properties

# Since the REST API server for this sample project is configured to use a certificate template for SSL, we set this
# property to use a very simple SSLContext for communicating with the REST API server. This SSLContext is required for
# loading modules - i.e. in order to load options/services/transforms via the REST API server, we need an SSL connection.
#
# You can configure a more sophisticated SSLContext by setting the restSslContext property on mlAppConfig in an ext block in build.gradle.
#
# Starting in 3.17.0, there are additional properties for configuring an SSL connection based on the JVM's
# default keystore. See the Property Reference page in the ml-gradle Wiki for more information.
mlSimpleSsl=true
8 changes: 0 additions & 8 deletions examples/ssl-project/src/main/ml-config/servers/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"server-name": "%%NAME%%",
"authentication": "digestbasic",
"ssl-certificate-template": "%%certificate-templates-id-ssl-project-template%%"
"ssl-certificate-template": "ssl-project-template"
}