forked from cloudfoundry/pcap-release
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Reimplement TLS configuration in coding and in jobs config (c…
…loudfoundry#79) * wip: refactor: tls configuration * refactor: adapt tls spec config * refactor: Adapt integration tests to run with new TLS structs * refactor: Use client_cas instead of ca * refactor: Adapt acceptance tests to have a correct CN for bosh director cert --------- Co-authored-by: Maximilian Moehl <[email protected]> Co-authored-by: Dominik Froehlich <[email protected]>
- Loading branch information
1 parent
bd75214
commit 45d7cdd
Showing
38 changed files
with
343 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<%- if_p("pcap-agent.listen.tls.ca") do |client_ca| -%> | ||
<%- if_p("pcap-agent.listen.tls.client_cas") do |client_ca| -%> | ||
<%= client_ca -%> | ||
<%- end -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<% | ||
if_p("pcap-api.agents_mtls.ca") do |pem| | ||
%> | ||
<%- if p("pcap-api.agents_mtls.enabled").to_s == "true" | ||
if !p("pcap-api.agents_mtls.ca", nil) | ||
raise "Conflicting configuration: pcap-api.agents_mtls.enabled is true, you must provide a valid client CAs" | ||
end | ||
end | ||
-%> | ||
<%- if_p("pcap-api.agents_mtls.ca") do |pem| -%> | ||
<%= pem %> | ||
<% | ||
end | ||
%> | ||
<%- end -%> |
14 changes: 8 additions & 6 deletions
14
jobs/pcap-api/templates/agents_mtls/pcap-api-client.crt.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<% | ||
if_p("pcap-api.agents_mtls.certificate") do |pem| | ||
%> | ||
<%- if p("pcap-api.agents_mtls.enabled").to_s == "true" | ||
if !p("pcap-api.agents_mtls.certificate", nil) | ||
raise "Conflicting configuration: pcap-api.agents_mtls.enabled is true, you must provide a valid certificate" | ||
end | ||
end | ||
-%> | ||
<%- if_p("pcap-api.agents_mtls.certificate") do |pem| -%> | ||
<%= pem %> | ||
<% | ||
end | ||
%> | ||
<%- end -%> |
14 changes: 8 additions & 6 deletions
14
jobs/pcap-api/templates/agents_mtls/pcap-api-client.key.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<% | ||
if_p("pcap-api.agents_mtls.private_key") do |pem| | ||
%> | ||
<%- if p("pcap-api.agents_mtls.enabled").to_s == "true" | ||
if !p("pcap-api.agents_mtls.private_key", nil) | ||
raise "Conflicting configuration: pcap-api.agents_mtls.enabled is true, you must provide a valid private key" | ||
end | ||
end | ||
-%> | ||
<%- if_p("pcap-api.agents_mtls.private_key") do |pem| -%> | ||
<%= pem %> | ||
<% | ||
end | ||
%> | ||
<%- end -%> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<%- if p("pcap-api.bosh.tls.enabled").to_s == "true" | ||
if !p("pcap-api.bosh.tls.ca", nil) | ||
raise "Conflicting configuration: pcap-api.bosh.tls.enabled, you must provide a valid Bosh CAs" | ||
end | ||
end | ||
-%> | ||
<% | ||
if_p("pcap-api.bosh.tls.ca") do |pem| | ||
%> | ||
<%= pem %> | ||
<% | ||
end | ||
%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
<%- if p("pcap-api.listen.tls.enabled").to_s == "true" | ||
if !p("pcap-api.listen.tls.client_cas", nil) | ||
raise "Conflicting configuration: pcap-api.listen.tls.enabled is true, you must provide a valid client CA" | ||
end | ||
end | ||
-%> | ||
<%- if_p("pcap-api.listen.tls.ca") do |pem| -%> | ||
<%= pem %> | ||
<%- end -%> | ||
<%- end -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
<%- if p("pcap-api.listen.tls.enabled").to_s == "true" | ||
if !p("pcap-api.listen.tls.certificate", nil) | ||
raise "Conflicting configuration: pcap-api.listen.tls.enabled is true, you must provide a valid certificate" | ||
end | ||
end | ||
-%> | ||
<%- if_p("pcap-api.listen.tls.certificate") do |pem| -%> | ||
<%= pem %> | ||
<%- end -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
<%- if p("pcap-api.listen.tls.enabled").to_s == "true" | ||
if !p("pcap-api.listen.tls.private_key", nil) | ||
raise "Conflicting configuration: pcap-api.listen.tls.enabled is true, you must provide a valid private key" | ||
end | ||
end | ||
-%> | ||
<%- if_p("pcap-api.listen.tls.private_key") do |pem| -%> | ||
<%= pem %> | ||
<%- end -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.