File size: 1,497 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Generating Certs to Secure gRPC

GoAlert can use x509 certificates to serve as authorization for sysapi access.

## Using GoAlert's Built-In Tools

The GoAlert binary has built-in sub-commands to simplify generating required certifications for secure gRPC communication.
It is broken into three steps:

1. Generate CA files for creating & verifying future certificates
2. Generate 1 or more server certificates to give to GoAlert
3. Generate 1 or more client certificates to give to plugins

If setting up GoAlert for the first time, you can generate all files at once with `goalert gen-cert all`.

### 1. Generating CA Files

Run `goalert gen-cert ca` to generate the CA files:

- `system.ca.pem`
- `system.ca.key`
- `plugin.ca.pem`
- `plugin.ca.key`

Keep these files secure (esp. the `.key` files), as they are only used to generate the deployment cert files.

### 2. Generating the Server Certificates

Run `goalert gen-cert server` to generate the server files:

- `goalert-server.ca.pem` (gets passed to `--sysapi-ca-file`)
- `goalert-server.pem` (gets passed to `--sysapi-cert-file`)
- `goalert-server.key` (gets passed to `--sysapi-key-file`)

These files should be deployed/provided to GoAlert itself.

### 3. Generating the Plugin Certificates

Run `goalert gen-cert client` to generate the client files:

- `goalert-client.ca.pem`
- `goalert-client.pem`
- `goalert-client.key`

These files should be deployed/provided to the plugin/services that need access to the GoAlert SystemAPI.