Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-13901

Web UI redirects to http even with base-url set to https

    XMLWordPrintable

Details

    • NB
    • 920

    Description

      When you run OpenNMS behind a reverse proxy that terminates the TLS connection you need to configure the

      opennms.web.base-url=https://%x%c/
      

      to set the correct HTTP scheme for the client. When you enter the web UI we see some redirects from Jetty happening to get you from the entrypoint / to /opennms/login.jsp. These redirects are served with HTTP scheme and it seems the base-url setting is ignored even when you enter the web app with HTTPS.

      The same thing happens if you enter the password with the redirects to the index.jsp or in case you enter the wrong credentials with the j_spring_security_check which redirects via HTTP to the login.jsp?login_error=1.

      In case your reverse proxy automatically redirects everything from HTTP to HTTPS the user won't notice. The problem appears if you don't have port 80 for HTTP available. The flow through these parts in the web UI got stuck cause these redirects can't be delivered.

      Here are some screenshots from the network recording which shows this conversation from a browser's perspective:

      Attachments

        1. bleeding-login-error.png
          bleeding-login-error.png
          61 kB
        2. bleeding-login-success.png
          bleeding-login-success.png
          89 kB
        3. bleeding-logout.png
          bleeding-logout.png
          90 kB
        4. NMS-13901-login-error.png
          NMS-13901-login-error.png
          66 kB
        5. NMS-13901-login-success.png
          NMS-13901-login-success.png
          65 kB
        6. NMS-13901-logout.png
          NMS-13901-logout.png
          92 kB
        7. Screenshot 2022-01-13 at 15.41.45.png
          Screenshot 2022-01-13 at 15.41.45.png
          290 kB
        8. Screenshot 2022-01-13 at 15.47.56.png
          Screenshot 2022-01-13 at 15.47.56.png
          108 kB

        Issue Links

          Activity

            People

              yangli Yang Li
              indigo Ronny Trommer
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.