Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-37365

Hostname prefix(discovery_prefix) setting accepts invalid inputs

XMLWordPrintable

    • Bug Fix
    • Hide
      .Satellite validates the Hostname prefix Discovery setting

      Before this update, the Hostname prefix (`discovery_prefix`) input in Satellite settings was insufficiently validated and allowed non-conforming characters.
      As a consequence, invalid hostnames could cause unexpected system behavior.
      With this release, Satellite enforces the following format for the Hostname prefix:

      * The prefix must start with a letter.
      * Allowed characters are `a-z`, `A-Z`, `0-9` and `-`(hyphen).
      * Maximum length is 62 characters.

      As a result, discovered hosts have proper hostnames.
      Show
      .Satellite validates the Hostname prefix Discovery setting Before this update, the Hostname prefix (`discovery_prefix`) input in Satellite settings was insufficiently validated and allowed non-conforming characters. As a consequence, invalid hostnames could cause unexpected system behavior. With this release, Satellite enforces the following format for the Hostname prefix: * The prefix must start with a letter. * Allowed characters are `a-z`, `A-Z`, `0-9` and `-`(hyphen). * Maximum length is 62 characters. As a result, discovered hosts have proper hostnames.
    • Done
    • Automated

      Description of problem:

      The Hostname prefix (discovery_prefix) setting in Satellite allows invalid characters to be saved, leading to unexpected behavior in host naming. The system accepts inputs that do not align with the settings description which says must start with a letter and do not conform to standard hostname conventions, such as -mac, ^%$, and 12_t.

      How reproducible:

      Always

      Is this issue a regression from an earlier version:

       

      Steps to Reproduce:

      1. log in to satellite

      2. go to administer > settings

      3. select discovery section

      4. Update Hostname prefix(discovery_prefix) setting with invalid input like -mac,  ^%$, 12_t etc.

      Actual behavior:
      Hostname prefix(discovery_prefix) setting successfully gets updated with invalid input

      Expected behavior:
      Hostname prefix(discovery_prefix) setting should not be updated with invalid input, rather it should railse a validation message like

      ```Error updating setting: Value must start with a letter```.

      ]

      Business Impact / Additional info:

      Customers by mistake can update the setting with invalid data which is not ideal and can cause issues.

          There are no Sub-Tasks for this issue.

              rh-ee-ajangir Arvind Jangir
              rh-ee-ajangir Arvind Jangir
              Nakul Pathak Nakul Pathak
              Lena Ansorgová (zuansorg) Lena Ansorgová (zuansorg)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: