Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-23334

Provider URL validator incorrect when setting up SSO via Ambari CLI

    XMLWordPrintableJSON

Details

    Description

      When setting the URL for the SSO provider while runningĀ ambari-server setup-sso, valid URLs are rejected.

      [root@c7402 ~]# ambari-server setup-sso
      Using python  /usr/bin/python
      Setting up SSO authentication properties...
      Do you want to configure SSO authentication [y/n] (y)?y
      Provider URL [URL] (http://example.com):https://c7402.ambari.apache.org:8443/gateway/knoxsso/api/v1/websso
      Invalid provider URL
      Provider URL [URL] (http://example.com):c7402.ambari.apache.org:8443
      Public Certificate pem (empty) (empty line to finish input):
      

      Cause:
      The RegEx validating the URL is only allowing hostname and port values, when it should allow for absolute URLs.

      ambari_server/setupSso.py:72
      provider_url = get_validated_string_input("Provider URL [URL] ({0}):".format(provider_url), provider_url, REGEX_HOSTNAME_PORT,
                                                      "Invalid provider URL", False)

      Attachments

        Issue Links

          Activity

            People

              smolnar Sandor Molnar
              smolnar Sandor Molnar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 20m
                  3h 20m