Bug 1939873

Summary: Unlimited number of characters accepted for base domain name
Product: OpenShift Container Platform Reporter: Jiri Tomasek <jtomasek>
Component: assisted-installerAssignee: vemporop
assisted-installer sub component: assisted-service QA Contact: Yuri Obshansky <yobshans>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: medium CC: alazar, aos-bugs, gharden, mlammon
Version: 4.7   
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: AI-Team-Core
Fixed In Version: OCP-Metal-v1.0.21.1 Doc Type: Bug Fix
Doc Text:
Cause: Length of the user input for base domain was not validated. This, could lead to combinations of a cluster name and base domain that are too long for a valid domain name. Consequence: Not usable domain names for internal DNS records. Fix: Limit length of the combination of a cluster name and base domain so that it forms a valid part of a domain name, with the individual labels no more than 63 bytes long, and enough bytes left for the reserved prefixes (up to 255 bytes in total, including the dots). Example: alertmanager-main-openshift-monitoring.apps.<cluster-name>.<base-domain>. Result: An error message when a combination of cluster name and base domain is too long to form valid DNS domains for internal pre-defined endpoints.
Story Points: ---
Clone Of: 1939703 Environment:
Last Closed: 2021-07-27 22:53:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Tomasek 2021-03-17 09:15:13 UTC
+++ This bug was initially created as a clone of Bug #1939703 +++

Description of problem:
[AI-UI-Wizard] Unlimited number of characters accepted for base domain name

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

How reproducible:
100%

Steps to Reproduce:
1.Configure cluster details
2.Configure base domain with large number of characters
3.

Actual results:
base domain accreted as valid

Expected results:
some error correction for max number of characters 

Additional info:
In this example I used the following base domain name which was accepted:

ocp-edge-cluster-sealusa48.qe.lab.redhat.commmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

Comment 1 Michael Filanov 2021-03-17 15:14:41 UTC
what is the expected limit?

Comment 2 Jiri Tomasek 2021-04-12 10:05:40 UTC
"Domain names (including the names of domains, hosted zones, and records) consist of a series of labels separated by dots. Each label can be up to 63 bytes long. The total length of a domain name cannot exceed 255 bytes, including the dots."

Comment 8 errata-xmlrpc 2021-07-27 22:53:56 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: OpenShift Container Platform 4.8.2 bug fix and 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-2021:2438