Commit graph

239 commits

Author SHA1 Message Date
Brad Warren
f1b7017c0c Finish dropping Python 2.6 and 3.3 support
* Undo letsencrypt-auto changes

* Remove ordereddict import

* Add Python 3.4 tests to replace 3.3

* Add python_requires

* update pipstrap
2018-02-21 19:11:01 -08:00
Hugo
42638afc75 Drop support for EOL Python 2.6 and 3.3
* Drop support for EOL Python 2.6

* Use more helpful assertIn/NotIn instead of assertTrue/False

* Drop support for EOL Python 3.3

* Remove redundant Python 3.3 code

* Restore code for RHEL 6 and virtualenv for Py2.7

* Revert pipstrap.py to upstream

* Merge py26_packages and non_py26_packages into all_packages

* Revert changes to *-auto in root

* Update by calling letsencrypt-auto-source/build.py

* Revert permissions for pipstrap.py
2018-02-16 16:14:01 -08:00
Brad Warren
325a97c1ed Bump version to 0.22.0 2018-01-17 15:55:41 -08:00
Brad Warren
bf695d048d
Release 0.21.0 2018-01-17 15:55:29 -08:00
Jannis Leidel
2abc94661a Use josepy instead of acme.jose. (#5203) 2017-12-11 11:25:09 -08:00
Brad Warren
78d97ca023 Bump version to 0.21.0 2017-12-06 14:52:16 -08:00
Brad Warren
f1554324da
Release 0.20.0 2017-12-06 14:46:55 -08:00
Joona Hoikkala
dc78fd731e Distribution specific override functionality based on class inheritance (#5202)
Class inheritance based approach to distro specific overrides.

How it works:
The certbot-apache plugin entrypoint has been changed to entrypoint.ENTRYPOINT which is a variable containing appropriate override class for system, if available.

Override classes register themselves using decorator override.register() which takes a list of distribution fingerprints (ID & LIKE variables in /etc/os-release, or platform.linux_distribution() as a fallback). These end up as keys in dict override.OVERRIDE_CLASSES and values for the keys are references to the class that called the decorator, hence allowing self-registration of override classes when they are imported. The only file importing these override classes is entrypoint.py, so adding new override classes would need only one import in addition to the actual override class file.

Generic changes:

    Parser initialization has been moved to separate class method, allowing easy override where needed.
    Cleaned up configurator.py a bit, and moved some helper functions to newly created apache_util.py
    Split Debian specific code from configurator.py to debian_override.py
    Changed define_cmd to apache_cmd because the parameters are for every distribution supporting this behavior, and we're able to use the value to build the additional configuration dump commands.
    Moved add_parser_mod() from configurator to parser add_mod()
    Added two new configuration dump parsing methods to update_runtime_variables() in parser: update_includes() and update_modules().
    Changed init_modules() in parser to accommodate the changes above. (ie. don't throw existing self.modules out).
    Moved OS based constants to their respective override classes.
    Refactored configurator class discovery in tests to help easier test case creation using distribution based override configurator class.
    tests.util.get_apache_configurator() now takes keyword argument os_info which is string of the desired mock OS fingerprint response that's used for picking the right override class.

This PR includes two major generic additions that should vastly improve our parsing accuracy and quality:

    Includes are parsed from config dump from httpd binary. This is mandatory for some distributions (Like OpenSUSE) to get visibility over the whole configuration tree because of Include statements passed on in command line, and not via root httpd.conf file.
    Modules are parsed from config dump from httpd binary. This lets us jump into correct IfModule directives if for some reason we have missed the module availability (because of one being included on command line or such).

Distribution specific changes
Because of the generic changes, there are two distributions (or distribution families) that do not provide such functionality, so it had to be overridden in their respective override files. These distributions are:

    CentOS, because it deliberately limits httpd binary stdout using SELinux as a feature. We are doing opportunistic config dumps here however, in case SELinux enforcing is off.
    Gentoo, because it does not provide a way to invoke httpd with command line parsed from its specific configuration file. Gentoo relies heavily on Define statements that are passed over from APACHE2_OPTS variable /etc/conf.d/apache2 file and most of the configuration in root Apache configuration are dependent on these values.

Debian

    Moved the Debian specific parts from configurator.py to Debian specific override.

CentOS

    Parsing of /etc/sysconfig/httpd file for additional Define statements. This could hold other parameters too, but parsing everything off it would require a full Apache lexer. For CLI parameters, I think Defines are the most common ones. This is done in addition of opportunistic parsing of httpd binary config dump.
    Added CentOS default Apache configuration tree for realistic test cases.

Gentoo

    Parsing Defines from /etc/conf.d/apache2 variable APACHE2_OPTS, which holds additional Define statements to enable certain functionalities, enabling parts of the configuration in the Apache2 DOM. This is done instead of trying to parse httpd binary configuration dumps.
    Added default Apache configuration from Gentoo to testdata, including /etc/conf.d/apache2 file for realistic test cases.


* Distribution specific override functionality based on class inheritance

* Need to patch get_systemd_os_like to as travis has proper os-release

* Added pydoc

* Move parser initialization to a method and fix Python 3 __new__ errors

* Parser changes to parse HTTPD config

* Try to get modules and includes from httpd process for better visibility over the configuration

* Had to disable duplicate-code because of test setup (PyCQA/pylint/issues/214)

* CentOS tests and linter fixes

* Gentoo override, tests and linter fixes

* Mock the process call in all the tests that require it

* Fix CentOS test mock

* Restore reseting modules list functionality for cleanup

* Move OS fingerprinting and constant mocks to parent class

* Fixes requested in review

* New entrypoint structure and started moving OS constants to override classes

* OS constants move continued, test and linter fixes

* Removed dead code

* Apache compatibility test changest to reflect OS constant restructure

* Test fix

* Requested changes

* Moved Debian specific tests to own test file

* Removed decorator based override class registration in favor of entrypoint dict

* Fix for update_includes for some versions of Augeas

* Take fedora fix into account in tests

* Review fixes
2017-12-04 11:49:18 -08:00
Brad Warren
13b4a4e1c2 Bump version to 0.20.0 2017-10-04 15:57:16 -07:00
Brad Warren
1f258449a4
Release 0.19.0 2017-10-04 12:11:20 -07:00
Brad Warren
a7267b0fcd Bump version to 0.19.0 2017-09-05 16:07:03 -07:00
Brad Warren
756c44f7af
Release 0.18.0 2017-09-05 16:06:43 -07:00
Brad Warren
6c52cc49a7 Pin dependencies in compatibility tests. (#5004)
We now use tools/pip_install_editable.sh which installs our packages using the
pinned versions from certbot-auto.

We also use letsencrypt-auto-source/letsencrypt-auto instead of certbot-auto in
the root to:

1. Make sure OS bootstrappers are up to date with master.
2. Copy letsencrypt-auto-source into our tree so it can be used by
tools/pip_install_editable.sh later.
2017-08-08 15:31:41 -07:00
Brad Warren
744c993040 Bump version to 0.18.0 2017-08-01 17:01:19 -07:00
Brad Warren
912d235466
Release 0.17.0 2017-08-01 17:01:07 -07:00
Brad Warren
c779be8b88 Merge pull request #4863 from certbot/bmw-nginx-compatibility-tests
Nginx compatibility test
2017-07-17 14:32:39 -07:00
ohemorange
57e56cc97b Candidate 0.16.0 (#4908)
* Release 0.16.0

* Bump version to 0.17.0
2017-07-06 15:57:11 -07:00
Brad Warren
6aa21d1db6 Fix and speed up compatibility-tests
* Fix nginx-compatibility tests

* sleep is overrated

* Reduce verbosity of nginx tests
2017-06-21 13:29:00 -07:00
Erica Portnoy
15c6c1388e Have validator only test domains without existing redirects 2017-06-20 17:15:00 -07:00
Seth Schoen
be457ffa95 Test more in nginx compatibility tests
* Highlight failures more with asterisks

* Filter out wildcard names from all_names

* Only test -ai, not -aie (no redirects)

* Modified versions of almost all of 79 configs corpus

* Re-enable now-working stanza with 301 redirect

* Change another redirect to go to :443
2017-06-20 17:14:22 -07:00
Brad Warren
0aab244846 Bump version to 0.16.0 2017-06-08 09:32:57 -07:00
Brad Warren
74acd1ee5a
Release 0.15.0 2017-06-08 09:32:41 -07:00
Brad Warren
2754a2d0ae Bump version to 0.15.0 2017-05-04 16:52:29 -07:00
Brad Warren
4be7efbf74
Release 0.14.0 2017-05-04 16:52:13 -07:00
Brad Warren
8fa12bef8e Tell the world we're Python 3 compatible (#4568)
* Mention python 3 support in setup.py

* Build universal (py2 and py3 compatible) wheels

* Mention Python 3.3+ support in docs

* we work on python 3.6 too
2017-04-28 16:06:45 -07:00
Erica Portnoy
82f3f7523e Candidate 0.13.0 (#4475)
* Release 0.13.0

* Bump version to 0.14.0
2017-04-06 11:33:32 -07:00
Erica Portnoy
7be2e79025 Fix nginx parser (#4296)
* rewrite nginx parser to allow everything that nginx does

* also make changes in tls_sni_01.py

* add test case with

* allow embedded variables

* allow empty ${} variable

* fix quotes

* un-special case if

* update all tests to reflect current parsing

* escape in QuotedString after merge

* add test cases for variable weirdness that are almost certainly nginx bugs

* update regex for correct variable rules

* close paren doesn't invoke last_space

* Make test file valid Nginx syntax
2017-03-24 19:45:53 -07:00
dokazaki
8011fb2879 Add mypy (#4386)
* Initial configuration of mypy in box, correction of base mypy errors.

* Move mypy install to toe

* Add pylint comments for typing imports.

* Remove typing module for Python 2.6 compatibility.
2017-03-18 19:10:10 -07:00
Brad Warren
662c323b55 Build wheels correctly for Python 2.6 (#4313)
* stop conditionally pinning mock version in acme

* stop conditionally pinning mock version in certbot

* stop conditionally pinning mock version in apache

* stop conditionally pinning mock version in nginx

* stop conditionally pinning mock version in letshelp

* stop conditionally pinning mock version in compatibility-test
2017-03-10 10:58:03 -08:00
Erica Portnoy
5e671682ca Candidate 0.12.0 (#4286)
* Release 0.12.0

* Bump version to 0.13.0
2017-03-02 15:26:24 -08:00
Brad Warren
a6b51f1edd Bump version to 0.12.0 2017-02-01 09:50:57 -08:00
Brad Warren
30bc68ccde
Release 0.11.0 2017-02-01 09:50:42 -08:00
Amjad Mashaal
1fd847e216 Adding checking name validity to the Apache plugin (#3639) 2017-02-01 07:12:51 -08:00
Josh Soref
6a39a42f45 Spelling (#4101)
* spelling: action

* spelling: artifacts

* spelling: asymmetric

* spelling: attempts

* spelling: bizarre

* spelling: certbot

* spelling: certificate

* spelling: certainly

* spelling: challenge

* spelling: client

* spelling: collated

* spelling: correct

* spelling: considered

* spelling: custom

* spelling: distinguish

* spelling: encoding

* spelling: enhancement

* spelling: equivalent

* spelling: execution

* spelling: existence

* spelling: failed

* spelling: handshake

* spelling: hyphen

* spelling: initialized

* spelling: initialization

* spelling: interpretation

* spelling: letsencrypt

* spelling: multiline

* spelling: multipart

* spelling: necessary

* spelling: otherwise

* spelling: output

* spelling: overridden

* spelling: positives

* spelling: preferable

* spelling: progress

* spelling: recommended

* spelling: referring

* spelling: relativity

* spelling: request

* spelling: requiring

* spelling: separate

* spelling: source

* spelling: specified

* spelling: standard

* spelling: successfully

* spelling: unparseable

* spelling: useful
2017-01-26 16:21:54 -08:00
Brad Warren
bb669528b3 Remove old references to pep8 in our code (#4073) 2017-01-19 11:21:25 -08:00
Brad Warren
16ed5bdd47 encode to bytes as necessary in Validator.certificate (#4026) 2017-01-17 12:13:10 -08:00
Brad Warren
364a6d8a2d Release 0.10.0 (#4022)
* Release 0.10.0

* Bump version to 0.11.0
2017-01-11 12:01:33 -08:00
Brad Warren
30dd22f2f8 No doc,dev depedencies for compatibility-test (#3722) 2016-10-31 18:30:02 -07:00
Brad Warren
76a92d4cde Release Certbot 0.9.0 (#3583)
* Release 0.9.0

* Bump version to 0.10.0
2016-10-05 10:13:28 -07:00
Erica Portnoy
5fda61f271 Allow validation of cross-domain redirects (#3561)
* Update compatibility validator to pass redirect check when redirecting to a different domain, whether http or https.
2016-09-29 15:31:13 -07:00
Brad Warren
1f471da768 Remove code duplication to make pylint happy 2016-08-10 17:39:29 -07:00
Seth Schoen
4bbb12f182 Satisfying some lint complaints 2016-08-10 17:16:54 -07:00
Brad Warren
07b85f9f90 Make testdata the CWD of compatibility test dockerfiles 2016-08-10 16:32:38 -07:00
Brad Warren
0edb1f6792 Add certbot-compatibility-test Dockerfiles 2016-08-10 16:08:30 -07:00
Brad Warren
a76c36bf12 Remove old Dockerfiles 2016-08-10 15:52:33 -07:00
Brad Warren
2d099680d0 Rename apache compatibility test tarball 2016-08-10 15:39:59 -07:00
Brad Warren
4c596311b0 Add nginx compatibility test data tarball 2016-08-10 15:39:35 -07:00
Seth Schoen
595e515518 Restart web servers before beginning tests 2016-08-10 14:57:44 -07:00
Seth Schoen
6e86c71259 Provide a copy of the self-signed cert as the fullchain as well 2016-08-08 18:03:07 -07:00
Seth Schoen
7d27c1f500 More correct parsing of lines containing trailing space 2016-08-08 17:51:55 -07:00
Seth Schoen
d41ceff86d Various WIP on nginx compatibility test 2016-08-08 17:24:54 -07:00
Seth Schoen
2cd2228ca6 starts_with is actually called startswith 2016-08-05 15:07:35 -07:00
Seth Schoen
353cb6e6c6 New _get_names approach for nginx test 2016-08-03 17:10:20 -07:00
Seth Schoen
7b67ba6797 Remove unused Apache-related variables 2016-07-29 17:14:23 -07:00
Seth Schoen
89f576babb Primarily simple s/apache/nginx/ and the like 2016-07-29 16:51:33 -07:00
Ville Skyttä
c7b89c334b Use logger.warning instead of deprecated warn 2016-07-22 09:54:28 +03:00
Seth Schoen
557d2e80d3 Test case from https://github.com/certbot/certbot/pull/3230#issuecomment-231546594 2016-07-13 15:37:44 -07:00
Seth Schoen
70a4d111ba Leading-space version from original pythonfcgi page 2016-07-13 12:34:12 -07:00
Seth Schoen
7f27ccd941 Test cases from upstream parser project issues 2016-07-13 12:16:16 -07:00
Seth Schoen
b48ddac528 Initial version of nginx parser roundtrip test 2016-07-11 13:58:21 -07:00
schoen
42f6f5174b Merge pull request #3138 from certbot/removing_proxy
Remove proxy in certbot-compatibility-test
2016-06-10 18:23:32 -07:00
Brad Warren
96dd662e55 Delint certbot-compatibility-test 2016-06-08 14:35:59 -07:00
Brad Warren
bd232fb85a Merge branch 'removing_proxy' of github.com:certbot/certbot into removing_proxy 2016-06-06 14:53:35 -07:00
Brad Warren
ce378cec21 Try updating tarball again 2016-06-06 14:53:12 -07:00
Seth Schoen
5f8964a6a8 Fix typo 2016-06-06 14:48:49 -07:00
Brad Warren
1c1816fb4a Update tarball 2016-06-06 14:35:28 -07:00
Brad Warren
8723bded72 Add extra saves for apache plugin 2016-06-06 14:17:11 -07:00
Seth Schoen
144dbdd90b Explain whether tests succeeded or failed overall 2016-06-06 12:23:15 -07:00
Brad Warren
4b79206d89 Merge branch 'removing_proxy' of github.com:certbot/certbot into removing_proxy 2016-06-06 12:09:24 -07:00
Brad Warren
e1f4e22c6d Unwrap achall 2016-06-06 12:09:17 -07:00
Seth Schoen
e0bb04fd25 Forgot to import shutil 2016-06-06 12:02:53 -07:00
Seth Schoen
1d3fbe945d Copy config into /etc/apache2 2016-06-06 12:01:55 -07:00
Brad Warren
78ea886a79 Fix deploy cert and TLSSNI check 2016-06-06 11:49:36 -07:00
Seth Schoen
c79924b771 Work in progress on removing_proxy 2016-06-03 16:35:10 -07:00
Seth Schoen
81cda2903a Attempt at putting everything inside Docker 2016-06-03 15:30:20 -07:00
Brad Warren
36e63a7372 Bump version to 0.9.0 2016-06-02 13:50:37 -07:00
Brad Warren
dcadcf8d42
Release 0.8.0 2016-06-02 13:50:30 -07:00
Peter Eckersley
61e0e3cc83 Merge pull request #3073 from cowlicks/rename-le-util
Rename certbot.le_util to certbot.util
2016-05-27 14:37:36 -07:00
Brad Warren
7153220b41 Bump version to 0.8.0 2016-05-27 13:30:54 -07:00
Brad Warren
46d8f6e18c
Release 0.7.0 2016-05-27 13:30:46 -07:00
Blake Griffith
b05258243a More le_util in docs and compatibility tests 2016-05-26 15:57:50 -05:00
Brad Warren
c8cf0b4600 Bump version to 0.7.0 2016-05-11 18:04:27 -07:00
Brad Warren
8e742fa3c6
Release 0.6.0 2016-05-11 18:04:15 -07:00
Noah Swartz
144f28690b added new docs links 2016-05-04 17:03:52 -07:00
Brad Warren
75a1d81458 More stray ncrypt reference cleanup 2016-04-14 17:04:23 -07:00
Brad Warren
b956a968c6 this commit was authored by the Certbot Project 2016-04-14 16:56:02 -07:00
Brad Warren
ae6f1c62f1 Rename misc files 2016-04-14 10:20:23 -07:00
Brad Warren
0ce45a77f9 s/Let's Encrypt/Certbot certbot-compatibility-test 2016-04-13 16:59:37 -07:00
Brad Warren
4fab8751b2 s/letsencrypt/certbot letsencrypt-compatibility-test 2016-04-13 16:58:21 -07:00