Skip to content

Fix expired tls certs for cpp tests - #9607

Merged
merlimat merged 7 commits into
apache:masterfrom
sijie:fix_ci
Feb 17, 2021
Merged

Fix expired tls certs for cpp tests#9607
merlimat merged 7 commits into
apache:masterfrom
sijie:fix_ci

Conversation

@sijie

@sijie sijie commented Feb 17, 2021

Copy link
Copy Markdown
Member

Problem

The current master is broken due to an expired CA cert is used in CPP tests.

Modification

Use the certs we used for integration tests to keep it consistent across the rep.

Issuer: C=US, ST=CA, O=Apache, OU=Pulsar Incubator, CN=localhost
Validity
Not Before: Feb 17 01:37:33 2018 GMT
Not After : Feb 16 01:37:33 2021 GMT

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not familiar with TLS certificate but just have a question. The original Certificate - Data - Validity block has the Not After field that might lead to the broken CI. After this change, should we also keep the header-like block to record the Not After time?

I think the root cause is #1244 that intended to create certs which will expire after year 2030. However, the cacert.pem still expired after 2021-02-16.

@lhotari

lhotari commented Feb 17, 2021

Copy link
Copy Markdown
Member

btw. Some of the previous test keys/certificates weren't TLS 1.3 compatible. I assume that this problem gets also fixed?
TLS 1.3 dropped support for SHA-1 signature hashes and DSA keys and will reject those. The rejection error message might be about invalid certificate.

@jiazhai

jiazhai commented Feb 17, 2021

Copy link
Copy Markdown
Member

/pulsarbot run-failure-checks

@eolivelli

Copy link
Copy Markdown
Contributor

/pulsarbot run-failure-checks

@eolivelli eolivelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good

@eolivelli

Copy link
Copy Markdown
Contributor

/pulsarbot run-failure-checks

@merlimat

Copy link
Copy Markdown
Contributor

@sijie There are still test failing because clients are validating the "hostname" with the CN of the certificate. The tests expect the certificates to be issued with CN localhost.

@merlimat

Copy link
Copy Markdown
Contributor

I've regenerated the certs with "localhost" for broker CN

@sijie

sijie commented Feb 17, 2021

Copy link
Copy Markdown
Member Author

@merlimat thank you!

@merlimat
merlimat merged commit 2e08766 into apache:master Feb 17, 2021
@sijie
sijie deleted the fix_ci branch February 18, 2021 01:25
merlimat added a commit to merlimat/pulsar that referenced this pull request Apr 6, 2021
* Fix expired tls certs for cpp tests

* Added "admin" role as super user

* Fixed common name in certs

* Added admin name in one more place

* One more place missing "admin"

* Fixed PulsarFunctionLocalRunTest

* More fixes

Co-authored-by: Matteo Merli <mmerli@apache.org>
lhotari pushed a commit to datastax/pulsar that referenced this pull request May 14, 2021
* Fix expired tls certs for cpp tests

* Added "admin" role as super user

* Fixed common name in certs

* Added admin name in one more place

* One more place missing "admin"

* Fixed PulsarFunctionLocalRunTest

* More fixes

Co-authored-by: Matteo Merli <mmerli@apache.org>
ivankelly pushed a commit to ivankelly/pulsar that referenced this pull request Aug 10, 2021
* Fix expired tls certs for cpp tests

* Added "admin" role as super user

* Fixed common name in certs

* Added admin name in one more place

* One more place missing "admin"

* Fixed PulsarFunctionLocalRunTest

* More fixes

Co-authored-by: Matteo Merli <mmerli@apache.org>
codelipenghui pushed a commit that referenced this pull request Dec 12, 2021
* Fix expired tls certs for cpp tests

* Added "admin" role as super user

* Fixed common name in certs

* Added admin name in one more place

* One more place missing "admin"

* Fixed PulsarFunctionLocalRunTest

* More fixes

Co-authored-by: Matteo Merli <mmerli@apache.org>
(cherry picked from commit 2e08766)
@codelipenghui codelipenghui added the cherry-picked/branch-2.7 Archived: 2.7 is end of life label Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants