Conversation
8a2d888 to
81bb595
Compare
|
Now that google/trillian#607 is in, we can unblock this. @cesarghali Could you review? |
d29a2be to
2cef673
Compare
Update: All issues below were adressed in gdbelvin#1, gdbelvin#2, and google/trillian#660
Error message
|
|
Updated README.md to include versions and mention docker-compose. |
README.md
Outdated
| Set the `LOG_ID` and `MAP_ID` environment variables in `docker-compose.yml` with the output | ||
| of these respective commands. | ||
|
|
||
| 7. Relaunch and observe |
There was a problem hiding this comment.
Why do we need to launch twice? Shouldn't we do the provisioning and editing the yml file before launching?
Also, this item should be number 8.
There was a problem hiding this comment.
Updated to just launch the trillian components in this step:
docker-compose up trillian-map
| 7. Relaunch and observe | ||
| - `docker-compose up -d` | ||
| - `docker-compose logs --tail=0 --follow` | ||
| - [https://localhost:8080/v1/users/foo@bar.com](https://localhost:8080/v1/users/foo@bar.com) |
There was a problem hiding this comment.
Does this actually work? It might for now but I thought we want to have all API calls authenticated and if we do that this might stop working.
There was a problem hiding this comment.
The open source repo only has an unauthenticated GET.
Different providers can choose to do different things in their environments.
README.md
Outdated
|
|
||
| 7. Provision a log and a map | ||
| ```sh | ||
| go run $GOPATH/src/github.com/google/trillian/cmd/createtree/main.go --admin_server=localhost:8090 --pem_key_path=testdata/log-rpc-server.privkey.pem --pem_key_password="towel" --signature_algorithm=ECDSA --tree_type=LOG |
There was a problem hiding this comment.
Where can log-rpc-server.privkey.pem be found? If a user try to run this command will it work? If not we should add a step for creating this private key.
There was a problem hiding this comment.
It worked for me (I had to change from localhost to the IP assigned to the container by the docker engine).
| ENV DB_USER=test \ | ||
| DB_PASSWORD=zaphod \ | ||
| DB_DATABASE=test \ | ||
| DB_HOST=127.0.0.0:3306 |
There was a problem hiding this comment.
Does this mean the user should install mysql and set the password to zaphod and create a test database? If yes, can we add a step for that, maybe in the readme?
There was a problem hiding this comment.
The mysql db image uses the following environment variables to setup and configure the database on initial startup.
environment:
MYSQL_PASSWORD: zaphod
MYSQL_USER: test
MYSQL_DATABASE: test
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
README.md
Outdated
| ``` | ||
|
|
||
| Set the `LOG_ID` and `MAP_ID` environment variables in `docker-compose.yml` with the output | ||
| of these respective commands. |
docker-compose.yml
Outdated
| ports: | ||
| - "8080:8080" # json & grpc | ||
| environment: | ||
| LOG_ID: 8879615737060686335 |
There was a problem hiding this comment.
Can you please add a comment that LOG_ID and MAP_ID values should be updated, here and below?
README.md
Outdated
|
|
||
| ```sh | ||
| goreman start | ||
| docker-compose up trillian-map -d |
There was a problem hiding this comment.
docker-compose up trillian-map -d fails with ERROR: No such service: -d has to be docker-compose up -d trillian-map instead.
| MAP_URL="" | ||
| ENV LOG_ID=0 \ | ||
| LOG_URL=localhost:8090 \ | ||
| LOG_KEY=genfiles/trillian-log-pubkey.pem |
There was a problem hiding this comment.
Which of the generated keys is this one? Shouldn't this be genfiles/p256-pubkey.pem?
There was a problem hiding this comment.
This key actually comes from the Trillian repo :-
It corresponds to the private key the the Trillian Log uses.
There was a problem hiding this comment.
OK, I'll change the default to ../trillian/testdata/log-rpc-server.pubkey.pem.
| ```sh | ||
| go run $GOPATH/src/github.com/google/trillian/cmd/createtree/main.go --admin_server=localhost:8090 --pem_key_path=testdata/log-rpc-server.privkey.pem --pem_key_password="towel" --signature_algorithm=ECDSA --tree_type=LOG | ||
| go run $GOPATH/src/github.com/google/trillian/cmd/createtree/main.go --admin_server=localhost:8090 --pem_key_path=testdata/log-rpc-server.privkey.pem --pem_key_password="towel" --signature_algorithm=ECDSA --tree_type=MAP | ||
| ``` |
There was a problem hiding this comment.
Shouldn't this key rather be testdata/map-rpc-server.privkey.pem instead (of log-)?
|
|
||
| ENTRYPOINT /go/bin/keytransparency-signer \ | ||
| --db="${DB_USER}:${DB_PASSWORD}@tcp(${DB_HOST})/${DB_DATABASE}" \ | ||
| --period="$SIGN_PERIOD" --key="$SIGN_KEY" \ |
There was a problem hiding this comment.
The private signing key --key="$SIGN_KEY" is treated as path to a file flag here and yet the passed string is interpreted to contain the PEM bytes here. Looks like this fails (but independent from this docker pull).
There was a problem hiding this comment.
After chatting with @RJPercival (thanks again), I've decided that it's reasonable to add an additional flag for the password of the private-key/PEM-file with an option for a config-file (with the PW contained) like implemented for trillian in google/trillian/pull/620
cesarghali
left a comment
There was a problem hiding this comment.
LGTM.
Given the fact I haven't ran a docker image before, I'm thinking of waiting until this PR becomes stable and try to follow the README instructions as someone with no knowledge of this.
- catch-up with google#654 (where the flag was removed) - needed for google/keytransparency#578
- catch-up with #654 (where the flag was removed) - needed for google/keytransparency#578
Codecov Report
@@ Coverage Diff @@
## master #578 +/- ##
=======================================
Coverage 59.87% 59.87%
=======================================
Files 34 34
Lines 2318 2318
=======================================
Hits 1388 1388
Misses 643 643
Partials 287 287Continue to review full report at Codecov.
|
- Add logging and don't crash signer - Update README
This is a first cut at defining the proper docker swarm that implements Key Transparency correctly.
The complexity of the initial configuration has exceeded what Goreman can support.
Missing from this PR: