590d18
From 27f97386a0259a8b12700e5d671a2de86c98661f Mon Sep 17 00:00:00 2001
590d18
From: Petr Vobornik <pvoborni@redhat.com>
590d18
Date: Thu, 17 Sep 2015 17:41:06 +0200
590d18
Subject: [PATCH] webui: use manual Firefox configuration for Firefox >= 40
590d18
590d18
The intended course of action is to show manual configuration in
590d18
browserconfig.html instead of configuration with the extension
590d18
for versions of Firefox >= 40.
590d18
590d18
The reasoning is:
590d18
* plan for enterprise environments was not published yet which
590d18
  forces as to use AMO (addons.mozilla.org)
590d18
* with AMO the user experience is worse than a manual configuration
590d18
590d18
steps for AMO:
590d18
* go to AMO page
590d18
* installed the extension
590d18
* go back to IPA page
590d18
* probably refresh
590d18
* click configure
590d18
* confirm
590d18
590d18
manual config:
590d18
* go to about:config
590d18
* set  network.negotiate-auth.trusted-uris with *domain.name
590d18
590d18
https://fedorahosted.org/freeipa/ticket/4906
590d18
590d18
Reviewed-By: Martin Basti <mbasti@redhat.com>
590d18
---
590d18
 install/html/browserconfig.html | 25 ++++++++++++++++++++++---
590d18
 install/html/ffconfig_page.js   | 24 +++++++++++++++++++++---
590d18
 2 files changed, 43 insertions(+), 6 deletions(-)
590d18
590d18
diff --git a/install/html/browserconfig.html b/install/html/browserconfig.html
590d18
index d721a4ad2a3b684a4bf45602584fee78f4613360..9c5cf68211281723e12b518f346aac43c1541cdc 100644
590d18
--- a/install/html/browserconfig.html
590d18
+++ b/install/html/browserconfig.html
590d18
@@ -69,7 +69,7 @@
590d18
                 

590d18
             
590d18
 
590d18
-            
590d18
+            
590d18
                 

Step 2

590d18
                 
590d18
                     

590d18
@@ -85,7 +85,7 @@
590d18
                 
590d18
             
590d18
 
590d18
-            
590d18
+            
590d18
                 

Step 3

590d18
                 

Configure browser

590d18
                 

Browser successfully configured

590d18
@@ -94,8 +94,27 @@
590d18
                 

Configuration was not successful, unknown error uccured.

590d18
             
590d18
 
590d18
+            
590d18
+                

Step 2

590d18
+                
    590d18
    +                    
  1. 590d18
    +                        In the address bar of Firefox, type about:config to display the list of current configuration options.
    590d18
    +                    
    590d18
    +                    
  2. 590d18
    +                        In the Filter field, type negotiate to restrict the list of options.
    590d18
    +                    
    590d18
    +                    
  3. 590d18
    +                        Double-click the network.negotiate-auth.trusted-uris entry to display the Enter string value dialog box.
    590d18
    +                    
    590d18
    +                    
  4. 590d18
    +                        Enter the name of the domain against which you want to authenticate, for example, .example.com.
    590d18
    +                    
    590d18
    +                
    590d18
    +            
    590d18
    +
    590d18
                 
    590d18
    -                

    Step 4

    590d18
    +                

    Step 4

    590d18
    +                

    Step 3

    590d18
                     

    Return to Web UI

    590d18
                 
    590d18
            
    590d18
    diff --git a/install/html/ffconfig_page.js b/install/html/ffconfig_page.js
    590d18
    index 4e59db0aa5424d3c664d3d651843b26b440d50a9..536332ee8358fb007da840b587df92e627dd7b58 100644
    590d18
    --- a/install/html/ffconfig_page.js
    590d18
    +++ b/install/html/ffconfig_page.js
    590d18
    @@ -87,7 +87,7 @@
    590d18
     
    590d18
             if (!browser.mozilla) {
    590d18
                 $('#wrongbrowser').show();
    590d18
    -            set_enabled(['#step1', '#step2', '#step3'], false);
    590d18
    +            set_enabled(['#step2b'], false);
    590d18
             } else {
    590d18
                 // Disable for all version of FF older than 15. Theoretically
    590d18
                 // the extension is compatible with version 3.6, 10 and later
    590d18
    @@ -95,8 +95,26 @@
    590d18
                 // resource from chrome.manifest
    590d18
                 if (compare_version(browser.version, '15') === -1) {
    590d18
                     $('#step2a').show();
    590d18
    -                set_enabled(['#step2', '#step3'], false);
    590d18
    -            }// else if (compare_version(version, '15') === -1) {
    590d18
    +                $('#step2').show();
    590d18
    +                $('#step3').show();
    590d18
    +                $('#step4header').show();
    590d18
    +                $('#step3bheader').hide();
    590d18
    +                set_enabled(['#step2', '#step3', '#step2b'], false);
    590d18
    +            }  else if (compare_version(browser.version, '40') === -1) {
    590d18
    +                // FF is > 15 < 40
    590d18
    +                // show krb extension method
    590d18
    +                $('#step2').show();
    590d18
    +                $('#step3').show();
    590d18
    +                $('#step4header').show();
    590d18
    +                $('#step3bheader').hide();
    590d18
    +                $('#step2b').hide();
    590d18
    +            }
    590d18
    +            // else
    590d18
    +            // Firefox since version 40 has new extension signing policy
    590d18
    +            // this policy prevents to use self-signed FF extension and
    590d18
    +            // thus a manual config is needed - which is the default (step2b)
    590d18
    +
    590d18
    +            // else if (compare_version(version, '15') === -1) {
    590d18
     //                 $('#step2a').show();
    590d18
     //                 $('#older-compatible').show();
    590d18
     //                 $('#older-required').hide();
    590d18
    -- 
    590d18
    2.4.3
    590d18