<div dir="ltr">So I understand the mitigation of CSRF attacks. I would like ipa to be able to handle a specific set of referers. My use case may be less common since my freeipa instance is handling our server infrastructure not desktops.<div>
<br></div><div>I have everything working now. Here is an example nginx server config in case anyone else needs it:<div><br></div><div><div>    server {</div><div>        server_name <a href="http://ipa.corp.com">ipa.corp.com</a>;</div>
<div>        listen 443 ssl;</div><div>        location / {</div><div>                proxy_cookie_domain <a href="http://ldap.corp.com">ldap.corp.com</a> <a href="http://ipa.corp.com">ipa.corp.com</a>;</div><div>                proxy_pass <a href="https://ldap.corp.com/">https://ldap.corp.com/</a>;</div>
<div>                proxy_set_header Referer <a href="https://ldap.corp.com/ipa/ui">https://ldap.corp.com/ipa/ui</a>;</div><div>        }</div><div>    }</div></div><div><br></div><div><a href="http://ipa.corp.com">ipa.corp.com</a> would be the external server and <a href="http://ldap.corp.com">ldap.corp.com</a> would be the internal server.</div>
<div><br></div><div>Thanks for your help.</div><div><br></div><div>Steve</div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 3, 2014 at 11:10 AM, Alexander Bokovoy <span dir="ltr"><<a href="mailto:abokovoy@redhat.com" target="_blank">abokovoy@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, 03 Feb 2014, Steve Severance wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yes it works if I specify the -s as <a href="http://ldap.mycorp.com" target="_blank">ldap.mycorp.com</a>. So we have progress!<br>
It now appears to authenticate fine when it posts the session but I have a<br>
new error.<br>
<br>
I get an Ipa Error 911 "Missing HTTP referer. <br/> You have to configure<br>
your browser to send HTTP referer header." I assume this is because the<br>
external name doesn't match the internal name. Is there a way to modify<br>
this somewhere?<br>
</blockquote></div>
You can read <a href="https://bugzilla.redhat.com/show_bug.cgi?id=747710" target="_blank">https://bugzilla.redhat.com/<u></u>show_bug.cgi?id=747710</a> for<br>
details and <a href="https://rhn.redhat.com/errata/RHSA-2011-1533.html" target="_blank">https://rhn.redhat.com/errata/<u></u>RHSA-2011-1533.html</a> is the<br>
security errata addressing it.<br>
<br>
We are deliberately closing cross-site forgery by enforcing<br>
HTTP referrer checks.<br>
<br>
Your nginx proxy would be a middle man which we are attempting to<br>
protect against.<br>
<br>
Recent discussions on how to allow your use case but still keep the<br>
security tight can be seen here:<br>
<a href="http://comments.gmane.org/gmane.linux.redhat.freeipa.user/8920" target="_blank">http://comments.gmane.org/<u></u>gmane.linux.redhat.freeipa.<u></u>user/8920</a> (latter<br>
part of the thread). Discussion stalled since then.<div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks.<br>
<br>
Steve<br>
<br>
<br>
On Mon, Feb 3, 2014 at 4:40 AM, Sumit Bose <<a href="mailto:sbose@redhat.com" target="_blank">sbose@redhat.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Fri, Jan 31, 2014 at 01:50:58PM -0800, Steve Severance wrote:<br>
> Hi Sumit, That does indeed work. What does that tell us?<br>
<br>
I'm sorry, but it only tells that in general GSSAPI/Kerberos is working.<br>
I think it does not help much with your original issue. About<br>
ipa-getkeytab, does it work if you specify the server with the<br>
-s/--server option?<br>
<br>
<br>
bye,<br>
Sumit<br>
<br>
><br>
> Steve<br>
><br>
><br>
> On Wed, Jan 29, 2014 at 12:11 AM, Sumit Bose <<a href="mailto:sbose@redhat.com" target="_blank">sbose@redhat.com</a>> wrote:<br>
><br>
> > On Tue, Jan 28, 2014 at 02:29:07PM -0800, Steve Severance wrote:<br>
> > > Hi Everyone,<br>
> > ><br>
> > > I have deployed freeipa inside our production network. I want to be<br>
able<br>
> > to<br>
> > > access the web ui so I am attempting to add it to our nginx edge<br>
> > machine. I<br>
> > > can pass the requests upstream just fine but I am unable to login<br>
using a<br>
> > > username/password. I have enabled password authentication in the<br>
kerberos<br>
> > > section of the freeipa httpd config file. In the logs it looks like<br>
the<br>
> > > authentication succeeds and a ticket is issued. I assume that the<br>
cookie<br>
> > > that is returned (ipa_session) has the authentication information in<br>
it.<br>
> > > The subsequent call to get json data fails and I am prompted to login<br>
> > again.<br>
> > ><br>
> > > I found this thread (<br>
> > ><br>
<a href="https://www.redhat.com/archives/freeipa-users/2013-August/msg00080.html" target="_blank">https://www.redhat.com/<u></u>archives/freeipa-users/2013-<u></u>August/msg00080.html</a>)<br>
> > > which has instructions on adding <a href="http://ipa.mydomain.com" target="_blank">ipa.mydomain.com</a> to the keytab.<br>
When I<br>
> > > call ipa-getkeytab it hangs for a bit before returning:<br>
> > ldap_sasl_bind(SIMPLE):<br>
> > > Can't contact LDAP server (-1)<br>
> > ><br>
> > > Digging into this if I run: ldapsearch -d 1 -v -H ldaps://<br>
> > <a href="http://ldap.mydomain.com" target="_blank">ldap.mydomain.com</a><br>
> > ><br>
> > > I get:<br>
> > > ldap_sasl_interactive_bind_s: Unknown authentication method (-6)<br>
> > >         additional info: SASL(-4): no mechanism available:<br>
> ><br>
> > Does it work if you add the mechanism explicitly, e.g. 'ldapsearch -Y<br>
> > GSSAPI ....' ?<br>
> ><br>
> > bye,<br>
> > Sumit<br>
> ><br>
> > ><br>
> > > So we seem to have a SASL problem. If I run ldapsearch with -x simple<br>
> > > authentication works just fine.<br>
> > ><br>
> > > Do I need to do something special to enable SASL so I can get the<br>
keytab?<br>
> > > The ipa-getkeytab command does not seem to have an option to use<br>
simple<br>
> > > authentication.<br>
> > ><br>
> > > Thanks.<br>
> > ><br>
> > > Steve<br>
> ><br>
> > > ______________________________<u></u>_________________<br>
> > > Freeipa-users mailing list<br>
> > > <a href="mailto:Freeipa-users@redhat.com" target="_blank">Freeipa-users@redhat.com</a><br>
> > > <a href="https://www.redhat.com/mailman/listinfo/freeipa-users" target="_blank">https://www.redhat.com/<u></u>mailman/listinfo/freeipa-users</a><br>
> ><br>
<br>
</blockquote>
<br>
<br>
<br>
-- <br>
Steve Severance<br>
Director of Engineering<br>
Altos Research<br>
<br>
e. <a href="mailto:steve@altosresearch.com" target="_blank">steve@altosresearch.com</a><br>
m. <a href="tel:%28240%29%20472%20-%209645" value="+12404729645" target="_blank">(240) 472 - 9645</a><br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
______________________________<u></u>_________________<br>
Freeipa-users mailing list<br>
<a href="mailto:Freeipa-users@redhat.com" target="_blank">Freeipa-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/freeipa-users" target="_blank">https://www.redhat.com/<u></u>mailman/listinfo/freeipa-users</a><br>
</blockquote>
<br>
<br>
-- <br></div></div><span class="HOEnZb"><font color="#888888">
/ Alexander Bokovoy<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Steve Severance<div>Director of Engineering</div><div>Altos Research</div><div><br></div><div>e. <a href="mailto:steve@altosresearch.com" target="_blank">steve@altosresearch.com</a></div>
<div>m. (240) 472 - 9645</div></div>
</div>