Bug 1975370 - Web console does not validate the length of a mapped target namespace in a migration plan
Summary: Web console does not validate the length of a mapped target namespace in a mi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: UI
Version: 1.5.0
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: ---
: 1.5.0
Assignee: Ian
QA Contact: Xin jiang
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-23 14:13 UTC by Sergio
Modified: 2021-07-28 04:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-28 04:08:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github konveyor mig-ui pull 1251 0 None open Bug 1975370: Add validation for target ns length 2021-06-23 16:19:34 UTC
Github konveyor mig-ui pull 1252 0 None open Bug 1975370: Add validation for target ns length (#1251) 2021-06-23 16:40:14 UTC
Red Hat Product Errata RHEA-2021:2929 0 None None None 2021-07-28 04:08:22 UTC

Description Sergio 2021-06-23 14:13:04 UTC
Description of problem:
When using MTC UI to create a migplan with mapped namespaces it is possible to map the source namespace to a destination namespace with more than 63 characters because there is no validation on the destination namespace length.

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

How reproducible:
Always

Steps to Reproduce:
1. Create a migration plan for an empty namespace and map this namespace to a destination namespace with more than 63 character

Actual results:
No error is reported.

Expected results:
The UI should validate that the destination namespace's name has a valid name format. Right now we validate the regexp, but we are not validating the length of the namespace's name.

Additional info:

Comment 5 Sergio 2021-06-25 14:17:54 UTC
Verified using MTC 1.5.0

    openshift-migration-rhel7-operator@sha256:00e77706ca22bcb557d13c16822180fc877e6ea1639a72fda8eb9f5488b039a2
    - name: MIG_CONTROLLER_REPO
      value: openshift-migration-controller-rhel8@sha256
    - name: MIG_CONTROLLER_TAG
      value: 7f657df15e9514df4ef42da3431f558a19b8d3233a2ef1222cd8e27793c93816
    - name: MIG_UI_REPO
      value: openshift-migration-ui-rhel8@sha256
    - name: MIG_UI_TAG
      value: bda1959e1f44170905499b304ce28f9f95ee1841b0dc29f9a9e2790d0dd0bd71

Now we get this error in the UI if we try to map a namespace to a destination namespace with a name longer than 63 characters:

'''
The namespace name should be between 3 and 63 characters long.
'''


Moved to VERIFIED status

Comment 11 errata-xmlrpc 2021-07-28 04:08:13 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 (Migration Toolkit for Containers (MTC) image release advisory 1.5.0), 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/RHEA-2021:2929


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