-
Notifications
You must be signed in to change notification settings - Fork 80
Loading modules via SSL
rjrudin edited this page Aug 27, 2015
·
21 revisions
ml-gradle and its underlying libraries - ml-javaclient-util and ml-app-deployer - provide support for creating an app server with a certificate template and then, in the case of a REST API server, loading modules via an SSL connection with that server.
sample-project shows an example of how this works - here are the moving parts:
- A certificate template config file defines the template configuration.
- The REST API server file includes a reference to the SSL certificate template (see https://github.com/rjrudin/ml-gradle/wiki/Referring-to-a-resource-by-its-ID for how this ID reference works).
- The build.gradle file adds an instance of GenerateTemporaryCertificateCommand to the mlDeploy task. This temporary certificate is then used by the REST API server (the management API offers other options for generating real certificates). Without generating this certificate, the REST API server won't be able to accept HTTP or HTTPS connections.
- gradle.properties includes mlSimpleSsl=true. This tells ml-gradle to use a very basic SSLContext and SSLHostnameVerifier (basic in that they do no validation) when loading modules into a REST API server.