Skip to content

Commit f84dbb4

Browse files
committed
Add info about development
1 parent 82497db commit f84dbb4

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ Arduino Create exposes a set of rest api hosted on a variable port on localhost
1818

1919
It also allows to open a websocket connection to a board connected through the serial port.
2020

21-
22-
2321
## Security
2422
A web server running on localhost makes a lot of people nervous. That's why we thought hard about security:
2523

@@ -28,6 +26,9 @@ A web server running on localhost makes a lot of people nervous. That's why we t
2826
- Every url that needs to be downloaded, or command that needs to be ran has to be signed by a trusted party. You can control who is trusted through the `trusted` folder: see [Configure](#configure)
2927
- Commands are whitelisted, so even a trusted party can't execute a malicious command. You can control which commands are whitelisted through the `whitelist` field of the configuration file: see [Configure](#configure)
3028

29+
## SSL Certificates
30+
The agent creates is available in https thanks to a certificate created by a self-signed certification authority. This doesn't improve directly security, but allows the Agent to be contacted by website running in https.
31+
3132
# Configure
3233
## config.ini
3334
Arduino Create Agent uses `.ini` files to read its options. In your install folder you'll find a configuration files that's already tuned for everyday use with create:
@@ -41,4 +42,27 @@ whitelist: avrdude,bossac
4142
- whitelist is the list of commands they are allowed to perform on your machine
4243

4344
## trusted folder
44-
The trusted folder contains the public keys of the trusted origins. So if you have `https://create.arduino.cc` you should have its public key on the trusted folder.
45+
The trusted folder contains the public keys of the trusted origins. So if you have `https://create.arduino.cc` you should have its public key on the trusted folder.
46+
47+
# Development
48+
You need to clone this repository in your workspace according to [Go Specifications](https://golang.org/doc/code.html#Workspaces)
49+
50+
Then note that the main binary is in `cli/agent/main.go`. That's because the whole agent is packaged as a library, and so can be extended and reused.
51+
52+
Before compiling and running the agent you need to:
53+
54+
- Install go: https://golang.org/
55+
- Generate the certificates:
56+
57+
$ go run cli/certificates/main.go
58+
59+
Finally you can run the Agent:
60+
61+
$ go run cli/agent/main.go
62+
63+
## Tips
64+
- Arduino Create Agent uses Goa, so if you want to contribute you'll better get familiar with it: https://goa.design/
65+
66+
- Use gofmt and gometalinter to produce good code
67+
68+
- Vendor dependencies with dep: https://golang.github.io/dep/ . Yes, they need to be committed in the repository. Our continuous integration tools depend on it.

0 commit comments

Comments
 (0)