Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move certificates handling into the server. #19

Merged
merged 1 commit into from
Sep 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions conf/nomad/presto.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,21 @@ EOF
perms = 666
change_mode = "noop"
}

template {
data = <<EOF
{{- with caLeaf "%{ if node_type == "coordinator" }${service_name}%{ else }${service_name}-worker%{ endif }" }}
{{- .PrivateKeyPEM }}
{{- .CertPEM }}{{ end }}
EOF
destination = "local/presto.pem"
}

template {
data = "{{- range caRoots }}{{ .RootCertPEM }}{{ end }}"
destination = "local/roots.pem"
}

template {
data = <<EOF
#!/bin/bash
Expand Down Expand Up @@ -322,14 +337,14 @@ http-server.authentication.allow-insecure-over-http=true
http-server.process-forwarded=true
http-server.https.enabled=true
http-server.https.port={{ env "NOMAD_PORT_connect" }}
http-server.https.keystore.path=/alloc/presto.jks
http-server.https.keystore.key=changeit
http-server.https.keystore.path=/local/presto.pem
http-server.https.truststore.path=/local/roots.pem

# This is the same jks, but it will not do the consul connect authorization in intra cluster communication
internal-communication.https.required=true
internal-communication.shared-secret=${cluster_shared_secret}
internal-communication.https.keystore.path=/alloc/presto.jks
internal-communication.https.keystore.key=changeit
internal-communication.https.keystore.path=/local/presto.pem
internal-communication.https.truststore.path=/local/roots.pem

query.client.timeout=5m
query.min-expire-age=30m
Expand Down