Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
Signed-off-by: Firas Ghanmi <fghanmi@redhat.com>
  • Loading branch information
fghanmi committed Jul 29, 2024
1 parent ece1d48 commit ede6d28
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/app/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func runServeCmd(cmd *cobra.Command, args []string) { //nolint: revive
opts.PublicKey = string(pemPubKey)
}
var httpClient *http.Client
if tlsCaCertPath := viper.GetString("tls-ca-cert"); tlsCaCertPath != "" {
if tlsCaCertPath := viper.GetString("ct-log.tls-ca-cert"); tlsCaCertPath != "" {
tlsCaCert, err := os.ReadFile(filepath.Clean(tlsCaCertPath))
if err != nil {
log.Logger.Fatal(err)
Expand Down
29 changes: 29 additions & 0 deletions config/tls/ca.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-----BEGIN CERTIFICATE-----
MIIFAzCCAuugAwIBAgIUHVoudGeot0qmjmziA9njcOFXGGMwDQYJKoZIhvcNAQEL
BQAwEDEOMAwGA1UEAwwFTXkgQ0EwIBcNMjQwNzI0MjA0MDQ0WhgPMjEyNDA2MzAy
MDQwNDRaMBAxDjAMBgNVBAMMBU15IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
MIICCgKCAgEAjuXxEhzC0K3w4gRDvldrI3NZSGiMFWWaghIqcjZe2cE6GnR428BG
Mdz30kzJ0XCFcpJzECYMUAS6odwH0ZeNh9YLhTn1Hn/R/pGO1gML5+3NSH76kHMT
mlYcn2qawXqY55iyERiPW/iamBMtTIRXQgKo0/JVThrGCsErwat117XDEE385uqS
06rqK9aWGlvk/9SSqb1LKy1gjRnQtnQWDNwIgAt9Or0AO+thAkYqY/6+fJj5z5XK
35E12PHd+XP9AKGu8Xcu3RUcIq0jOnZT23kycLrdLjaQKvt0sU/5u808qe2+YIe/
ldwJCGr5SZXqKv5/Zv6giM1xNkv+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0eirT90
doBF6QrHi6lOGpLAaWc6eCtSm7HuxkJvfX0vjoefieIrLETSkq/yHzbYvToDGl0F
iOwjfiayctH3YP+GxvOD+Q6kQP20xEG09MYgQtJIKiT0F3x0sDEs
-----END CERTIFICATE-----
31 changes: 31 additions & 0 deletions config/tls/tls.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-----BEGIN CERTIFICATE-----
MIIFRzCCAy+gAwIBAgIUUwaiANUP/pPFrbAsRqRltYFlZzUwDQYJKoZIhvcNAQEL
BQAwEDEOMAwGA1UEAwwFTXkgQ0EwHhcNMjQwNzI0MjA0MTIzWhcNMjQwOTIyMjA0
MTIzWjA7MQ8wDQYDVQQLDAZTZXJ2ZXIxCjAIBgNVBAMMASoxHDAaBgkqhkiG9w0B
CQEWDXRsc0BnbWFpbC5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC
AQCbvz8gzLIYAN8PXk4kPajOVQrYbRV6SzKC0ehGd+iTTe4/Srwl2sSHE0Zlb88R
maVyNtam/JfD8fYMjnHHyh0NyvM0jvUs0UgS0IiOoW9s7IgvJoI9yzWXXg7kX4Yw
ZOrf13FokKQqvKy8YrpEVmmw38TGNfgCwiKnWsrNqS4jICUT/rh6VHGuAVK44Uf4
3rX6dIE/0VuHnfefdRyHvgExs7BZOZdF8/XOFXNIlrRRIjgRldtR1AQahvzUgst7
jMWiu+f+M5XlU5DIImMGpK198HS7rnCAjiHOdMEbpdBEqXeDU1qQu11D4iYIOPzQ
AlEnYzXd0ynSXzRtJ9sLjfZIAGpA72u1ernLNh4k7/OwOeX6seDLYahkaNStxSip
YmHEmReIBeq+u84YZ1K5LwJioLFI0MJdvBu7fnYV5o2Tu03M47n2RRnizX/nWwqD
S4Mha3OPvQg2lwcO/o3zLJQ4Rf0lKeuZllQ6f7FfdjQIJW3PbQk1XTIDc94og+Cy
z/OdRY4TuaHU+GeZCTjKyYieFl2q8vmIZQh7GHayOVNh7ts41I3bYt7QwKzMqBcR
tzi8zjWVpB2fTkMogr4TFDtTUfJosWVnmY3YlQmAMRXqYSbVehrkQM/hi0XxDPn0
hNZlJyg2jdQl4WiCEsCK3bglniLcCL7xL61FI03MB5IBzwIDAQABo24wbDAqBgNV
HREEIzAhggEqghZodHRwczovL2N0X3NlcnZlcjo2OTYyhwQAAAAAMB0GA1UdDgQW
BBTIrMR1pR30/uPPz0VHIIsj1lmCSTAfBgNVHSMEGDAWgBRqvErgqDSsuwRo1Gp6
J7n19me6eTANBgkqhkiG9w0BAQsFAAOCAgEAF6EKMKUC/LegXLFsCxY0c5hzd2Vf
TO0Si3/Y0lJ00zdGHgyTXCxqTXGutHYyEX9QF2+yg2WVQu7NzTpc/7tpa7FroJpo
Wc0ll6rGuhWaLv8EYJ33sHJBU3yyU9mKUQVgdk4PJAsTu5RlkQy7gdjNUOwjPCwI
2U/r01UfIHihbScPE3eIu5cvk39LESJEUmWixoOievUYmdZ/R0hSzwFv2XXo2HBj
+2qSnOq/O2AvltX2c2zVuoRxR9qa6TfznskP6mmXEcxwIUJV86EgnJthVVHQfWUC
V9o9TTfBwhfKtJ7oH6C3t8dZJqjXtXFt/mzI0tZdqEN6Ozlc7zNB72mpW5pNlY3J
1BMGEDdJesyWTG9nKzg8AjW2mbTaHKJBk72/RnRhgoV5yOY/kPcYBf83jyzbuafr
KJBmUewPdf/T3/QSlDMaX+6rKSNNLgKgQwAlOdd+eaWdcZlT2UTJTSGJv3aANBEy
2Ajv2ZzLcw24uAZEIFJKh8jswtkCMScvePlVlhgAY7SZMNvtO9HepQMtpwRD/jkv
e7IRHhB7tEFUiTHmsVc7llIlJRsOewtsLjwacpfKkFWGpZQmyEy+Xxf/FkGQLyQ/
KQJYFJ+uScq6Ae9RatWNTnhC6Ja75estMfL0SatrE1yGyZUTTGWdYohxYbiJYsgd
bW3vUsnPEIFX0Fo=
-----END CERTIFICATE-----
52 changes: 52 additions & 0 deletions config/tls/tls.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@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P6i0dCrE2bOVNsd
e9uMuhkyG/mPqX9db3CrBUy0kbq14Q==
-----END PRIVATE KEY-----
7 changes: 6 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ services:
"--port=5555",
"--grpc-port=5554",
"--ca=ephemeralca",
"--ct-log-url=http://ct_server:6962/test",
"--ct-log-url=https://ct_server:6962/test",
"--ct-log.tls-ca-cert=/config/tls/ca.crt",
# Uncomment this for production logging
# "--log_type=prod",
]
Expand All @@ -38,6 +39,7 @@ services:
volumes:
- ~/.config/gcloud:/root/.config/gcloud/:z # for GCP authentication
- ${FULCIO_CONFIG:-./config/config.jsn}:/etc/fulcio-config/config.json:z
- ./config/tls:/config/tls:z
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5555/healthz"]
interval: 10s
Expand Down Expand Up @@ -79,10 +81,13 @@ services:
image: gcr.io/trillian-opensource-ci/ctfe
volumes:
- ctfeConfig:/etc/config/:ro
- ./config/tls:/config/tls:z
command: [
"--log_config" ,"/etc/config/ct_server.cfg",
"--log_rpc_server", "trillian-log-server:8096",
"--http_endpoint", "0.0.0.0:6962",
"--tls_certificate", "/config/tls/tls.crt",
"--tls_key", "/config/tls/tls.key",
"--alsologtostderr",
]
restart: always # retry while ctfe_init is running
Expand Down

0 comments on commit ede6d28

Please sign in to comment.