<div dir="ltr">I think I introduced a red herring by accident, I'm deeply embarrassed to say.<div><br></div><div>Our new FreeIPA instance lives in <a href="http://ns01.dev.example.net">ns01.dev.example.net</a>.  The alternative hostname is <a href="http://password.example.net">password.example.net</a></div><div><br></div><div>I think that the different domain there was causing some of the problems.  I removed mention of the different domain by accident as part of a search and replace to remove the company name.</div><div><br></div><div>However, by following Jan's directions I've been able to get this to work using an Apache proxy that rewrites the cookie and referer hostnames.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 8, 2016 at 3:29 AM, Martin Kosek <span dir="ltr"><<a href="mailto:mkosek@redhat.com" target="_blank">mkosek@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 06/01/2016 07:48 PM, Anthony Clark wrote:<br>
> Hello All,<br>
><br>
> I've been asked to allow access to our FreeIPA web UI from a more user friendly<br>
> url than I'm currently using.  So I've set up a CNAME <a href="http://password.example.com" rel="noreferrer" target="_blank">password.example.com</a><br>
</span>> <<a href="http://password.example.com" rel="noreferrer" target="_blank">http://password.example.com</a>> for <a href="http://ns01.example.com" rel="noreferrer" target="_blank">ns01.example.com</a> <<a href="http://ns01.example.com" rel="noreferrer" target="_blank">http://ns01.example.com</a>><br>
<span class="">><br>
> At the moment, if I go to the real hostname of the FreeIPA server<br>
</span>> (<a href="http://ns01.example.com" rel="noreferrer" target="_blank">ns01.example.com</a> <<a href="http://ns01.example.com" rel="noreferrer" target="_blank">http://ns01.example.com</a>>), everything works.<br>
<span class="">><br>
> If I go to the new "friendly" url (<a href="http://password.example.com" rel="noreferrer" target="_blank">password.example.com</a><br>
</span>> <<a href="http://password.example.com" rel="noreferrer" target="_blank">http://password.example.com</a>>) then upon login I get a "your session has expired<br>
<div><div class="h5">> please re-login" message.<br>
><br>
> Setting debug to true in /etc/ipa/server.conf shows me that the server keeps<br>
> using new session IDs.  (Host and user names changed to protect the innocent)<br>
><br>
> ----- /var/log/httpd/error_log -----<br>
> [Wed Jun 01 17:11:06.237363 2016] [:error] [pid 31491] ipa: DEBUG: WSGI<br>
> wsgi_dispatch.__call__:<br>
> [Wed Jun 01 17:11:06.237533 2016] [:error] [pid 31491] ipa: DEBUG: WSGI<br>
> jsonserver_session.__call__:<br>
> [Wed Jun 01 17:11:06.237944 2016] [:error] [pid 31491] ipa: DEBUG: no session<br>
> cookie found<br>
> [Wed Jun 01 17:11:06.239009 2016] [:error] [pid 31491] ipa: DEBUG: no session id<br>
> in request, generating empty session data with id=d5bc1c4cab8d3bfaee63b84805147995<br>
> [Wed Jun 01 17:11:06.239466 2016] [:error] [pid 31491] ipa: DEBUG: store<br>
> session: session_id=d5bc1c4cab8d3bfaee63b84805147995<br>
> start_timestamp=2016-06-01T17:11:06 access_timestamp=2016-06-01T17:11:06<br>
> expiration_timestamp=1970-01-01T00:00:00<br>
> [Wed Jun 01 17:11:06.241052 2016] [:error] [pid 31491] ipa: DEBUG:<br>
> jsonserver_session.__call__: session_id=d5bc1c4cab8d3bfaee63b84805147995<br>
> start_timestamp=2016-06-01T17:11:06 access_timestamp=2016-06-01T17:11:06<br>
> expiration_timestamp=1970-01-01T00:00:00<br>
> [Wed Jun 01 17:11:06.241186 2016] [:error] [pid 31491] ipa: DEBUG: no ccache,<br>
> need login<br>
> [Wed Jun 01 17:11:06.241294 2016] [:error] [pid 31491] ipa: DEBUG:<br>
> jsonserver_session: 401 Unauthorized need login<br>
> [Wed Jun 01 17:11:24.956791 2016] [:error] [pid 31492] ipa: DEBUG: WSGI<br>
> wsgi_dispatch.__call__:<br>
> [Wed Jun 01 17:11:24.956992 2016] [:error] [pid 31492] ipa: DEBUG: WSGI<br>
> login_password.__call__:<br>
> [Wed Jun 01 17:11:24.957381 2016] [:error] [pid 31492] ipa: DEBUG: Obtaining<br>
> armor ccache: principal=HTTP/<a href="mailto:ns01.example.com@EXAMPLE.COM">ns01.example.com@EXAMPLE.COM</a><br>
</div></div>> <mailto:<a href="mailto:ns01.example.com@EXAMPLE.COM">ns01.example.com@EXAMPLE.COM</a>> keytab=/etc/httpd/conf/ipa.keytab<br>
<span class="">> ccache=/var/run/ipa_memcached/krbcc_A_aclark<br>
> [Wed Jun 01 17:11:24.957519 2016] [:error] [pid 31492] ipa: DEBUG: Initializing<br>
> principal HTTP/<a href="mailto:ns01.example.com@EXAMPLE.COM">ns01.example.com@EXAMPLE.COM</a><br>
</span>> <mailto:<a href="mailto:ns01.example.com@EXAMPLE.COM">ns01.example.com@EXAMPLE.COM</a>> using keytab /etc/httpd/conf/ipa.keytab<br>
<span class="">> [Wed Jun 01 17:11:24.957633 2016] [:error] [pid 31492] ipa: DEBUG: using ccache<br>
> /var/run/ipa_memcached/krbcc_A_aclark<br>
> [Wed Jun 01 17:11:24.998328 2016] [:error] [pid 31492] ipa: DEBUG: Attempt 1/1:<br>
> success<br>
> [Wed Jun 01 17:11:24.998531 2016] [:error] [pid 31492] ipa: DEBUG: Initializing<br>
</span>> principal <a href="mailto:aclark@EXAMPLE.COM">aclark@EXAMPLE.COM</a> <mailto:<a href="mailto:aclark@EXAMPLE.COM">aclark@EXAMPLE.COM</a>> using password<br>
<span class="">> [Wed Jun 01 17:11:24.998684 2016] [:error] [pid 31492] ipa: DEBUG: Using armor<br>
> ccache /var/run/ipa_memcached/krbcc_A_aclark for FAST webauth<br>
> [Wed Jun 01 17:11:24.998865 2016] [:error] [pid 31492] ipa: DEBUG: Starting<br>
> external process<br>
> [Wed Jun 01 17:11:24.998984 2016] [:error] [pid 31492] ipa: DEBUG:<br>
</span>> args='/usr/bin/kinit' '<a href="mailto:aclark@EXAMPLE.COM">aclark@EXAMPLE.COM</a> <mailto:<a href="mailto:aclark@EXAMPLE.COM">aclark@EXAMPLE.COM</a>>' '-c'<br>
<span class="">> 'FILE:/var/run/ipa_memcached/krbcc_31492' '-T'<br>
> '/var/run/ipa_memcached/krbcc_A_aclark'<br>
> [Wed Jun 01 17:11:26.079200 2016] [:error] [pid 31492] ipa: DEBUG: Process<br>
> finished, return code=0<br>
> [Wed Jun 01 17:11:26.079384 2016] [:error] [pid 31492] ipa: DEBUG:<br>
</span>> stdout=Password for <a href="mailto:aclark@EXAMPLE.COM">aclark@EXAMPLE.COM</a> <mailto:<a href="mailto:aclark@EXAMPLE.COM">aclark@EXAMPLE.COM</a>>:<br>
<div><div class="h5">> [Wed Jun 01 17:11:26.079399 2016] [:error] [pid 31492]<br>
> [Wed Jun 01 17:11:26.079483 2016] [:error] [pid 31492] ipa: DEBUG: stderr=<br>
> [Wed Jun 01 17:11:26.079680 2016] [:error] [pid 31492] ipa: DEBUG: Cleanup the<br>
> armor ccache<br>
> [Wed Jun 01 17:11:26.079871 2016] [:error] [pid 31492] ipa: DEBUG: Starting<br>
> external process<br>
> [Wed Jun 01 17:11:26.079983 2016] [:error] [pid 31492] ipa: DEBUG:<br>
> args='/usr/bin/kdestroy' '-A' '-c' '/var/run/ipa_memcached/krbcc_A_aclark'<br>
> [Wed Jun 01 17:11:26.093954 2016] [:error] [pid 31492] ipa: DEBUG: Process<br>
> finished, return code=0<br>
> [Wed Jun 01 17:11:26.094113 2016] [:error] [pid 31492] ipa: DEBUG: stdout=<br>
> [Wed Jun 01 17:11:26.094210 2016] [:error] [pid 31492] ipa: DEBUG: stderr=<br>
> [Wed Jun 01 17:11:26.094809 2016] [:error] [pid 31492] ipa: DEBUG: no session<br>
> cookie found<br>
> [Wed Jun 01 17:11:26.095877 2016] [:error] [pid 31492] ipa: DEBUG: no session id<br>
> in request, generating empty session data with id=7ab08ba17d30883cff480af9e923cf82<br>
> [Wed Jun 01 17:11:26.096132 2016] [:error] [pid 31492] ipa: DEBUG: store<br>
> session: session_id=7ab08ba17d30883cff480af9e923cf82<br>
> start_timestamp=2016-06-01T17:11:26 access_timestamp=2016-06-01T17:11:26<br>
> expiration_timestamp=1970-01-01T00:00:00<br>
> [Wed Jun 01 17:11:26.096596 2016] [:error] [pid 31492] ipa: DEBUG:<br>
> finalize_kerberos_acquisition: login_password<br>
> ccache_name="FILE:/var/run/ipa_memcached/krbcc_31492"<br>
> session_id="7ab08ba17d30883cff480af9e923cf82"<br>
> [Wed Jun 01 17:11:26.096774 2016] [:error] [pid 31492] ipa: DEBUG: reading<br>
> ccache data from file "/var/run/ipa_memcached/krbcc_31492"<br>
> [Wed Jun 01 17:11:26.097937 2016] [:error] [pid 31492] ipa: DEBUG:<br>
> get_credential_times: principal=krbtgt/<a href="mailto:EXAMPLE.COM@EXAMPLE.COM">EXAMPLE.COM@EXAMPLE.COM</a><br>
</div></div>> <mailto:<a href="mailto:EXAMPLE.COM@EXAMPLE.COM">EXAMPLE.COM@EXAMPLE.COM</a>>, authtime=06/01/16 17:11:26, starttime=06/01/16<br>
<div><div class="h5">> 17:11:26, endtime=06/02/16 17:11:26, renew_till=01/01/70 00:00:00<br>
> [Wed Jun 01 17:11:26.098111 2016] [:error] [pid 31492] ipa: DEBUG: KRB5_CCache<br>
> FILE:/var/run/ipa_memcached/krbcc_31492 endtime=1464887486 (06/02/16 17:11:26)<br>
> [Wed Jun 01 17:11:26.098361 2016] [:error] [pid 31492] ipa: DEBUG:<br>
> set_session_expiration_time: duration_type=inactivity_timeout duration=3600<br>
> max_age=1464887186 expiration=1464804686.1 (2016-06-01T18:11:26)<br>
> [Wed Jun 01 17:11:26.098526 2016] [:error] [pid 31492] ipa: DEBUG: store<br>
> session: session_id=7ab08ba17d30883cff480af9e923cf82<br>
> start_timestamp=2016-06-01T17:11:26 access_timestamp=2016-06-01T17:11:26<br>
> expiration_timestamp=2016-06-01T18:11:26<br>
> [Wed Jun 01 17:11:26.099871 2016] [:error] [pid 31492] ipa: ERROR:<br>
> release_ipa_ccache: ccache_name (FILE:/var/run/ipa_memcached/krbcc_31492) !=<br>
> KRB5CCNAME environment variable (/var/run/httpd/ipa/krbcache/krb5ccache)<br>
> [Wed Jun 01 17:11:26.163524 2016] [:error] [pid 31491] ipa: DEBUG: WSGI<br>
> wsgi_dispatch.__call__:<br>
> [Wed Jun 01 17:11:26.163708 2016] [:error] [pid 31491] ipa: DEBUG: WSGI<br>
> jsonserver_session.__call__:<br>
> [Wed Jun 01 17:11:26.163974 2016] [:error] [pid 31491] ipa: DEBUG: no session<br>
> cookie found<br>
> [Wed Jun 01 17:11:26.164464 2016] [:error] [pid 31491] ipa: DEBUG: no session id<br>
> in request, generating empty session data with id=433125db49c7ca9eb286c3ecf605d55d<br>
> [Wed Jun 01 17:11:26.164713 2016] [:error] [pid 31491] ipa: DEBUG: store<br>
> session: session_id=433125db49c7ca9eb286c3ecf605d55d<br>
> start_timestamp=2016-06-01T17:11:26 access_timestamp=2016-06-01T17:11:26<br>
> expiration_timestamp=1970-01-01T00:00:00<br>
> [Wed Jun 01 17:11:26.165181 2016] [:error] [pid 31491] ipa: DEBUG:<br>
> jsonserver_session.__call__: session_id=433125db49c7ca9eb286c3ecf605d55d<br>
> start_timestamp=2016-06-01T17:11:26 access_timestamp=2016-06-01T17:11:26<br>
> expiration_timestamp=1970-01-01T00:00:00<br>
> [Wed Jun 01 17:11:26.165301 2016] [:error] [pid 31491] ipa: DEBUG: no ccache,<br>
> need login<br>
> [Wed Jun 01 17:11:26.165401 2016] [:error] [pid 31491] ipa: DEBUG:<br>
> jsonserver_session: 401 Unauthorized need login<br>
> ----- /var/log/httpd/error_log -----<br>
><br>
> I'm somewhat at a loss to debug this further.  I was wondering if the session<br>
> storage is somehow bound to the original host name.  Is there a way to check<br>
> and/or configure this?<br>
><br>
> Alternatively is there a guide out there for enabling additional host names for<br>
> the web UI in FreeIPA?<br>
<br>
</div></div>Good question. I see there was no reply for this thread (note that most of the<br>
developers are finishing FreeIPA 4.4 release) yet, CCing Petr to advise.<br>
<span class="HOEnZb"><font color="#888888"><br>
Martin<br>
</font></span></blockquote></div><br></div>