Commit Graph
8203 Commits
Author SHA1 Message Date
Sydney Li 4ba153949d Fixing up postfix plugin
- Finishing refactor of postconf/postfix command-line utilities
 - Plugin uses starttls_policy plugin to specify per-domain policies

Cleaning up TLS policy code.

Print warning when setting configuration parameter that is overridden by master.

Update client to use new policy API

Cleanup and test fixes

Documentation fix

smaller fixes

Policy is now an enhancement and reverting works

Added a README, and small documentation fixes throughout

Moving testing infra from starttls repo to certbot-postfix

fixing tests and lint

Changes against new policy API

starttls-everywhere => starttls-policy

testing(postfix): Added more varieties of certificates to test against.

Moar fixes against policy API.

Address comments on README and setup.py

Address small comments on postconf and util

Address comments in installer

Python 3 fixes and Postconf tester extends TempDir test class

Mock out postconf calls from tests and test coverage for master overrides

More various fixes. Everything minus testing done

Remove STARTTLS policy enhancement from this branch.

sphinx quickstart

99% test coverage

some cleanup and testfixing

cleanup leftover files

Remove print statement

testfix for python 3.4

Revert dockerfile change

mypy fix

fix(postfix): brad's comments

test(postfix): coverage to 100

test(postfix): mypy

import mypy types

fix(postfix docs): add .rst files and fix build

fix(postfix): tls_only and server_only params behave nicely together

some cleanup

lint

fix more comments

bump version number
2018-06-15 15:46:55 -07:00
Brad Warrenandsydneyli 5025b4ea96 Add certbot-postfix to tools
pep8ify

Delint

cover++

test more_info()

Refactor get_config_var

Don't duplicate changes to Postfix config

document instance variables

Always clear save_notes on save

Test deploy_cert and save and add MockPostfix.

Move mock and call to InstallerTest

Add getters and setters

Use postfix getters and setters

protect get_config_var

bump cover to 100%

bump required coverage to 100

s/config_dir/config_utility

Decrease minimum version to Postfix 2.6.

This is the minimum version that allows us to set ciphers to be used with
opportunistic TLS and is the oldest version packaged in any major distro.

Use tls_security_level instead of use_tls.

smtpd_tls_security_level should be used instead according to Postfix documentation.

Test smtpd_tls_security_level conditional

make dunder method an under method

refactor postconf usage

add check_all_output

test check_all_output

Add and test verify_exe_exists

Add PostfixUtilBase

Add ReadOnlyMainMap

Use _get_output instead of _call

