Bug 821448 - RFE: Browser config javascript should check to see if sending Referer is enabled
RFE: Browser config javascript should check to see if sending Referer is enabled
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa (Show other bugs)
6.2
x86_64 Linux
medium Severity high
: rc
: ---
Assigned To: Rob Crittenden
Namita Soman
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-14 10:13 EDT by David Kovalsky
Modified: 2014-03-31 19:46 EDT (History)
6 users (show)

See Also:
Fixed In Version: ipa-3.0.0-1.el6
Doc Type: Enhancement
Doc Text:
Feature: Identity Management Firefox browser configuration script now checks if the browser is configured to sent Referrer header in HTTP requests for Identity Management. Reason: Firefox browsers which would not have network.http.sendRefererHeader configuration option set to True would fail to connect to Identity Management Web UI even though they run the configuration script. Result (if any): Configuration script ensures that network.http.sendRefererHeader configuration option is set correctly and the Firefox browser can thus connect to Web UI.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 04:13:06 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Full headers (34.24 KB, text/plain)
2012-05-18 12:05 EDT, David Kovalsky
no flags Details
in about:confi value is set to 2 (388.04 KB, image/png)
2013-01-28 10:06 EST, Varun Mylaraiah
no flags Details

  None (edit)
Description David Kovalsky 2012-05-14 10:13:42 EDT
I have Fedora 16 installed with default firefox from repos (firefox-12.0-1.fc16.x86_64) and I'm unable to login. 

I get a bit cryptic error "Missing or invalid HTTP Referer, missing". It seems that latest version of Firefox is not sending Referrer header (I've tried this also in safe mode and without extentions). 

Without allowing Password Logins on server (KrbMethodK5Passwd On), I can't use IPA. 


Does IPA really need the referrer header for login?

If it absolutely needs to, I'd prefer to see more user friendly messages about possible issues and help on how to solve them (advice on Firefox configuration changes if possible, pointer to changes server side, etc). 

Also the error message that the referrer headers are "missing or invalid" is not very good for debugging. It does make a big difference if the browser is not sending some header at all or if it's corrupted. 

ipa-server-2.1.3-9.el6.x86_64
Comment 3 Rob Crittenden 2012-05-14 10:28:48 EDT
The Apache error log /var/log/httpd/errors may have additional information on the source of the problem.

I'm not able to duplicate this. Can you install the Live HTTP headers (or similar) browser plugin to see what is being sent back and forth to the server?
Comment 4 RHEL Product and Program Management 2012-05-18 00:05:05 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 5 David Kovalsky 2012-05-18 12:04:18 EDT
Hey Rob, 

I've installed Live HTTP headers, cleared my cache, logins and cookies and opened the page. Obviously, I've obfusted the hostname and hopefully removed my true login into. 

There's one 404 in the logs, perhaps relevant?
https://my.machine.domain/ipa/ui/develop.js

GET /ipa/ui/develop.js HTTP/1.1
Host: my.machine.domain
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
Accept: */*
Accept-Language: en-us,cs;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive

HTTP/1.1 404 Not Found
Date: Fri, 18 May 2012 15:45:12 GMT
Server: Apache
Content-Length: 215
Keep-Alive: timeout=5, max=97
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1


Full headers attached in a sec.
Comment 6 David Kovalsky 2012-05-18 12:05:10 EDT
Created attachment 585446 [details]
Full headers
Comment 7 Rob Crittenden 2012-05-18 15:13:03 EDT
Why is it sending a Basic auth header? Did you enable KrbMethodK5Passwd?
Comment 8 David Kovalsky 2012-05-20 12:40:05 EDT
Yes I did. I wasn't able to login via negotiate (more info in comment #0). 

I still can't login in FF, but I can login via password in Chrome as a workaround.
Comment 9 Rob Crittenden 2012-05-21 09:34:35 EDT
I don't know why Firefox wouldn't be sending a Referer header, Basic auth or not.

We require a Referer to prevent Cross-Site Request Forgery attacks.

Can you try creating a new profile in Firefox to see if that fixes things?
Comment 10 Simo Sorce 2012-05-22 12:06:12 EDT
Can you go in about:config and check what's the value of Network.http.sendRefererHeader ?
Comment 11 Dmitri Pal 2012-05-22 12:50:29 EDT
https://fedorahosted.org/freeipa/ticket/2778
Comment 12 David Kovalsky 2012-05-23 11:37:45 EDT
Bingo. 

It's set to 0 (user set, Integer; default is 2). I haven't touch this config, but I seem to recall that when I installed IPA it did some configuration changes to my browser to support negotiate. 

May it be that it's calling some kind of 'toggle' instead of setting this to 1?

(if this is total nonsense, please ignore)
Comment 13 Rob Crittenden 2012-05-23 13:33:53 EDT
We have signed javascript that makes config changes but that is just added a domain to network.negotiate-auth.trusted-uris setting. We do not touch sendRefererHeader.
Comment 14 David Kovalsky 2012-05-23 19:28:09 EDT
Hmm, in that case I'm not sure what caused this change in Firefox. 

Is there a way to read the value via JavaScript and guide the user to check the settings? It's really a trivial fix once it'c clear where to look :)
Comment 15 Rob Crittenden 2012-05-24 08:59:45 EDT
Yes, we can use this bug to track that feature.
Comment 16 Petr Vobornik 2012-06-22 04:58:04 EDT
Fixed upstream:

 * 0948a9f91b3e423df4d06fd13d23b3ec7ccaa921
 * 6f4121ccbb83493463a1f05d8a24f46042e8bf1d
Comment 19 Varun Mylaraiah 2013-01-28 10:06:38 EST
Created attachment 689031 [details]
in about:confi value is set to 2
Comment 20 Varun Mylaraiah 2013-01-28 12:03:33 EST
verified using ipa-server-3.0.0-22.el6.x86_64
Comment 22 errata-xmlrpc 2013-02-21 04:13:06 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0528.html

Note You need to log in before you can comment on or make changes to this bug.