<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 08/05/2016 04:54 PM, Adam Young
      wrote:<br>
    </div>
    <blockquote
      cite="mid:25ae12e1-a367-2884-2b27-7a8f215bf8da@redhat.com"
      type="cite">On 08/05/2016 04:52 PM, Adam Young wrote:
      <br>
      <blockquote type="cite">Today I discovered that we need to modify
        the HA proxy config to tell it to rewrite redirects.  Otherwise,
        I get a link to
        <br>
        <br>
<a class="moz-txt-link-freetext" href="http://openstack.ayoung-dell-t1700.test:5000/v3/mellon/postResponse">http://openstack.ayoung-dell-t1700.test:5000/v3/mellon/postResponse</a>
        <br>
        <br>
        <br>
        Which should be https, not http.
        <br>
        <br>
        <br>
        I mimicked the lines in the horizon config so that the keystone
        section looks like this:
        <br>
        <br>
        <br>
        listen keystone_public
        <br>
          bind 10.0.0.4:13000 transparent ssl crt
        /etc/pki/tls/private/overcloud_endpoint.pem
        <br>
          bind 172.16.2.5:5000 transparent
        <br>
          mode http
        <br>
          redirect scheme https code 301 if { hdr(host) -i 10.0.0.4 } !{
        ssl_fc }
        <br>
          rsprep ^Location:\ <a class="moz-txt-link-freetext" href="http://(.*)">http://(.*)</a> Location:\ https://\1
        <br>
          http-request set-header X-Forwarded-Proto https if { ssl_fc }
        <br>
          http-request set-header X-Forwarded-Proto http if !{ ssl_fc }
        <br>
          server overcloud-controller-0 172.16.2.8:5000 check fall 5
        inter 2000 rise 2
        <br>
          server overcloud-controller-1 172.16.2.6:5000 check fall 5
        inter 2000 rise 2
        <br>
          server overcloud-controller-2 172.16.2.9:5000 check fall 5
        inter 2000 rise 2
        <br>
        <br>
        And.. it seemed to work the first time, but not the second.  Now
        I get
        <br>
        <br>
        "Secure Connection Failed
        <br>
        <br>
        The connection to openstack.ayoung-dell-t1700.test:5000 was
        interrupted while the page was loading."
        <br>
        <br>
        Guessing the first success was actually a transient error.
        <br>
        <br>
        So it looks like my change was necessary but not sufficient.
        <br>
        <br>
        This is needed to make mod_auth_mellon work when loaded into
        Apache, and Apache is running behind  HA proxy (Tripleo setup).
        <br>
        <br>
        <br>
        There is no SSL setup inside the Keystone server, it is just
        doing straight HTTP.  While I'd like to change this long term,
        I'd like to get things working this way first, but am willing to
        make whatever changes are needed to get SAML and Federation
        working soonest.
        <br>
        <br>
        <br>
        <br>
        <br>
      </blockquote>
      Ah...just noticed the redirect is to :5000, not port :13000 which
      is the HA Proxy port.
      <br>
    </blockquote>
    <br>
    OK, this is due to the SAML request:<br>
    <br>
    <br>
    <pre id="txt"><samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
                    xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
                    ID="_5089011BEBD0F6B82074F67E904F598D"
                    Version="2.0"
                    IssueInstant="2016-08-05T21:55:18Z"
                    Destination=<a class="moz-txt-link-rfc2396E" href="https://identity.ayoung-dell-t1700.test/auth/realms/openstack/protocol/saml">"https://identity.ayoung-dell-t1700.test/auth/realms/openstack/protocol/saml"</a>
                    Consent="urn:oasis:names:tc:SAML:2.0:consent:current-implicit"
                    ForceAuthn="false"
                    IsPassive="false"
                    AssertionConsumerServiceURL=<a class="moz-txt-link-rfc2396E" href="https://openstack.ayoung-dell-t1700.test:5000/v3/mellon/postResponse">"https://openstack.ayoung-dell-t1700.test:5000/v3/mellon/postResponse"</a>
                    >
    <saml:Issuer><a class="moz-txt-link-freetext" href="https://openstack.ayoung-dell-t1700.test:5000/v3/mellon/metadata">https://openstack.ayoung-dell-t1700.test:5000/v3/mellon/metadata</a></saml:Issuer>
    <samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
                        AllowCreate="true"
                        />
</samlp:AuthnRequest>
</pre>
    <br>
    My guess is HA proxy is not passing on the proper, and the
    mod_auth_mellon does not know to rewrite it from 5000 to 13000<br>
    <br>
    <br>
    <blockquote
      cite="mid:25ae12e1-a367-2884-2b27-7a8f215bf8da@redhat.com"
      type="cite">
      <br>
      <br>
__________________________________________________________________________
      <br>
      OpenStack Development Mailing List (not for usage questions)
      <br>
      Unsubscribe:
      <a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>
      <br>
      <a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
      <br>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>