Skip to content

Commit 1a8f7cd

Browse files
committed
add hammer instrucitons to dump log
1 parent 2e5bc98 commit 1a8f7cd

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

deployment/live/gcp/test/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,40 @@ Clone the [certificate-transparenct-go](https://github.com/google/certificate-tr
8181
go run ./trillian/integration/ct_hammer/ --ct_http_servers=localhost:6962/${TESSERA_BASE_NAME} --max_retry=2m --invalid_chance=0 --get_sth=0 --get_sth_consistency=0 --get_proof_by_hash=0 --get_entries=0 --get_roots=0 --get_entry_and_proof=0 --max_parallel_chains=4 --skip_https_verify=true --operations=10000 --rate_limit=150 --log_config=${SCTFE_REPO}/testdata/hammer.cfg --testdata_dir=./trillian/testdata/
8282
```
8383

84+
### With real HTTPS certificates
85+
We'll run a SCTFE and copy certificates from an existing RFC6962 log to it.
86+
It uses the [ct_hammer tool from certificate-transparency-go](https://github.com/google/certificate-transparency-go/tree/aceb1d4481907b00c087020a3930c7bd691a0110/trillian/integration/ct_hammer).
87+
88+
First, set a few environment variables:
89+
90+
```bash
91+
export SCTFE_REPO=$(pwd)
92+
export SRC_LOG_URI=https://ct.googleapis.com/logs/xenon2022
93+
```
94+
95+
Then, get fetch the roots the source logs accepts, and edit configs accordingly.
96+
To do so, clone the [certificate-transparenct-go](https://github.com/google/certificate-transparency-go) repo, and from there run:
97+
98+
```bash
99+
export CTGO_REPO=$(pwd)
100+
mkdir -p /tmp/hammercfg
101+
cp ${SCTFE_REPO}/testdata/hammer.cfg /tmp/hammercfg
102+
go run ./client/ctclient get-roots --log_uri=${SRC_LOG_URI} --text=false > /tmp/hammercfg/roots.pem
103+
sed -i 's-""-"/tmp/hammercfg/roots.pem-g"' /tmp/hammercfg/hammer.cfg
104+
```
105+
106+
107+
Run the SCTFE with the same roots:
108+
109+
```bash
110+
cd ${STCFE_REPO}
111+
go run ./cmd/gcp/ --project_id=${GOOGLE_PROJECT} --bucket=${GOOGLE_PROJECT}-${TESSERA_BASE_NAME}-bucket --spanner_db_path=projects/${GOOGLE_PROJECT}/instances/${TESSERA_BASE_NAME}/databases/${TESSERA_BASE_NAME}-db --private_key=./testdata/ct-http-server.privkey.pem --password=dirk --roots_pem_file=/tmp/hammercfg/roots.pem --origin=${TESSERA_BASE_NAME} --spanner_dedup_db_path=projects/${GOOGLE_PROJECT}/instances/${TESSERA_BASE_NAME}/databases/${TESSERA_BASE_NAME}-dedup-db -v=3
112+
```
113+
114+
Run `ct_hammer`:
115+
116+
```bash
117+
cd ${CTGO_REPO}
118+
go run ./trillian/integration/ct_hammer/ --ct_http_servers=localhost:6962/${TESSERA_BASE_NAME} --max_retry=2m --invalid_chance=0 --get_sth=0 --get_sth_consistency=0 --get_proof_by_hash=0 --get_entries=0 --get_roots=0 --get_entry_and_proof=0 --max_parallel_chains=4 --skip_https_verify=true --operations=10000 --rate_limit=150 --log_config=/tmp/hammercfg/hammer.cfg --src_log_uri=${SRC_LOG_URI}
119+
```
120+

0 commit comments

Comments
 (0)