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
Copy file name to clipboardexpand all lines: README.md
+29-13
Original file line number
Diff line number
Diff line change
@@ -9,30 +9,44 @@ In contrast the present project focusses on the configuration of more than one c
9
9
Therefore we use several Spring Boot based microservices that provide different client certificate secured REST endpoint and a separate microservice that accesses these services:
10
10
11
11
```
12
-
================
13
-
= =
14
-
= server-alice =
15
-
============== = =
16
-
= = ------------------> ================
17
-
= client-bob =
18
-
= = ------------------> ================
19
-
============== = =
20
-
= server-tom =
21
-
= =
22
-
================
12
+
-------------------------------------------
13
+
| Docker Network scope |
14
+
| ================ |
15
+
| = = |
16
+
| = server-alice = |
17
+
============ | ============== = = |
18
+
= docker- = | = = -----> ================ |
19
+
= network- = -----> = client-bob = |
20
+
= client = | = = -----> ================ |
21
+
============ | ============== = = |
22
+
| = server-tom = |
23
+
| = = |
24
+
| ================ |
25
+
-------------------------------------------
26
+
23
27
```
24
28
25
29
26
30
For a general approach on how to generate private keys and certificates and create Java Keystores, have a look into https://github.com/jonashackt/spring-boot-rest-clientcertificate#generate-the-usual-key-and-crt---and-import-them-into-needed-keystore-jks-files
27
31
28
32
# HowTo Use
29
33
34
+
Everything you need to run a full build and __complete__ test (incl. Integrationtest of docker-network-client firing up all three microservices that´ll call each other with client certificate support) is this:
35
+
30
36
```
31
37
mvn clean install
32
-
docker-compose up
33
38
```
34
39
35
-
Open your Browser with [http:localhost:8080/swagger-ui.html] and fire up a GET-Request to /secretservers with Swagger :)
40
+
Only, if you want to check manually, you can do a `docker-compose up -d` and open your Browser with [http:localhost:8080/swagger-ui.html] and fire up a GET-Request to /secretservers with Swagger :)
41
+
42
+
43
+
# Integrationtesting
44
+
45
+
As client-bob only has access to the DNS aliases `server-alice` and `server-tom`, if it itself is part of the Docker (Compose) network and these aliases are used to access both client certificate secured endpoints, we need another way to run an Integration test inside the Docker network scope.
46
+
47
+
Therefore we use the [docker-compose-rule](https://github.com/palantir/docker-compose-rule) and the __docker-network-client__ that just calls client-bob inside the Docker network.
48
+
49
+
docker-compose-rule needs a special Maven repository to be added, because it is only served on Bintray.
36
50
37
51
38
52
# TlDR: How to create multiple keys & certificates for multiple servers - and add these into one truststore / keystore
0 commit comments