Uploaded image for project: 'Ansible Automation Platform RFEs'
  1. Ansible Automation Platform RFEs
  2. AAPRFE-1818

Gateway should redirect from http / port 80 to https/ port 443

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Won't Do
    • Icon: Normal Normal
    • 2.5
    • 2.5
    • platform-installer
    • False
    • Hide

      None

      Show
      None
    • False

      Description

      If you  make a request to http://GATEWAY or directly place host/ip in the browser, you get no response. IN the past, other AAP components like controller have listened on port 80 and would redirect clients to port 443.

      Check to see if we need anything to listen in the proxy.yaml template: https://github.com/ansible/aap-gateway/blob/devel/tools/ansible/roles/proxy-config/templates/envoy.yml.j2

      Preferably this would be handled with a redirect from the xds_config but it will require some research on envoy as to exactly where to put this redirection. 

      Existing XDS config is spread out in the models such as https://github.com/ansible/aap-gateway/blob/devel/aap_gateway_api/models/service.py#L59

       

       

      Steps to Reproduce

       curl -k http://GATEWAY
      Actual Behavior

      curl: (7) Failed to connect to GATEWAY port 80 after 26 ms: Couldn't connect to server

      Expected Behavior

      Web server should redirect and still return content
      <!doctype html><html><head><meta charset="utf-8"><title>Ansible Automation Platform</title><meta name="viewport" content="width=device-width,initial-scale=1"><script defer="defer" src="/1e94a378aedea5a953a2.js"></script></head><body></body></html>

      Acceptance Criteria

      Hitting port 80 in a dev environment should redirect to port 443.

      The proxy should handle the redirection without having to hit the back end API.

      This should be configurable through gateway if possible with a setting like "Enable port 80 redirect to 443".

              dysilva Dylan Silva
              elijahd Elijah DeLee
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: