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

[TC-272] Remove ccr and steering certificates from ssl_multicert #552

Closed
wants to merge 4 commits into from
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1460,6 +1460,9 @@ sub ssl_multicert_dot_config {
my $protocol_search = '> 0';
my @ds_list = $self->db->resultset('Deliveryservice')->search( { -and => [ cdn_id => $cdn_obj->id, 'me.protocol' => \$protocol_search ] } )->all();
foreach my $ds (@ds_list) {
if ( $ds->type->name =~ /STEERING/ ) {
next; # Steering delivery service SSLs should not be on the edges.
}
my $ds_id = $ds->id;
my $xml_id = $ds->xml_id;
my $rs_ds = $self->db->resultset('Deliveryservice')->search( { 'me.id' => $ds_id }, { prefetch => ['type'] } );
Expand All @@ -1470,6 +1473,9 @@ sub ssl_multicert_dot_config {

#first one is the one we want
my $hostname = $example_urls[0];
if ( $hostname =~ /ccr/ ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default string for open source builds is 'tr'

next; # Steering delivery service SSLs should not be on the edges.
}
$hostname =~ /(https?:\/\/)(.*)/;
my $new_host = $2;
my $key_name = "$new_host.key";
Expand Down Expand Up @@ -1916,7 +1922,6 @@ sub format_parent_info {
sub parent_dot_config {
my $self = shift;
my $server_obj = shift;

my $data;

my $server_type = $server_obj->type->name;
Expand All @@ -1926,13 +1931,11 @@ sub parent_dot_config {
->search( { 'parameter.name' => 'trafficserver', 'parameter.config_file' => 'package', 'profile.id' => $server_obj->profile->id },
{ prefetch => [ 'profile', 'parameter' ] } )->get_column('parameter.value')->single();
my $ats_major_version = substr( $ats_ver, 0, 1 );

my $parent_info;
my $text = $self->header_comment( $server_obj->host_name );
if ( !defined($data) ) {
$data = $self->ds_data($server_obj);
}

if ( $server_type =~ m/^MID/ ) {
my @unique_origins;
foreach my $ds ( @{ $data->{dslist} } ) {
Expand Down Expand Up @@ -2021,7 +2024,6 @@ sub parent_dot_config {

#$text .= "dest_domain=. go_direct=true\n"; # this is implicit.
#$self->app->log->debug( "MID PARENT.CONFIG:\n" . $text . "\n" );

return $text;
}
else { #"True" Parent - we are genning a EDGE config that points to a parent proxy.
Expand Down Expand Up @@ -2118,7 +2120,6 @@ sub parent_dot_config {
}

$text .= "\n";

return $text;
}
}
Expand Down