Fix split strip typo
2018-06-15 15:46:48 -07:00
Brad Warren 66953435c9 Merge remote-tracking branch 'starttls-everywhere/certbotify' into postfix 2017-08-29 10:44:07 -07:00
Brad Warren dde0bf0821 Remove non-plugin files 2017-08-29 10:42:31 -07:00
Brad Warren 142bc33545 Remove dead code 2017-08-29 10:38:53 -07:00
Brad Warren a339de80f4 Add save() 2017-08-28 17:17:29 -07:00
Brad Warrenandohemorange ae0be73b53 Make common Installer base class (#5055)
* Add installer class

* Add wrapped reverter methods to common.Installer.

* Use Installer class in Apache plugin

* Use Installer class in Nginx plugin

* Don't create reverter in Apache and Nginx plugins
2017-08-28 17:06:09 -07:00
Brad Warren d663f7981a Add _write_config_changes 2017-08-28 15:24:51 -07:00
Brad Warren 72637b2cf6 Add util.check_call 2017-08-28 15:20:22 -07:00
Brad Warren d0ea5958f9 Protect _set_config_var 2017-08-28 14:54:53 -07:00
Brad Warren 4805fb4b88 Add deploy_cert 2017-08-28 14:52:05 -07:00
Brad Warren 11b820c0e4 add set_config_var 2017-08-28 14:41:07 -07:00
Noah SwartzandGitHub 8d362d4469 Merge pull request #5029 from certbot/issue_4792
expand nginx no name error
2017-08-28 14:04:56 -07:00
Ted MaryniczandBrad Warren 133f636817 Update install.rst (#5057)
Minor typo fix in VE para
2017-08-28 11:59:08 -07:00
Noah SwartzandGitHub df71ec33b3 switch from triple quotes to single quotes 2017-08-28 13:45:42 -05:00
Brad Warren b21b66c0c0 Test restart command. 2017-08-25 14:29:50 -07:00
Brad Warren 218e15c9d4 Make restart() more robust. 2017-08-25 14:25:22 -07:00
Brad Warren a6c08a2e25 Update prepare docstring. 2017-08-25 14:03:29 -07:00
Brad Warren 68dc678eed Call config_test in prepare 2017-08-25 14:02:57 -07:00
Brad Warren 5f3be9b1cf test config_test failure 2017-08-25 13:58:45 -07:00
Brad Warren 2ae187b1d6 Update config_test method 2017-08-25 13:55:21 -07:00
Brad Warren b4b5c44750 Check postfix executable is found. 2017-08-25 13:38:07 -07:00
Brad Warren a29a99fb6f Add --postfix-ctl flag. 2017-08-25 13:34:03 -07:00
Brad Warren 0f4c5c2305 Use common installer base 2017-08-25 11:41:30 -07:00
Josh SorefandBrad Warren b2b3285bf5 Add the word instead to renew error (#5053)
Closes #4118
2017-08-25 10:25:59 -07:00
r5dandBrad Warren b43bf8f94a Stop using print in certbot.cli module. (#5028)
* Update cerbot.tests.util.patch_get_utility (#3720)

* Add new arg `stdout_notification` to
  `cerbot.tests.util.patch_get_utility` function.

  If `stdout_notification` is True, then the mock
  interfaces.IDisplay.notification function will print out to stdout.

* Add new arg `stdout_notification` to _create_get_utility_mock
  function.

* Add new function `_stdout_notification`.

* Stop using print in certbot.cli (#3720)

* certbot/cli.py (HelpfulArgumentParser._usage_string)
(HelpfulArgumentParser.__init__): Update methods.
* certbot/tests/cli_test.py (test_cli_ini_domains, test_no_args)
(test_install_abspath, test_help, test_help_no_dashes)
(test_parse_domains, test_preferred_challenges, test_server_flag)
(test_must_staple_flag, test_no_gui, test_staging_flag)
(test_dry_run_flag, test_option_was_set)
(test_encode_revocation_reason, test_force_interactive)
(test_deploy_hook_conflict, test_deploy_hook_matches_renew_hook)
(test_deploy_hook_sets_renew_hook, test_renew_hook_conflict)
(test_renew_hook_matches_deploy_hook)
(test_renew_hook_does_not_set_renew_hook, test_max_log_backups_error)
(test_max_log_backups_success, test_webroot_map)
(test_report_config_interaction_str)
(test_report_config_interaction_iterable): Update tests.
* certbot/tests/main_test.py (test_certificates)
(test_certonly_abspath, test_certonly_bad_args)
(test_agree_dev_preview_config): Update tests.

* certbot: Refactor cli_test.ParseTest.

* certbot/tests/cli_test.py (ParseTest._unmocked_parse): Rename parse
to _unmocked_parse.
(parse): New method.
(ParseTest._help_output, ParseTest.test_cli_ini_domains)
(ParseTest.test_no_args, ParseTest.test_install_abspath)
(ParseTest.test_help, ParseTest.test_help_no_dashes)
(ParseTest.test_parse_domains, ParseTest.test_preferred_challenges)
(ParseTest.test_server_flag, ParseTest.test_must_staple_flag)
(ParseTest.test_no_gui, ParseTest.test_staging_flag)
(ParseTest.test_dry_run_flag, ParseTest.test_option_was_set)
(ParseTest.test_encode_revocation_reason)
(ParseTest.test_force_interactive)
(ParseTest.test_deploy_hook_conflict)
(ParseTest.test_deploy_hook_matches_renew_hook)
(ParseTest.test_deploy_hook_sets_renew_hook)
(ParseTest.test_renew_hook_conflict)
(ParseTest.test_renew_hook_matches_deploy_hook)
(ParseTest.test_renew_hook_does_not_set_renew_hook)
(ParseTest.test_max_log_backups_error)
(ParseTest.test_max_log_backups_success): Update methods.

* certbot: Refactor cli_test.SetByCliTest

* certbot/tests/cli_test.py (SetByCliTest.test_webroot_map)
(SetByCliTest.test_report_config_interaction_str)
(SetByCliTest.test_report_config_interaction_iteratable)
(_call_set_by_cli): Update methods.

* certbot: cli: Fix style.

* certbot/cli.py (HelpfulArgumentParser.__init__): Update method.

* certbot: Revert changes to tests.util.patch_get_utility

* certbot/tests/util.py (patch_get_utility): Remove
`stdout_notification` arg.
(_creat_get_utility_mock): Remove `stdout_notification` arg.
(_stdout_notification): Remove function.

* certbot: Revert changes to MainTest.

* certbot/tests/main_test.py
(MainTest.test_certificates, MainTest.test_certonly_abspath)
(MainTest.test_certonly_bad_args): Update methods.

* certbot: cli_test.py: Remove 'pylint: disable' lines.

* certbot/tests/cli_test.py (ParseTest.parse): Update method.
(_call_set_by_cli): Update function.
2017-08-25 10:05:58 -07:00
Brad Warren 60c6cc5f2a Write enhance() 2017-08-24 15:26:52 -07:00
Brad Warren 00e28592b6 Add supported_enhancements 2017-08-24 15:18:40 -07:00
Brad Warren b92df1b71c Remove unused find_postfix_cf 2017-08-24 15:15:41 -07:00
Brad Warren baf0d3343a Remove postfix version notes 2017-08-24 15:13:02 -07:00
Brad Warren cc3896d5d4 Add test_lock_error 2017-08-24 15:12:11 -07:00
Brad Warren b94e268f83 Remove unused certs_only_config 2017-08-24 15:05:39 -07:00
Brad Warren b9177948d3 Remove _write_config 2017-08-24 15:05:24 -07:00
Brad Warren 3b2e9e49be Remove unneeded instance variables 2017-08-24 15:04:36 -07:00
Brad Warren 0efc02d6ee Lock the Postfix config dir 2017-08-24 15:03:11 -07:00
Brad Warren 967a1830e6 Rewrite get_all_names 2017-08-24 14:59:25 -07:00
Brad Warren 90ffe2aac0 Remove legacy get_all_certs_and_keys() method 2017-08-24 09:04:57 -07:00
Brad Warren b342f40c2b remove old comments 2017-08-23 15:16:36 -07:00
Brad Warren 83e37acc8b group IPlugin methods 2017-08-23 15:16:07 -07:00
Brad Warren d1f3a2deef move _get_version 2017-08-23 15:13:06 -07:00
Brad WarrenandGitHub a5fae7eab5 certbot-auto OS dependency update system (#4971)
* Add version number to bootstrap scripts.

* Always determine Bootstrap function and version.

* Write bootstrap version into venv.

* Add PrevBootstrapVersion function.

* Add OS bootstrapping check to phase 2.

* Differentiate -n and renew when rebootstrapping.

* Quote all environment variables.

* Correct test condition

* Add loud warning about hardcoded version list.

* s/VENV_BOOTSTRAP_VERSION/BOOTSTRAP_VERSION_PATH

* Properly handle noop bootstrap functions.
2017-08-23 11:01:20 -07:00
Winston SmithandBrad Warren 8ca36a0b62 Organize + document certbot/tests/testdata directory (#4983)
* wp organize keys documentation start

* oganized testdata directory + readme

* clean up doc

* del acme change
2017-08-23 10:32:27 -07:00
Noah SwartzandBrad Warren c33ee0e2df add warnings and clarity to config documentation (#4991) 2017-08-21 12:30:04 -07:00
Brad WarrenandGitHub 56db211367 Change certbot-auto's installation path to /opt (#4970)
* Update comment about root usage.

* run all of certbot-auto as root

* remove other $SUDO uses from template

* remove $SUDO usage from bootstrappers

* default venv path = /opt/eff.org/certbot/venv

* Create symlinks from old default venvs

* Delete old venv path when it exists.

Also, quote expansion of paths.

* fix typo

* Separate venv_dir and le_auto_path

* Deduplicate code with test_dirs()

* Ignore cleanup errors.

This is caused by subdirectories being owned by root.

* Split test into test_phase2_upgrade.

* Rename test_dirs to temp_paths for clarity.

* Check both venvs before bootstrapping again.

* Use OLD_VENV_PATH/bin

* Preserve environment with sudo.

* Remove "esp. under sudo" comment.

* Export *VENV_PATH.

* Change check for OLD_VENV installation.

This approach better handles manually set VENV_PATH values.

* Remove SUDO_ENV.

* Print message before requesting root privileges.

* Make a function for selecting root auth method.

* Address @erikrose's feedback.
2017-08-21 12:23:09 -07:00
Nicolas DuchonandBrad Warren cd2e70e9cd Redirect to zenhack/simp_le (#5025)
Kuba's simp_le has been unmaintained for more than a year and is starting to break.

zenhack's fork is actively maintained and available through PyPI.
2017-08-21 11:27:24 -07:00
Noah Swartz 2c9e072a9f link to nginx documentation 2017-08-15 17:39:23 -07:00
Noah Swartz 4d72fa42e3 expand nginx no name error 2017-08-15 17:00:03 -07:00
Winston SmithandBrad Warren 16ed141301 Include plugin selection at the info logging level (#5010)
* Plugin selection on INFO

* Fixed lint errors

* Fixed lint errors

* record_chosen_plugin log plugin
2017-08-10 16:51:19 -07:00
Brad Warren c9813a44d7 protect get_version() 2017-08-10 16:42:48 -07:00
Brad Warren b98f541b91 clean up prepare() 2017-08-10 16:41:59 -07:00