<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.E-MailFormatvorlage19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Hi Eetu,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">I think it could be a miss configuration of your nginx. Please check this:
<a href="https://community.sonarsource.com/t/saml-error-with-nginx-reverse-proxy/46324">
https://community.sonarsource.com/t/saml-error-with-nginx-reverse-proxy/46324</a> (It is not midPoint, but covered the same problem).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">On midpoint site you can check, if you have set the “Default hostname” in system configuration
</span><span lang="EN-US" style="font-size:11.0pt;font-family:Wingdings;mso-fareast-language:EN-US"></span><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> Infrastructure to you Reverse Proxy address (<a href="https://midpoint.example.com">https://midpoint.example.com</a>).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Good Luck!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Fabian<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">--<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><b><span style="font-family:"Verdana",sans-serif;color:black">Fabian Noll-Dukiewicz</span></b><span style="font-size:11.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span style="font-family:"Verdana",sans-serif;color:black">Spezialist Identity & Access Management | Geschäftsführer<o:p></o:p></span></i></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Verdana",sans-serif;color:black">Tel.: +49 152 244 63 211</span><span lang="EN-US" style="font-size:11.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Verdana",sans-serif;color:black">Email: fabian.noll-dukiewicz@veryfy.gmbh</span><span lang="EN-US" style="font-size:11.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black">Web: </span><span style="font-family:"Verdana",sans-serif;color:black;mso-fareast-language:EN-US"><a href="https://veryfy.gmbh"><span style="color:#0563C1">https://veryfy.gmbh</span></a>
</span><span style="font-size:11.0pt;color:black"> <o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">Von:
</span></b><span style="font-size:12.0pt;color:black">midPoint <midpoint-bounces@lists.evolveum.com> im Auftrag von Eetu Salpaharju via midPoint <midpoint@lists.evolveum.com><br>
<b>Datum: </b>Freitag, 14. Juli 2023 um 12:53<br>
<b>An: </b>midpoint@lists.evolveum.com <midpoint@lists.evolveum.com><br>
<b>Cc: </b>Eetu Salpaharju <Eetu.Salpaharju@tietokeskus.fi><br>
<b>Betreff: </b>[midPoint] SAML authentication return URL<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Hello,<br>
<br>
I'm deploying SAML2 authentication against Microsoft Azure AD. <br>
<br>
My network configuration is using nginx server as reverse proxy like this. Both Midpoint and nginx are running on the same server.<br>
<br>
 user ---https://midpoint.example.com---> nginx ---http://localhost:8080---> Midpoint<br>
 <br>
Now Midpoint sends following return URL to Azure: <a href="http://midpoint.example.com/midpoint/auth/default/azure_auth/SSO/alias/aad">
http://midpoint.example.com/midpoint/auth/default/azure_auth/SSO/alias/aad</a> . The problem is that return url is using http instead of https. The return url should be
<a href="https://midpoint.example.com/midpoint/auth/default/azure_auth/SSO/alias/aad">
https://midpoint.example.com/midpoint/auth/default/azure_auth/SSO/alias/aad</a> .<br>
<br>
Where could I define base url or similar attribute so return URL would be with https protocol? For reference, my authenticator configuration is below.<br>
<br>
<authentication><br>
...<br>
    <modules><br>
        ...<br>
        <saml2 id="10"><br>
            <identifier>azure_auth</identifier><br>
            <description>Authentication against AzureAD tenant.</description><br>
            <focusType>UserType</focusType><br>
            <serviceProvider id="11"><br>
                <entityId>**ApplicationID from Azure**</entityId><br>
                <aliasForPath>aad</aliasForPath><br>
                <identityProvider><br>
                    <entityId>**ApplicationID from Azure**</entityId><br>
                    <metadata><br>
                        <pathToFile>/var/midpoint/auth/azure_metadata.xml</pathToFile><br>
                    </metadata><br>
                    <linkText>Microsoft Azure</linkText><br>
                    <authenticationRequestBinding>urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST</authenticationRequestBinding><br>
                    <nameOfUsernameAttribute>emailAddress</nameOfUsernameAttribute><br>
                </identityProvider><br>
            </serviceProvider><br>
        </saml2><br>
    </modules><br>
....<br>
</authentication><br>
<br>
<br>
Thank you in advance for helping with this one.<br>
<br>
<br>
- Eetu<br>
_______________________________________________<br>
midPoint mailing list<br>
midPoint@lists.evolveum.com<br>
<a href="https://lists.evolveum.com/mailman/listinfo/midpoint">https://lists.evolveum.com/mailman/listinfo/midpoint</a><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>