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

Generate the acceptance test CA with SAN #253

Merged
merged 1 commit into from
Apr 4, 2022

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Mar 29, 2022

Modern tooling prefers the subjectAltName extension and the CN on a certificate is considered deprecated. Some tools even complain about this. However, the -addext command is unavailable on EL7 because openssl is too old.

Modern tooling prefers the subjectAltName extension and the CN on a
certificate is considered deprecated. Some tools even complain about
this. However, the -addext command is unavailable on EL7 because openssl
is too old.
@ekohl ekohl force-pushed the generate-with-ssl-san branch from 98dac20 to 0f13703 Compare March 29, 2022 12:15
@@ -45,13 +45,20 @@
$client_cert = "${directory}/client-cert.pem"
$client_key = "${directory}/client-key.pem"

# EL7 lacks openssl -addext
if $facts['os']['release']['major'] == '7' {
$ca_cmd = "openssl req -nodes -x509 -newkey rsa:2048 -subj '/CN=${facts['networking']['fqdn']}' -keyout '${ca_key}' -out '${ca_cert}' -days 365"
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I considered that, but how long do we plan on supporting EL7? It is mostly needed in the pulp-cli work from #252 but IMHO there's it's sufficient to only check stderr on EL8.

Copy link
Member

Choose a reason for hiding this comment

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

#252 passes with this change picked on EL8, so I'm happy enough.

(On the other hand, we could consider limiting the number of ways we generate certs in our CI…)

@evgeni evgeni merged commit bf63aeb into theforeman:master Apr 4, 2022
@ekohl ekohl deleted the generate-with-ssl-san branch April 4, 2022 16:47
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.

4 participants