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
@@ -18,8 +16,8 @@ Mutual TLS (mTLS) is an enhanced version of the standard TLS protocol where both
18
16
19
17
In mTLS, both the client and server have a certificate, and both sides authenticate using their public/private key pair. This bidirectional authentication provides an additional layer of security, ensuring that:
20
18
21
-
- Clients can verify they're connecting to the legitimate server
22
-
- Servers can verify the identity of connecting clients
19
+
- Clients can verify they're connecting to the legitimate server
20
+
- Servers can verify the identity of connecting clients
23
21
- All communication is encrypted end-to-end
24
22
25
23
---
@@ -33,44 +31,45 @@ The mTLS handshake process involves the following steps:
1.**Client connects to server**: The client initiates a connection to the server
69
-
2.**Server presents its TLS certificate**: The server sends its certificate to prove its identity
70
-
3.**Client verifies the server's certificate**: The client validates the server's certificate against trusted Certificate Authorities (CAs)
71
-
4.**Client presents its TLS certificate**: The client sends its own certificate to prove its identity
72
-
5.**Server verifies the client's certificate**: The server validates the client's certificate
73
-
6.**Server grants access**: Once both certificates are verified, the server allows the connection
67
+
1.**Client connects to server**: The client initiates a connection to the server
68
+
2.**Server presents its TLS certificate**: The server sends its certificate to prove its identity
69
+
3.**Client verifies the server's certificate**: The client validates the server's certificate against trusted Certificate Authorities (CAs)
70
+
4.**Client presents its TLS certificate**: The client sends its own certificate to prove its identity
71
+
5.**Server verifies the client's certificate**: The server validates the client's certificate
72
+
6.**Server grants access**: Once both certificates are verified, the server allows the connection
74
73
7.**Client and server exchange information over encrypted TLS connection**: All data is now transmitted securely
75
74
76
75
---
@@ -85,118 +84,27 @@ To enable mTLS in Cadence server, you need to configure TLS settings and start t
85
84
86
85
Use the `--zone` flag to specify the TLS configuration when starting the Cadence server:
87
86
88
-
```bash
87
+
```shell
89
88
./cadence-server --env development --zone tls start
90
89
```
91
90
92
-
**Command breakdown:**
93
-
-`--env development`: Specifies the environment configuration to use (corresponds to `config/development.yaml`)
94
-
-`--zone tls`: Specifies the zone configuration to use (corresponds to the `tls` zone in `development_tls.yaml`)
95
-
-`start`: Starts all Cadence services
96
-
97
-
The `--zone tls` flag tells the server to load additional configuration from the zone-specific file. In this case, it will look for `config/development_tls.yaml` which contains the TLS-specific settings.
98
-
99
-
#### TLS Configuration File
100
-
101
-
The server uses a YAML configuration file to define TLS settings. Here's an example from [`development_tls.yaml`](https://github.com/cadence-workflow/cadence/blob/master/config/development_tls.yaml):
102
-
103
-
```bash
104
-
services:
105
-
frontend:
106
-
rpc:
107
-
tls:
108
-
enabled: true
109
-
certFile: config/credentials/keytest.crt
110
-
keyFile: config/credentials/keytest
111
-
caFiles:
112
-
- config/credentials/client.crt
113
-
requireClientAuth: true
114
-
115
-
matching:
116
-
rpc:
117
-
tls:
118
-
enabled: true
119
-
certFile: config/credentials/keytest.crt
120
-
keyFile: config/credentials/keytest
121
-
122
-
history:
123
-
rpc:
124
-
tls:
125
-
enabled: true
126
-
certFile: config/credentials/keytest.crt
127
-
keyFile: config/credentials/keytest
128
-
129
-
clusterGroupMetadata:
130
-
clusterGroup:
131
-
cluster0:
132
-
tls:
133
-
enabled: true
134
-
135
-
```
91
+
This will load [config/development.yaml](https://github.com/cadence-workflow/cadence/blob/master/config/development.yaml)\+[config/development\_tls.yaml](https://github.com/cadence-workflow/cadence/blob/master/config/development_tls.yaml). See [CONTRIBUTING.md](https://github.com/cadence-workflow/cadence/blob/master/CONTRIBUTING.md#4-run) for more details.
92
+
136
93
---
137
94
138
95
### Client Implementation
139
96
140
-
To connect a Cadence client with mTLS, you need to configure TLS credentials and pass them to the Cadence client. Here's the essential code from the [helloworld_tls sample](https://github.com/cadence-workflow/cadence-samples/blob/master/new_samples/client_samples/helloworld_tls/hello_world_tls.go):
To connect a Cadence client with mTLS, you need to configure TLS credentials and pass them to the Cadence client. Cadence client will use a gRPC transport object using your TLS settings to communicate with the server.
190
98
191
99
---
192
100
193
101
## Complete Working Example
194
102
195
-
The [helloworld_tls sample](https://github.com/cadence-workflow/cadence-samples/tree/master/new_samples/client_samples/helloworld_tls) provides a complete, tested implementation of mTLS with Cadence, including:
103
+
The [helloworld\_tls sample](https://github.com/cadence-workflow/cadence-samples/tree/master/new_samples/client_samples/helloworld_tls) provides a complete, tested implementation of mTLS with Cadence, including:
196
104
197
-
- Certificate generation scripts
198
-
- Complete client implementation with mTLS
199
-
- Instructions for running with a TLS-enabled server
105
+
- Certificate generation scripts
106
+
- Complete client implementation with mTLS
107
+
- Instructions for running with a TLS-enabled server
200
108
- Step-by-step setup guide
201
109
202
110
For additional server configuration examples, refer to the [Cadence server repository](https://github.com/cadence-workflow/cadence)
@@ -208,7 +116,7 @@ For additional server configuration examples, refer to the [Cadence server repos
208
116
The following table outlines various testing scenarios for mTLS configuration:
209
117
210
118
| Server | Client | Expected | Steps |
211
-
|--------|--------|----------|-------|
119
+
| :----| :----| :----| :----|
212
120
| Unsecured | Unsecured | Success | Server without TLS enabled; Client without TLS certs |
213
121
| Secured | Unsecured | Fail | Server with TLS enabled; Client without TLS certs |
214
122
| Unsecured | Secured | Fail | Server without TLS enabled; Client **with** TLS certs |
0 commit comments