-
Notifications
You must be signed in to change notification settings - Fork 98
Description
I use an Apache reverse proxy to provide TLS and (basic) authentication for my OpenSprinkler setup. The same Apache server also hosts the web UI files (in a different virtual server).
When I access the OpenSprinkler web UI from Firefox, I am first asked to authenticate. After I do that successfully, I am presented with the OpenSprinkler UI page, which endlessly crashes and reloads. The Firefox debugger shows this error message.
Uncaught (in promise) DOMException: The operation is insecure
It claims that the error is occurring at js/jqm.js:3
, but that isn't useful, as that line is more than 32,000 characters long. After replacing jqm.js
with a "beautified" version, the Firefox debugger no longer gives me a location for the exception.
There are no failed network requests. (I had to add a couple of symlinks within the UI content tree to make Firefox's built-in favicon loader happy.)
Here is the Apache configuration for the reverse proxy.
<VirtualHost 172.31.255.2:443>
ServerName sprinklers.penurio.us
ServerAlias sprinklers
ErrorLog /etc/httpd/logs/sprinklers_error_log
TransferLog /etc/httpd/logs/sprinklers_access_log
LogLevel info
SSLEngine on
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLHonorCipherOrder on
SSLCipherSuite PROFILE=SYSTEM
SSLProxyCipherSuite PROFILE=SYSTEM
SSLCertificateFile /etc/pki/tls/certs/sprinklers.penurio.us.crt
SSLCertificateKeyFile /etc/pki/tls/private/sprinklers.penurio.us/sprinklers.penurio.us.key
<Location />
AuthType Basic
AuthBasicProvider ldap
AuthName OpenSprinkler
AuthLDAPUrl ldap://127.0.0.1/cn=users,cn=accounts,dc=penurio,dc=us?uid
AuthLDAPCompareAsUser on
Require ldap-group cn=sprinklers,cn=groups,cn=accounts,dc=penurio,dc=us
ProxyPass http://172.31.252.3/ timeout=1200
ProxyPassReverse http://172.31.252.3/
Header always set Access-Control-Allow-Origin https://osp-ui.penurio.us
Header always set Access-Control-Allow-Credentials: true
</Location>
</VirtualHost>
And here is the Apache configuration for the UI content.
<VirtualHost 172.31.255.2:443>
ServerName osp-ui.penurio.us
ServerAlias osp-ui
DocumentRoot /var/www/opensprinkler
ErrorLog /etc/httpd/logs/sprinklers_error_log
TransferLog /etc/httpd/logs/sprinklers_access_log
LogLevel info
SSLEngine on
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLHonorCipherOrder on
SSLCipherSuite PROFILE=SYSTEM
SSLProxyCipherSuite PROFILE=SYSTEM
SSLCertificateFile /etc/pki/tls/certs/osp-ui.penurio.us.crt
SSLCertificateKeyFile /etc/pki/tls/private/osp-ui.penurio.us/osp-ui.penurio.us.key
# This stuff is from the OpenSprinkler documentation
#Header set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Origin https://sprinklers.penurio.us
Header always set Access-Control-Allow-Credentials: true
AddEncoding x-gzip .cgz .jgz
AddType text/css cgz
AddType text/javascript jgz
</VirtualHost>
This issue does not occur in Google Chrome, but it seems that it is likely CORS-related, so whatever restriction is breaking the UI in Firefox today will probably come to Chrome at some point. This issue may also have the same root cause as this issue, which prevents the Android app from working with TLS and authentication.