Bug 2168258

Summary: saving alternative content source is possible, even if IP instead of fqdn is specified and red warning is present
Product: Red Hat Satellite Reporter: Stefan Nemeth <snemeth>
Component: Alternate Content SourcesAssignee: Ian Ballou <iballou>
Status: CLOSED ERRATA QA Contact: Chris Roberts <chrobert>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.13.0CC: chrobert, iballou, pcreech, zhunting
Target Milestone: 6.13.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-4.7.0.12-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-03 13:25:08 UTC 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:
Attachments:
Description Flags
altcontentsource
none
screenshot showing acs working with ip none

Description Stefan Nemeth 2023-02-08 15:24:15 UTC
Created attachment 1942911 [details]
altcontentsource

Description of problem:

when adding alternative content source, it is possible to save it even, if baseurl path is red, if IP address instead of fqdn is specified in path. Which is fine. However valid IP address should be a option along with fqdn. 

There are deployments without DNS
Also not-having DNS as single point of failure for alternative content source, can be good practice.  

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


How reproducible:

100%

Steps to Reproduce:
1.create new content source
2.as a path https://10.37.195.233./pulp/content/ instead of https://rhui-server.example.com/pulp/content
3.next

Actual results:

Red warning appears, yet it allows to save the content source

Expected results:

Valid IP shows as green as well as valid fqdn. 

Additional info:

If back button is pressed, and than again next, red warning does not appear

Comment 1 Ian Ballou 2023-02-09 21:27:08 UTC
Clarification: the red flag is not due to the IP address, it's due to the extra '/' at the end. We don't validate anything other than that http or https is there and that at the end there us /pulp/content.

The main issue is that we allow the user to continue if the URL is malformed. If this is fixed, the issue around returning to the page to see the red flag is missing will also be fixed.

Comment 2 Ian Ballou 2023-02-09 21:30:26 UTC
Created redmine issue https://projects.theforeman.org/issues/36074 from this bug

Comment 3 Bryan Kearney 2023-02-10 00:03:44 UTC
Upstream bug assigned to iballou

Comment 4 Bryan Kearney 2023-02-15 20:03:41 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36074 has been resolved.

Comment 6 Chris Roberts 2023-03-07 17:09:13 UTC
Created attachment 1948741 [details]
screenshot showing acs working with ip

Comment 7 Chris Roberts 2023-03-07 17:09:56 UTC
Able to use IP instead of fqdn (see screenshot)

Moving to VERIFIED

Comment 10 errata-xmlrpc 2023-05-03 13:25:08 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 (Important: Satellite 6.13 Release), 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-2023:2097