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

Check expiration of ovirt-provider-ovn certificate #576

Merged
merged 2 commits into from
Aug 8, 2022

Conversation

mwperina
Copy link
Member

@mwperina mwperina commented Aug 8, 2022

Adds expiration check of ovirt-provider-ovn certificate among regularly
checked certificates such as engine CA, engine or hosts certificates.

Bug-Url: https://bugzilla.redhat.com/2097560
Signed-off-by: Martin Perina mperina@redhat.com

Adds expiration check of ovirt-provider-ovn certificate among regularly
checked certificates such as engine CA, engine or hosts certificates.

Bug-Url: https://bugzilla.redhat.com/2097560
Signed-off-by: Martin Perina <mperina@redhat.com>
Copy link
Member

@almusil almusil left a comment

Choose a reason for hiding this comment

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

Just one question other than that i t looks good.

If engine CA is going to expired, then it doesn't make sense to check
other certificates, because engine CA needs to be renewed first and then
all other certificates should also be renewed.

Signed-off-by: Martin Perina <mperina@redhat.com>
@mwperina mwperina requested a review from didib August 8, 2022 07:29
AuditLogType.ENGINE_CERTIFICATION_HAS_EXPIRED,
AuditLogType.ENGINE_CERTIFICATION_IS_ABOUT_TO_EXPIRE_ALERT,
AuditLogType.ENGINE_CERTIFICATION_IS_ABOUT_TO_EXPIRE,
null);
Copy link
Member

Choose a reason for hiding this comment

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

In case the Engine certificate is already expired, maybe checking the host certificates below will fail. But exceptions look handled here, so the fact that we don't return after this check anymore shouldn't cause a real problem (and it's probably more correct because now we can warn about host certificates when the Engine certificate is going to expire).

Copy link
Member Author

Choose a reason for hiding this comment

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

AFAIR VDSM is not performing client certificate checks, so even if the engine certificate is expired, engine would still be able to connect to hosts. So host certificates check should fail only when host certificate expires or going to expire.

@mwperina
Copy link
Member Author

mwperina commented Aug 8, 2022

/ost

@mwperina mwperina merged commit fbd5851 into oVirt:master Aug 8, 2022
@mwperina mwperina deleted the warn-ovn-cert-expire branch August 8, 2022 09:21
mwperina added a commit to mwperina/ovirt-engine that referenced this pull request Aug 19, 2022
There was added an ovirt-provider-ovn certificate validity check as
a part of oVirt#576 but
unfortunately the path to certificate file was wrong and as this
certificate is optional (it doesn't exists on setup with OVN integration
disable), the certificate validity checker didn't raise any error even
for setups with OVN integration enabled and ovirt-provider-ovn
certificate going to expire soon.

Bug-Url: https://bugzilla.redhat.com/2097560
Signed-off-by: Martin Perina <mperina@redhat.com>
mwperina added a commit that referenced this pull request Aug 19, 2022
There was added an ovirt-provider-ovn certificate validity check as
a part of #576 but
unfortunately the path to certificate file was wrong and as this
certificate is optional (it doesn't exists on setup with OVN integration
disable), the certificate validity checker didn't raise any error even
for setups with OVN integration enabled and ovirt-provider-ovn
certificate going to expire soon.

Bug-Url: https://bugzilla.redhat.com/2097560
Signed-off-by: Martin Perina <mperina@redhat.com>
mwperina added a commit to mwperina/ovirt-engine that referenced this pull request Aug 19, 2022
There was added an ovirt-provider-ovn certificate validity check as
a part of oVirt#576 but
unfortunately the path to certificate file was wrong and as this
certificate is optional (it doesn't exists on setup with OVN integration
disable), the certificate validity checker didn't raise any error even
for setups with OVN integration enabled and ovirt-provider-ovn
certificate going to expire soon.

Bug-Url: https://bugzilla.redhat.com/2097560
Signed-off-by: Martin Perina <mperina@redhat.com>
mwperina added a commit that referenced this pull request Aug 19, 2022
There was added an ovirt-provider-ovn certificate validity check as
a part of #576 but
unfortunately the path to certificate file was wrong and as this
certificate is optional (it doesn't exists on setup with OVN integration
disable), the certificate validity checker didn't raise any error even
for setups with OVN integration enabled and ovirt-provider-ovn
certificate going to expire soon.

Bug-Url: https://bugzilla.redhat.com/2097560
Signed-off-by: Martin Perina <mperina@redhat.com>
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.

None yet

4 participants