Skip to content

Commit ecced7d

Browse files
committed
Update configs and add documentation on how to run local profile
1 parent d4190f7 commit ecced7d

File tree

5 files changed

+25
-10
lines changed

5 files changed

+25
-10
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ doc
2323
eeprom_*.dat
2424
dummy.img
2525
priv/server/*
26+
priv/client/*
27+
*.key
28+
*.pem

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ log handler:
233233
Add an entry in your local hosts file so the domain www.seawater.local points
234234
to your local development server.
235235

236+
Make sure you have the proper certificates under `prinv/server` and `priv/client`. Refer to the backend private docs on how to generate the certificates.
237+
236238
Start a local development shell:
237239

238240
rebar3 as local shell

config/dev.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[
2-
{grisp_cryptoauth, [
2+
{grisp_keychain, [
33
{tls_server_trusted_certs, {priv, grisp_connect, "server"}}
44
]},
55

config/local.config

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
[
2-
{grisp, [
3-
{emulation, {grisp2, grisp_emulation}}
4-
]},
5-
6-
{grisp_cryptoauth, [
2+
{grisp_keychain, [
73
{tls_server_trusted_certs, {priv, grisp_connect, "server"}},
8-
{tls_client_trusted_certs, {test, grisp_connect, "certs/CA.crt"}},
9-
{client_certs, {test, grisp_connect, "certs/client.crt"}},
10-
{client_key, {test, grisp_connect, "certs/client.key"}}
4+
{client_certs, {priv, grisp_connect, "client/generic_device.pem"}},
5+
{client_key, {priv, grisp_connect, "client/generic_device.key"}}
116
]},
127

138
{grisp_updater, [
@@ -23,7 +18,8 @@
2318
{grisp_connect, [
2419
{domain, "www.seawater.local"},
2520
{port, 8443},
26-
{allowed_ca_chain, "local.peers.CA.pem"}
21+
{board_certificate, "priv/board.pem"},
22+
{allowed_ca_chain, "priv/peers.CA.pem"}
2723
]},
2824

2925
{kernel, [

priv/client/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Development Client certificates
2+
3+
This information is for internal use, ignore this directory if you are not a developer.
4+
5+
## Certificates for `local` profile
6+
7+
Use this directory to copy the development certificate and key generated by the backend to run this app locally on your dev machine.
8+
9+
- generic_device.key
10+
- generic_device.pem
11+
12+
These files are used by `config/local.config`.
13+
14+
rebar3 as local shell

0 commit comments

Comments
 (0)