2015-04-22 04:32:34 -04:00
|
|
|
"""Apache plugin constants."""
|
|
|
|
|
import pkg_resources
|
|
|
|
|
|
|
|
|
|
|
2015-06-01 20:14:10 -04:00
|
|
|
MOD_SSL_CONF_DEST = "options-ssl-apache.conf"
|
|
|
|
|
"""Name of the mod_ssl config file as saved in `IConfig.config_dir`."""
|
2015-04-22 04:32:34 -04:00
|
|
|
|
2017-05-23 19:25:39 -04:00
|
|
|
|
|
|
|
|
UPDATED_MOD_SSL_CONF_DIGEST = ".updated-options-ssl-apache-conf-digest.txt"
|
|
|
|
|
"""Name of the hash of the updated or informed mod_ssl_conf as saved in `IConfig.config_dir`."""
|
|
|
|
|
|
|
|
|
|
ALL_SSL_OPTIONS_HASHES = [
|
|
|
|
|
'2086bca02db48daf93468332543c60ac6acdb6f0b58c7bfdf578a5d47092f82a',
|
|
|
|
|
'4844d36c9a0f587172d9fa10f4f1c9518e3bcfa1947379f155e16a70a728c21a',
|
2017-06-01 12:12:50 -04:00
|
|
|
'5a922826719981c0a234b1fbcd495f3213e49d2519e845ea0748ba513044b65b',
|
|
|
|
|
'4066b90268c03c9ba0201068eaa39abbc02acf9558bb45a788b630eb85dadf27',
|
|
|
|
|
'f175e2e7c673bd88d0aff8220735f385f916142c44aa83b09f1df88dd4767a88',
|
|
|
|
|
'cfdd7c18d2025836ea3307399f509cfb1ebf2612c87dd600a65da2a8e2f2797b',
|
2018-01-09 10:46:21 -05:00
|
|
|
'80720bd171ccdc2e6b917ded340defae66919e4624962396b992b7218a561791',
|
|
|
|
|
'c0c022ea6b8a51ecc8f1003d0a04af6c3f2bc1c3ce506b3c2dfc1f11ef931082',
|
2017-05-23 19:25:39 -04:00
|
|
|
]
|
|
|
|
|
"""SHA256 hashes of the contents of previous versions of all versions of MOD_SSL_CONF_SRC"""
|
|
|
|
|
|
2015-11-04 15:12:39 -05:00
|
|
|
AUGEAS_LENS_DIR = pkg_resources.resource_filename(
|
2016-04-13 19:30:57 -04:00
|
|
|
"certbot_apache", "augeas_lens")
|
2015-11-04 15:12:39 -05:00
|
|
|
"""Path to the Augeas lens directory"""
|
2015-11-02 19:22:58 -05:00
|
|
|
|
2015-04-22 04:32:34 -04:00
|
|
|
REWRITE_HTTPS_ARGS = [
|
2017-03-02 19:49:34 -05:00
|
|
|
"^", "https://%{SERVER_NAME}%{REQUEST_URI}", "[L,NE,R=permanent]"]
|
2016-01-14 06:25:15 -05:00
|
|
|
"""Apache version<2.3.9 rewrite rule arguments used for redirections to
|
|
|
|
|
https vhost"""
|
2015-11-06 17:31:30 -05:00
|
|
|
|
2015-12-01 19:05:15 -05:00
|
|
|
REWRITE_HTTPS_ARGS_WITH_END = [
|
2017-03-02 19:49:34 -05:00
|
|
|
"^", "https://%{SERVER_NAME}%{REQUEST_URI}", "[END,NE,R=permanent]"]
|
2015-12-01 19:16:13 -05:00
|
|
|
"""Apache version >= 2.3.9 rewrite rule arguments used for redirections to
|
2015-12-01 19:05:15 -05:00
|
|
|
https vhost"""
|
2015-11-07 23:37:57 -05:00
|
|
|
|
2017-03-02 19:49:34 -05:00
|
|
|
OLD_REWRITE_HTTPS_ARGS = [
|
|
|
|
|
["^", "https://%{SERVER_NAME}%{REQUEST_URI}", "[L,QSA,R=permanent]"],
|
|
|
|
|
["^", "https://%{SERVER_NAME}%{REQUEST_URI}", "[END,QSA,R=permanent]"]]
|
|
|
|
|
|
2015-11-07 23:37:57 -05:00
|
|
|
HSTS_ARGS = ["always", "set", "Strict-Transport-Security",
|
2016-01-14 06:25:15 -05:00
|
|
|
"\"max-age=31536000\""]
|
2015-11-06 17:31:30 -05:00
|
|
|
"""Apache header arguments for HSTS"""
|
|
|
|
|
|
2015-11-07 23:37:57 -05:00
|
|
|
UIR_ARGS = ["always", "set", "Content-Security-Policy",
|
2016-01-14 06:25:15 -05:00
|
|
|
"upgrade-insecure-requests"]
|
2015-11-07 23:37:57 -05:00
|
|
|
|
2015-11-08 10:21:36 -05:00
|
|
|
HEADER_ARGS = {"Strict-Transport-Security": HSTS_ARGS,
|
2016-01-14 06:25:15 -05:00
|
|
|
"Upgrade-Insecure-Requests": UIR_ARGS}
|