Bug 2157921

Summary: during kickstart using liveimg with a self-signed certificate fails with certificate verify failed even when using --noverifyssl
Product: Red Hat Enterprise Linux 9 Reporter: Jan Stodola <jstodola>
Component: anacondaAssignee: Jan Stodola <jstodola>
Status: VERIFIED --- QA Contact: Release Test Team <release-test-team>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.2CC: amepatil, dmarek, jikortus, jkonecny, sdubewar, vslavik
Target Milestone: rcKeywords: Patch, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anaconda-34.25.3.3-1.el9 Doc Type: Bug Fix
Doc Text:
.The `--noverifyssl`option for `liveimg` no longer checks the server’s certificate for images downloaded using HTTPS Previously, the installer ignored the `--noverifyssl` option from the `liveimg` kickstart command. Consequently, if the server's certificate could not be validated for images downloaded using the HTTPS protocol, the installation process failed. With this update, this issue has been fixed, and the `--noverifyssl` option of the `liveimg` kickstart command works as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Stodola 2023-01-03 15:12:34 UTC
This bug was initially created as a copy of Bug #1886985

I am copying this bug because: 
The problem can be reproduced on RHEL-9.2 as well.


Description of problem:
When attempting to kickstart a system using liveimg with a self-signed certificate the system will fail to install even with --noverifyssl. 

Version-Release number of selected component (if applicable):
All RHEL 8 versions. Issue is also present on RHVH which is where this was initially discovered, however RHEL 8 shows the same behavior.

How reproducible:
Always

Steps to Reproduce:
1. Host the ISO on an httpd share using a self-signed certificate. In my example it is on a system with the ip 192.168.122.212
2. Use the following syntax in your kickstart:
liveimg --url=https://192.168.122.212/rhel8-iso/images/install.img --noverifyssl
3. Attempt to kickstart the system

Actual results:
The following error occurred while installing.  This is a fatal error and installation will be aborted.

HTTPSConnectionPool(host='192.168.122.212', port=443): Max retries exceeded with url: /rhel8-iso/images/install.img (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:897)'),))

Expected results:
System is able to install.

Additional info:
The inst.noverifyssl option on grub is working, because I'm hosting the kickstart out of the same webserver using the same ssl certificate, etc. and I'm able to pull the kickstart (only when using inst.noverifyssl). According to the docs --noverifyssl is a valid option for liveimg, so I would expect this to work. 

As mentioned briefly above, the issue was initially seen on a RHVH 4.4 installation, however the same behavior is present on RHEL 8.2, and on RHVH 4.4. v

Logs from installation attempt on RHEL 8 attached.

Comment 3 Jan Stodola 2023-05-19 15:00:02 UTC
PR: https://github.com/rhinstaller/anaconda/pull/4778

Comment 7 Jan Stodola 2023-06-16 11:35:17 UTC
Sagar, could you please review the proposed documentation text? Once it is approved, please use it also for bug 1886985.


Checked that anaconda-34.25.3.3-1.el9 is in nightly compose RHEL-9.3.0-20230616.31

Moving to VERIFIED

Comment 9 Daniel Marek 2023-07-20 09:25:19 UTC
New Test case created, setting qe_test_coverage -> +