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

add /etc/ipa to certificates_enddate #2649

Merged
merged 1 commit into from
Jul 8, 2020
Merged

add /etc/ipa to certificates_enddate #2649

merged 1 commit into from
Jul 8, 2020

Conversation

fcami
Copy link
Contributor

@fcami fcami commented Jul 6, 2020

The FreeIPA CA certificate at /etc/ipa/ca.crt expiration date should
be monitored too.

Signed-off-by: François Cami [email protected]

@jenkins-qa-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@fcami
Copy link
Contributor Author

fcami commented Jul 7, 2020

hi @bfahr @csams
Could you please have a look? This is a trivial change.
Companion PR: RedHatInsights/insights-core-assets#418

@@ -181,7 +181,7 @@ def is_ceph_monitor(broker):
ceph_osd_tree = simple_command("/usr/bin/ceph osd tree -f json")
ceph_s = simple_command("/usr/bin/ceph -s -f json")
ceph_v = simple_command("/usr/bin/ceph -v")
certificates_enddate = simple_command("/usr/bin/find /etc/origin/node /etc/origin/master /etc/pki -type f -exec /usr/bin/openssl x509 -noout -enddate -in '{}' \; -exec echo 'FileName= {}' \;")
certificates_enddate = simple_command("/usr/bin/find /etc/origin/node /etc/origin/master /etc/pki /etc/ipa -type f -exec /usr/bin/openssl x509 -noout -enddate -in '{}' \; -exec echo 'FileName= {}' \;")
Copy link
Contributor

Choose a reason for hiding this comment

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

@fcami - please update the simple_file of the spec certificates_enddate in insights_archive.py.

FYI, you could use the "mangle" script of insights core to generate its simple_file:


# mangle "/usr/bin/find /etc/origin/node /etc/origin/master /etc/pki /etc/ipa -type f -exec /usr/bin/openssl x509 -noout -enddate -in '{}' \; -exec echo 'FileName= {}' \;"
insights_commands/find_.etc.origin.node_.etc.origin.master_.etc.pki_.etc.ipa_-type_f_-exec_.usr.bin.openssl_x509_-noout_-enddate_-in_-exec_echo_FileName

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xiangce Thanks for the hint, this is done.

Copy link
Contributor

@xiangce xiangce Jul 8, 2020

Choose a reason for hiding this comment

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

@fcami - oh, sorry just missed one point, since this update will not be applied to the uploader.json in the insights-core-assets immediately. And the insights archives collected from our customer is discrete, which means there must insights-archive collect with the old spec and some with the new. To make sure the spec certificates_enddate working well with both the old simple_file and the newly updated simple file, we'd better use the first_file to make it compatible for the both simple_files,

certificates_enddate = first_file(["insights_commands/find_.etc.origin.node_.etc.origin.master_.etc.pki_.etc.ipa_-type_f_-exec_.usr.bin.openssl_x509_-noout_-enddate_-in_-exec_echo_FileName", "insights_commands/find_.etc.origin.node_.etc.origin.master_.etc.pki_-type_f_-exec_.usr.bin.openssl_x509_-noout_-enddate_-in_-exec_echo_FileName"])

Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, I had not thought of that, thanks! This should be fixed.

@fcami
Copy link
Contributor Author

fcami commented Jul 8, 2020

hi @xiangce thanks for the review, I've updated insights_archive.py too.

@xiangce
Copy link
Contributor

xiangce commented Jul 8, 2020

@fcami - Thanks for your quick update, it looks good to me.

The FreeIPA CA certificate at /etc/ipa/ca.crt expiration date should
be monitored too.

Signed-off-by: François Cami <[email protected]>
@xiangce xiangce merged commit 3f11d46 into RedHatInsights:master Jul 8, 2020
xiangce pushed a commit that referenced this pull request Jul 8, 2020
The FreeIPA CA certificate at /etc/ipa/ca.crt expiration date should
be monitored too.

Signed-off-by: François Cami <[email protected]>
(cherry picked from commit 3f11d46)
xiangce pushed a commit that referenced this pull request Sep 6, 2024
The FreeIPA CA certificate at /etc/ipa/ca.crt expiration date should
be monitored too.

Signed-off-by: François Cami <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants