<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 4, 2016 at 5:16 PM,  <span dir="ltr">&lt;<a href="mailto:aleksey.maksimov@it-kb.ru" target="_blank">aleksey.maksimov@it-kb.ru</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Martin, thanks for the help. It works.<br></blockquote><div><br><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">​Glad to hear that, thanks.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">Martin<br>​</div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
03.10.2016, 15:01, &quot;Martin Perina&quot; &lt;<a href="mailto:mperina@redhat.com">mperina@redhat.com</a>&gt;:<br>
&gt; ​Ahh, this is the issue. Above configuration is valid for oVirt 3.x, but in 4.0 we have quite new OAuth base SSO, so you need to use following configuration:<br>
&gt;<br>
&gt; &lt;LocationMatch ^/ovirt-engine/sso/(<wbr>interactive-login-negotiate|<wbr>oauth/token-http-auth)|^/<wbr>ovirt-engine/api&gt;<br>
&gt;   &lt;If &quot;req(&#39;Authorization&#39;) !~ /^(Bearer|Basic)/i&quot;&gt;<br>
&gt;     RewriteEngine on<br>
&gt;     RewriteCond %{LA-U:REMOTE_USER} ^(.*)$<br>
&gt;     RewriteRule ^(.*)$ - [L,NS,P,E=REMOTE_USER:%1]<br>
&gt;     RequestHeader set X-Remote-User %{REMOTE_USER}s<br>
&gt;     AuthType Kerberos<br>
&gt;     AuthName &quot;Kerberos Login&quot;<br>
&gt;     Krb5Keytab /etc/httpd/s-oVirt-Krb.keytab<br>
&gt;     KrbAuthRealms <a href="http://AD.HOLDING.COM" rel="noreferrer" target="_blank">AD.HOLDING.COM</a><br>
&gt;     KrbMethodK5Passwd off<br>
&gt;     Require valid-user<br>
&gt;     ErrorDocument 401 &quot;&lt;html&gt;&lt;meta http-equiv=\&quot;refresh\&quot; content=\&quot;0; url=/ovirt-engine/sso/login-<wbr>unauthorized\&quot;/&gt;&lt;body&gt;&lt;a href=\&quot;/ovirt-engine/sso/<wbr>login-unauthorized\&quot;&gt;Here&lt;/a&gt;&lt;<wbr>/body&gt;&lt;/html&gt;&quot;<br>
&gt;   &lt;/If&gt;<br>
&gt; &lt;/LocationMatch&gt;<br>
&gt; ​<br>
&gt;<br>
&gt; ​Also as 4.0 is working on EL7 you may use mod_auth_gssapi/mod_session instead of quite old mod_auth_krb. For mod_auth_gssapi/mod_sessions you need to do following:<br>
&gt;<br>
&gt;   1. yum install mod_session mod_auth_gssapi<br>
&gt;   2. Use following Apache configuration ​<br>
&gt;<br>
&gt; ​&lt;LocationMatch ^/ovirt-engine/sso/(<wbr>interactive-login-negotiate|<wbr>oauth/token-http-auth)|^/<wbr>ovirt-engine/api&gt;<br>
&gt;   &lt;If &quot;req(&#39;Authorization&#39;) !~ /^(Bearer|Basic)/i&quot;&gt;<br>
&gt;     RewriteEngine on<br>
&gt;     RewriteCond %{LA-U:REMOTE_USER} ^(.*)$<br>
&gt;     RewriteRule ^(.*)$ - [L,NS,P,E=REMOTE_USER:%1]<br>
&gt;     RequestHeader set X-Remote-User %{REMOTE_USER}s<br>
&gt;<br>
&gt;     AuthType GSSAPI<br>
&gt;     AuthName &quot;Kerberos Login&quot;<br>
&gt;<br>
&gt;     # Modify to match installation<br>
&gt;     GssapiCredStore keytab:/etc/httpd/s-oVirt-Krb.<wbr>keytab<br>
&gt;     GssapiUseSessions On<br>
&gt;     Session On<br>
&gt;     SessionCookieName ovirt_gssapi_session path=/private;httponly;secure;<br>
&gt;<br>
&gt;     Require valid-user<br>
&gt;     ErrorDocument 401 &quot;&lt;html&gt;&lt;meta http-equiv=\&quot;refresh\&quot; content=\&quot;0; url=/ovirt-engine/sso/login-<wbr>unauthorized\&quot;/&gt;&lt;body&gt;&lt;a href=\&quot;/ovirt-engine/sso/<wbr>login-unauthorized\&quot;&gt;Here&lt;/a&gt;&lt;<wbr>/body&gt;&lt;/html&gt;&quot;<br>
&gt;   &lt;/If&gt;<br>
&gt; &lt;/LocationMatch&gt;​<br>
</blockquote></div><br></div></div>