Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

fixed bug in CertificateRegistry#3939

Merged
rawlinp merged 3 commits intoapache:masterfrom
ajschmidt:tr-multi-cert-fix
Oct 17, 2019
Merged

fixed bug in CertificateRegistry#3939
rawlinp merged 3 commits intoapache:masterfrom
ajschmidt:tr-multi-cert-fix

Conversation

@ajschmidt
Copy link
Copy Markdown
Contributor

@ajschmidt ajschmidt commented Sep 27, 2019

What does this PR (Pull Request) do?

This PR adds exception handling and logging where the TR code interfaces with the tomcat-native library to create or modify the SSL Host data structures used by openssl. The exception handling prevents TR from saving host configurations when they do not get successfully written to the native structures in openssl. Therefore TR will continue to try and update them each time it polls for SSL cert changes. This PR also fixes a bug that may have been unregistering the native SSL host configurations with JMX causing them to become eligible for untimely garbage collection.
This PR does not change any functionality of TR and does not affect the documentation. One unit test has been added to demonstrate that failed updates will cause TR to attempt the update again the next time it retrieves SSL certs from TO.

  • This PR is not related to any Issue

Which Traffic Control components are affected by this PR?

  • CDN in a Box
  • Traffic Router

What is the best way to verify this PR?

  1. First start Traffic Router and wait for it to finish initializing.
  2. Go into Traffic Portal and add a new certificate for an existing HTTPS delivery service.
  3. Wait for 5 minutes. There should be a log message in the TR logs indicating that new certificate has been loaded for the delivery service.
  4. Use 'curl' to connect to the delivery service that has the updated certificate and then verify that the new certificate is being used by observing the 'curl' output. The expiration date in the curl output should match the expiration date set on the certificate.

If this is a bug fix, what versions of Traffic Control are affected?

  • master (7989755)
  • 3.0.0
  • 3.0.1 (RC1)

The following criteria are ALL met by this PR

  • This PR includes tests OR I have explained why tests are unnecessary
  • This PR includes documentation OR I have explained why documentation is unnecessary
  • This PR includes an update to CHANGELOG.md OR such an update is not necessary
  • This PR includes any and all required license headers
  • This PR ensures that database migration sequence is correct OR this PR does not include a database migration
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

@asf-ci
Copy link
Copy Markdown
Contributor

asf-ci commented Sep 27, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4341/
Test PASSed.

@mitchell852 mitchell852 added Traffic Router related to Traffic Router bug something isn't working as intended labels Sep 27, 2019
@mitchell852 mitchell852 requested a review from rawlinp September 27, 2019 19:42
@mitchell852 mitchell852 added the WIP "Work-in-Progress" - do not merge! (use 'draft' pull requests from now on) label Oct 2, 2019
SSLContexts fails
Since there was no exception handling for the InvalidArgumentException
which can occur when an SSLHostConfig and its certificates
gets added the CertificateRegistry was recording the certificate as
successful and then never attempting to load it again.

# Conflicts:
#	traffic_router/connector/src/main/java/com/comcast/cdn/traffic_control/traffic_router/protocol/RouterNioEndpoint.java
#	traffic_router/connector/src/main/java/com/comcast/cdn/traffic_control/traffic_router/secure/CertificateRegistry.java
@asf-ci
Copy link
Copy Markdown
Contributor

asf-ci commented Oct 15, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4505/

@rawlinp rawlinp self-assigned this Oct 15, 2019
	..traffic_router/protocol/RouterNioEndpoint.java
	..traffic_router/secure/CertificateRegistryTest.java
@asf-ci
Copy link
Copy Markdown
Contributor

asf-ci commented Oct 15, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4519/

@mitchell852 mitchell852 removed the WIP "Work-in-Progress" - do not merge! (use 'draft' pull requests from now on) label Oct 15, 2019
Copy link
Copy Markdown
Contributor

@rawlinp rawlinp left a comment

Choose a reason for hiding this comment

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

Code changes look good, could use a little reformatting

@asf-ci
Copy link
Copy Markdown
Contributor

asf-ci commented Oct 16, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4548/

@rawlinp rawlinp merged commit ed9f086 into apache:master Oct 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug something isn't working as intended Traffic Router related to Traffic Router

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants