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

OSSM-755: Fix TLS certificates used in security tests #657

Merged
merged 1 commit into from Oct 21, 2022

Conversation

jewertow
Copy link
Member

@jewertow jewertow commented Oct 19, 2022

I figured out that certificates used in security.egress.tls.* and security.peer.file-mounted-certs tests don't pass verification when OpenSSL 1.1.1k and higher is used. For example, those certificates pass verification on Ubuntu 20.04 which delivers OpenSSL 1.1.1f 31 Mar 2020, but do not pass on CentOS Stream 8 or RHEL 8 which deliver OpenSSL 1.1.1k FIPS 25 Mar 2021.
I noticed that root-cert.pem and cert-chain.pem have specified the same common name, so as a workaround I added SAN as a prefix to CN in the cert-chain.pem. Without this change, a TLS handshake fail with an alert message "UNKNOWN CA (48)".

@jewertow jewertow changed the title [WIP] OSSM-755: Fix SSL cert used to test feature security.egress.tls OSSM-755: Fix TLS certificates used in tests for feature security.egress.tls Oct 19, 2022
@jwendell
Copy link
Member

Good catch!

@jewertow
Copy link
Member Author

jewertow commented Oct 20, 2022

I regenerated all certificates for the sake of consistency, because all of them use the same root-cert.pem.

@jewertow jewertow changed the title OSSM-755: Fix TLS certificates used in tests for feature security.egress.tls OSSM-755: Fix TLS certificates used in security tests Oct 20, 2022
@maistra maistra deleted a comment from maistra-bot Oct 20, 2022
@maistra maistra deleted a comment from maistra-bot Oct 20, 2022
@jwendell
Copy link
Member

Does it make sens to submit this upstream as well, so that we reduce our differences on next rebase?

I'd say it's useful as it fixes an issue when running in a different environment (newer openssl) and doesn't break any existent behavior.

Integration tests for features "security.egress.tls.*" and
"security.peer.file-mounted-certs" were failing, because of
failing TLS handshake with an alert message "UNKNOWN CA (48)".

The reason of this failure is that certificates used in those tests
don't pass verification when OpenSSL 1.1.1k or higher is used.
Those certificates pass verification on Ubuntu 20.04 which delivers
OpenSSL 1.1.1f  31 Mar 2020, but do not pass on CentOS Stream 8
or RHEL 8.6 which deliver OpenSSL 1.1.1k  FIPS 25 Mar 2021.

I noticed that root-cert.pem and cert-chain.pem had specified
the same common name, so as a workaround I added SAN as a prefix
to the common name in the cert-chain.pem.

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
@jewertow
Copy link
Member Author

Yes, I submitted a PR.

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.

None yet

4 participants