@@ -35,6 +35,18 @@ use com.ibm.streamsx.inet.rest::*;
35
35
* output/bin/standalone
36
36
* Point browser to [https://localhost:1443] and accept the SEC_ERROR_UNKNOWN_ISSUER error and add an exception.
37
37
*
38
+ * This sample is enabled to use a secure connection by default. The server key and self signed certificate are stored
39
+ * in key store etc/keystore.jks.
40
+ *
41
+ * To enable client authentication with client certificate add parameter `trustStore: "etc/cacerts.jks` to all three
42
+ * rest operators and import the client key/certificate file `etc/client.pfx` into your browser certificate manager.
43
+ *
44
+ * Alternatively the import of the key- and trust-material from an Streams application configuration is supported.
45
+ * Add parameter `sslAppConfigName: "streams-certs"` to all tree rest operators and remove `certificateAlias`,
46
+ * `keyStore`, `keyPassword` and `trustStore`.
47
+ * Generate the application configuration:
48
+ * streamtool mkappconfig --description 'server cert and trust store' --property "server.jks=$(base64 --wrap=0 etc/keystore.jks)" --property "server.pass=changeit" --property "cacerts.jks=$(base64 --wrap=0 etc/cacerts.jks)" streams-certs
49
+ *
38
50
*/
39
51
public composite SimpleInject {
40
52
@@ -45,7 +57,8 @@ public composite SimpleInject {
45
57
certificateAlias: "mykey";
46
58
keyStore: "etc/keystore.jks";
47
59
keyPassword: "changeit";
48
- //context: "sensors";
60
+ //trustStore: "etc/cacerts.jks";
61
+ //sslAppConfigName: "streams-certs";
49
62
config
50
63
// Ensure the operators are in a single PE to have a single web-server
51
64
placement: partitionColocation("jetty1443");
@@ -59,6 +72,8 @@ public composite SimpleInject {
59
72
certificateAlias: "mykey";
60
73
keyStore: "etc/keystore.jks";
61
74
keyPassword: "changeit";
75
+ //trustStore: "etc/cacerts.jks";
76
+ //sslAppConfigName: "streams-certs";
62
77
context: "state";
63
78
contextResourceBase: "opt/statetest";
64
79
config
@@ -72,6 +87,8 @@ public composite SimpleInject {
72
87
certificateAlias: "mykey";
73
88
keyStore: "etc/keystore.jks";
74
89
keyPassword: "changeit";
90
+ //trustStore: "etc/cacerts.jks";
91
+ //sslAppConfigName: "streams-certs";
75
92
context: "wct";
76
93
contextResourceBase: "opt/wctest";
77
94
config
0 commit comments