Bug 1936883 - ACM UI is not escaping cluster names
Summary: ACM UI is not escaping cluster names
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Advanced Cluster Management for Kubernetes
Classification: Red Hat
Component: Cluster Lifecycle
Version: rhacm-2.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: rhacm-2.2.3
Assignee: cahl
QA Contact: Derek Ho
Christopher Dawson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-09 12:14 UTC by Tomas Coufal
Modified: 2021-05-04 20:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-04 20:14:55 UTC
Target Upstream Version:
Embargoed:
ming: rhacm-2.2.z+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github open-cluster-management backlog issues 10273 0 None None None 2021-03-10 14:20:22 UTC
Red Hat Product Errata RHSA-2021:1499 0 None None None 2021-05-04 20:15:31 UTC

Description Tomas Coufal 2021-03-09 12:14:11 UTC
Description of problem:
A cluster can't be named "null", "true" or "false", when creating a cluster using ACM UI. The generated YAML doesn't escape cluster names (.metadata.name, .metadata.namespace). 

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


How reproducible:


Steps to Reproduce:
1. Open "Create Cluster" view in ACM
2. Toggle YAML to show the generated manifests
3. Fill in cluster name field with "null", "true", "false"
4. Fill in the rest of the form and hit create (in case of "true" value)

Actual results:
1. Cluster name "null" and "false" results in blank values and ACM erases the field, hence I'm unable to create the cluster.

2. Name "true" results in a wrong data type in .metadata.name and .metadata.namespace fields. ACM doesn't complain and allows user to hit "Create" button. This results in a validation response error with inactive "View details" button:

```
Danger alert:ProjectRequest in version "v1" cannot be handled as a ProjectRequest: v1.ProjectRequest.ObjectMeta: v1.ObjectMeta.Name: ReadString: expects " or n, but found t, error found in #10 byte of ...|:{"name":true}}|..., bigger context ...|o/v1","kind":"ProjectRequest","metadata":{"name":true}}|...
```

Expected results:
Creates the cluster no matter the name, because Kubernetes (RFC 1123) is not restricting from these values.

Additional info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names

Comment 7 errata-xmlrpc 2021-05-04 20:14:55 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: Red Hat Advanced Cluster Management 2.2.3 security and bug fix 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:1499


Note You need to log in before you can comment on or make changes to this bug.