diff options
author | Martin Basti <mbasti@redhat.com> | 2015-10-27 15:36:55 +0100 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2015-11-13 14:02:45 +0100 |
commit | 19044e87ac54200b7710b8ec5405175c3d749e76 (patch) | |
tree | a0d316d525d2407215bdf3d3c5381de08b3ffe01 | |
parent | b0faf30eac6b75267923fac59ef0728d763d29fe (diff) | |
download | freeipa-19044e87ac54200b7710b8ec5405175c3d749e76.tar.gz freeipa-19044e87ac54200b7710b8ec5405175c3d749e76.tar.xz freeipa-19044e87ac54200b7710b8ec5405175c3d749e76.zip |
Drop configure.jar
Configure.jar used to be used with firefox version < 10 which is not
supported anymore, thus this can be removed.
https://fedorahosted.org/freeipa/ticket/5144
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
-rw-r--r-- | freeipa.spec.in | 4 | ||||
-rw-r--r-- | install/html/ssbrowser.html | 25 | ||||
-rw-r--r-- | install/share/Makefile.am | 1 | ||||
-rw-r--r-- | install/share/preferences.html.template | 90 | ||||
-rw-r--r-- | ipaplatform/base/paths.py | 2 | ||||
-rw-r--r-- | ipaserver/install/httpinstance.py | 26 | ||||
-rw-r--r-- | ipaserver/install/ipa_replica_prepare.py | 6 | ||||
-rw-r--r-- | ipaserver/install/server/replicainstall.py | 12 |
8 files changed, 3 insertions, 163 deletions
diff --git a/freeipa.spec.in b/freeipa.spec.in index c3ca3413f..f605f653a 100644 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -473,13 +473,11 @@ mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d/ /bin/touch %{buildroot}%{_sysconfdir}/httpd/conf.d/ipa-rewrite.conf mkdir -p %{buildroot}%{_usr}/share/ipa/html/ /bin/touch %{buildroot}%{_usr}/share/ipa/html/ca.crt -/bin/touch %{buildroot}%{_usr}/share/ipa/html/configure.jar /bin/touch %{buildroot}%{_usr}/share/ipa/html/kerberosauth.xpi /bin/touch %{buildroot}%{_usr}/share/ipa/html/krb.con /bin/touch %{buildroot}%{_usr}/share/ipa/html/krb.js /bin/touch %{buildroot}%{_usr}/share/ipa/html/krb5.ini /bin/touch %{buildroot}%{_usr}/share/ipa/html/krbrealm.con -/bin/touch %{buildroot}%{_usr}/share/ipa/html/preferences.html mkdir -p %{buildroot}%{_initrddir} mkdir %{buildroot}%{_sysconfdir}/sysconfig/ install -m 644 init/ipa_memcached.conf %{buildroot}%{_sysconfdir}/sysconfig/ipa_memcached @@ -840,13 +838,11 @@ fi %{_usr}/share/ipa/ipa-pki-proxy.conf %{_usr}/share/ipa/kdcproxy.conf %ghost %attr(0644,root,apache) %config(noreplace) %{_usr}/share/ipa/html/ca.crt -%ghost %attr(0644,root,apache) %{_usr}/share/ipa/html/configure.jar %ghost %attr(0644,root,apache) %{_usr}/share/ipa/html/kerberosauth.xpi %ghost %attr(0644,root,apache) %{_usr}/share/ipa/html/krb.con %ghost %attr(0644,root,apache) %{_usr}/share/ipa/html/krb.js %ghost %attr(0644,root,apache) %{_usr}/share/ipa/html/krb5.ini %ghost %attr(0644,root,apache) %{_usr}/share/ipa/html/krbrealm.con -%ghost %attr(0644,root,apache) %{_usr}/share/ipa/html/preferences.html %dir %{_usr}/share/ipa/updates/ %{_usr}/share/ipa/updates/* %attr(755,root,root) %{plugin_dir}/libipa_pwd_extop.so diff --git a/install/html/ssbrowser.html b/install/html/ssbrowser.html index b88deac90..325c2d393 100644 --- a/install/html/ssbrowser.html +++ b/install/html/ssbrowser.html @@ -10,18 +10,6 @@ $(document).ready(function() { var domain = '.' + (IPA_DOMAIN || 'example.com'); $('.example-domain').text(domain); - - var browser = IPA.browser_config.get_browser(); - if (browser.mozilla) { - var ff_config = $("#configurefirefox"); - var obj = $('<object/>', { - type: 'text/html', - 'class': 'browser-config' - }); - obj.prop('data', 'jar:/ipa/errors/configure.jar!/preferences.html'); - obj.appendTo(ff_config); - ff_config.show(); - } }); } @@ -63,6 +51,9 @@ <ol> <li> + Import <a href="ca.crt">CA certificate</a>. Make sure you checked all three checkboxes. + </li> + <li> In the address bar of Firefox, type <code>about:config</code> to display the list of current configuration options. </li> <li> @@ -77,16 +68,6 @@ <li><strong> You are all set. </strong></li> </ol> - <h3>Automatic Configuration of older versions</h3> - <p>You can configure older versions of Firefox (up to version 14) using signed code. Use <a href="browserconfig.html">Firefox configuration page</a> for newer versions.</p> - <ol> - <li>Import <a href="ca.crt">CA certificate</a>. Make sure you checked all three checkboxes.</li> - <li> - Click on "Configure Browser" button below. - <div id="configurefirefox" style="display:none"></div> - </li> - </ol> - <h2>Chrome</h2> <p> diff --git a/install/share/Makefile.am b/install/share/Makefile.am index 7dae55fdb..92508a9ba 100644 --- a/install/share/Makefile.am +++ b/install/share/Makefile.am @@ -54,7 +54,6 @@ app_DATA = \ krb.con.template \ krb.js.template \ krbrealm.con.template \ - preferences.html.template \ smb.conf.template \ smb.conf.empty \ referint-conf.ldif \ diff --git a/install/share/preferences.html.template b/install/share/preferences.html.template deleted file mode 100644 index 48bcc42bc..000000000 --- a/install/share/preferences.html.template +++ /dev/null @@ -1,90 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> - <title>Automatically set browser preferences</title> - <style type="text/css"> - body { - font-family:"Liberation Sans",Arial,Sans; - font-size:11px; - } - .textblock { - text-align: left; - margin-top: 1.0em; - font-size: 1.1em; - } - a { - color: #1D85D5; - font-weight: normal; - text-decoration: none; - text-transform: none; - } - </style> -</head> -<body> -<form action="undefined" method="get"> -<input id="button" type=button onclick="setPreferences()" name="prefs" value="Configure Firefox"> -<div id="success" class="textblock" style="display: none;"> - <p>Browser configured.</p> - <p> - <a href="/ipa/ui" id="redirect_link" target="_top">Click here to return to the Web UI.</a> - </p> -</div> -</form> - -<script type="text/javascript"> - function setPreferences() { - var privilege, setIntPref, setCharPref, setBoolPref; - - if (typeof navigator.preference == 'undefined') { - // From Firefox 4 and SeaMonkey 2.1, navigator.preference intefrace is dropped - // Use new Gecko2 Services.jsm JavaScript code module instead. - privilege = 'UniversalXPConnect'; - netscape.security.PrivilegeManager.enablePrivilege(privilege); - Components.utils.import("resource://gre/modules/Services.jsm"); - - setIntPref = function(par, val) {Services.prefs.setIntPref(par, val)}; - setCharPref = function(par, val) {Services.prefs.setCharPref(par, val)}; - setBoolPref = function(par, val) {Services.prefs.setBoolPref(par, val)}; - } else { - privilege = 'UniversalPreferencesWrite'; - netscape.security.PrivilegeManager.enablePrivilege(privilege); - setCharPref = function(par, val) {navigator.preference(par, val)}; - setBoolPref = setCharPref; // same function for bool and char and int - setIntPref = setCharPref; - } - - try { - - try { - setIntPref('network.http.sendRefererHeader', 2); - setBoolPref('network.negotiate-auth.using-native-gsslib', true); - setCharPref('network.negotiate-auth.trusted-uris', '.$DOMAIN'); - setBoolPref('network.negotiate-auth.allow-proxies', true); - } catch (e) { - alert("Unable to store preferences: " + e); - return; - } - - netscape.security.PrivilegeManager.disablePrivilege(privilege); - - alert("Successfully configured Firefox for single sign-on."); - - var redirect_link = document.getElementById('redirect_link'); - redirect_link.href = "https://" + location.hostname + location.port + "/ipa/ui"; - - var button = document.getElementById('button'); - button.style['display'] = "none"; - - var successDiv = document.getElementById('success'); - successDiv.style['display'] = "block"; - } catch (e) { - alert("Unable to apply recommended settings.\n\n" + - "Click on the Certificate Authority link and select trust for all, " + - "then reload this page and try again.\n\nThe error returned was: " + e); - return; - } - } -</script> - -</body> -</html> diff --git a/ipaplatform/base/paths.py b/ipaplatform/base/paths.py index 74d7a7d97..6686bf07e 100644 --- a/ipaplatform/base/paths.py +++ b/ipaplatform/base/paths.py @@ -241,13 +241,11 @@ class BasePathNamespace(object): FFEXTENSION = "/usr/share/ipa/ffextension" IPA_HTML_DIR = "/usr/share/ipa/html" CA_CRT = "/usr/share/ipa/html/ca.crt" - CONFIGURE_JAR = "/usr/share/ipa/html/configure.jar" KERBEROSAUTH_XPI = "/usr/share/ipa/html/kerberosauth.xpi" KRB_CON = "/usr/share/ipa/html/krb.con" KRB_JS = "/usr/share/ipa/html/krb.js" HTML_KRB5_INI = "/usr/share/ipa/html/krb5.ini" HTML_KRBREALM_CON = "/usr/share/ipa/html/krbrealm.con" - PREFERENCES_HTML = "/usr/share/ipa/html/preferences.html" NIS_ULDIF = "/usr/share/ipa/nis.uldif" IPA_PLUGINS = "/usr/share/ipa/plugins" SCHEMA_COMPAT_ULDIF = "/usr/share/ipa/schema_compat.uldif" diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py index 305627031..b7a15702a 100644 --- a/ipaserver/install/httpinstance.py +++ b/ipaserver/install/httpinstance.py @@ -346,32 +346,6 @@ class HTTPInstance(service.Service): self.import_ca_certs(db, self.ca_is_configured) def __setup_autoconfig(self): - target_fname = paths.PREFERENCES_HTML - ipautil.copy_template_file( - ipautil.SHARE_DIR + "preferences.html.template", - target_fname, self.sub_dict) - os.chmod(target_fname, 0o644) - - # The signing cert is generated in __setup_ssl - db = certs.CertDB(self.realm, subject_base=self.subject_base) - with open(db.passwd_fname) as pwdfile: - pwd = pwdfile.read() - - # Setup configure.jar - if db.has_nickname('Signing-Cert'): - tmpdir = tempfile.mkdtemp(prefix="tmp-") - target_fname = paths.CONFIGURE_JAR - shutil.copy(paths.PREFERENCES_HTML, tmpdir) - db.run_signtool(["-k", "Signing-Cert", - "-Z", target_fname, - "-e", ".html", "-p", pwd, - tmpdir]) - shutil.rmtree(tmpdir) - os.chmod(target_fname, 0o644) - else: - root_logger.warning('Object-signing certificate was not found; ' - 'therefore, configure.jar was not created.') - self.setup_firefox_extension(self.realm, self.domain) def setup_firefox_extension(self, realm, domain): diff --git a/ipaserver/install/ipa_replica_prepare.py b/ipaserver/install/ipa_replica_prepare.py index 327deed77..552103223 100644 --- a/ipaserver/install/ipa_replica_prepare.py +++ b/ipaserver/install/ipa_replica_prepare.py @@ -456,12 +456,6 @@ class ReplicaPrepare(admintool.AdminTool): self.log.info("Copying additional files") self.copy_info_file(CACERT, "ca.crt") - preferences_filename = paths.PREFERENCES_HTML - if ipautil.file_exists(preferences_filename): - self.copy_info_file(preferences_filename, "preferences.html") - jar_filename = paths.CONFIGURE_JAR - if ipautil.file_exists(jar_filename): - self.copy_info_file(jar_filename, "configure.jar") cacert_filename = paths.CACERT_PEM if ipautil.file_exists(cacert_filename): self.copy_info_file(cacert_filename, "cacert.pem") diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py index b01df9526..5ce9eb709 100644 --- a/ipaserver/install/server/replicainstall.py +++ b/ipaserver/install/server/replicainstall.py @@ -163,18 +163,6 @@ def install_http(config, auto_redirect, promote=False): ca_is_configured=ipautil.file_exists(config.dir + "/cacert.p12"), promote=promote) - # Now copy the autoconfiguration files - try: - if ipautil.file_exists(config.dir + "/preferences.html"): - shutil.copy(config.dir + "/preferences.html", - paths.PREFERENCES_HTML) - if ipautil.file_exists(config.dir + "/configure.jar"): - shutil.copy(config.dir + "/configure.jar", - paths.CONFIGURE_JAR) - except Exception as e: - print("error copying files: " + str(e)) - sys.exit(1) - http.setup_firefox_extension(config.realm_name, config.domain_name) return http |