Bug 1988496

Summary: vmconsole-proxy-helper.cer is not renewed when running engine-setup
Product: Red Hat Enterprise Virtualization Manager Reporter: Federico Sun <fsun>
Component: ovirt-engineAssignee: Milan Zamazal <mzamazal>
Status: CLOSED ERRATA QA Contact: Qin Yuan <qiyuan>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.4.6CC: ableisch, ahadas, alolivei, betrayonu, bugs, emarcus, ffutigam, mavital, michal.skrivanek, mzamazal, nsurati, sbonazzo
Target Milestone: ovirt-4.5.0-1Keywords: ZStream
Target Release: 4.5.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.5.0.5 Doc Type: Bug Fix
Doc Text:
Previously, the vmconsole-proxy-helper certificate was not renewed when needed. With this release, the certificate is renewed each time following the CA certificate update.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-26 16:23:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Federico Sun 2021-07-30 16:38:00 UTC
Description of problem:

An expired 'vmconsole-proxy-helper.cer' is not renewed with `engine-setup`.


Version-Release number of selected component (if applicable):

RHV 4.x


How reproducible:

100%


Additional info:

Manual renewal of this certificate with `pki-enroll-pkcs12.sh` requires these 2 extra parameters: "--ku=digitalSignature --eku=1.3.6.1.4.1.2312.13.1.2.1.1"

Comment 1 Yedidyah Bar David 2021-08-04 14:22:40 UTC
A workaround:

# cd /etc/pki/ovirt-engine
# rm ./keys/vmconsole-proxy-helper.p12 ./keys/vmconsole-proxy-helper.key.nopass ./certs/vmconsole-proxy-helper.cer
# engine-setup --offline

I consider not touching/using the renew code but instead do something like [1], but for the helper. I think it should be enough, and due to the need to handle EKU, much simpler.

[1] https://gerrit.ovirt.org/c/ovirt-engine/+/108416

Comment 2 Yedidyah Bar David 2021-08-05 06:58:14 UTC
Milan, can you please have a look and/or take over? Thanks.

Comment 3 Milan Zamazal 2021-08-09 06:29:00 UTC
I'll look at it.

Comment 7 Qin Yuan 2022-04-22 02:55:48 UTC
The current fix only renews vmconsole cert when the engine CA cert is newer than the vmconsole cert.

Moving back to assigned for also renewing vmconsole cert when engine CA cert has longer expiration than vmconsole cert and the vmconsole cert has expired.

Comment 8 Andreas Bleischwitz 2022-04-22 15:01:29 UTC
*** Bug 2077907 has been marked as a duplicate of this bug. ***

Comment 10 Qin Yuan 2022-04-28 14:49:03 UTC
Verified with:
ovirt-engine-4.5.0.5-0.7.el8ev.noarch

Steps:
1. Update engine CA cert to make it newer than vmconsole-proxy-helper.cer, then run `engine-setup --offline` and check if vmconsole-proxy-helper.cer is refreshed.
2. Make vmconsole-proxy-helper.cer expire, but engine CA not expire, such as changing the system date, then run `engine-setup --offline` and check if vmconsole-proxy-helper.cer is refreshed.

Results:
1. vmconsole-proxy-helper.cer is refreshed during engine-setup when the engine CA cert is updated.
2. vmconsole-proxy-helper.cer is refreshed during engine-setup when vmconsole-proxy-helper.cer is expired.

Comment 15 errata-xmlrpc 2022-05-26 16:23:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: RHV Manager (ovirt-engine) [ovirt-4.5.0] security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:4711

Comment 16 meital avital 2022-07-20 09:12:17 UTC
Due to QE capacity, we are not going to cover this issue in our automation

Comment 17 betrayonu 2023-07-17 09:50:47 UTC
running engine-setup should give you the opportunity to update
expired or expiring certificates.
If you don't want to upgrade your system you can run it with the offline option on https://asmallworldcup.com