Commit Graph

1511 Commits

Author SHA1 Message Date
Curtis Castrapel 583bbee606 remove debug print 2018-08-07 07:46:58 -07:00
Curtis Castrapel 7463d47057 Support LetsEncrypt accounts 2018-08-07 07:46:58 -07:00
Mike Grima 46cd1a21f7 Proper flask_restful boolean parsing.
This is documented here: https://github.com/flask-restful/flask-restful/issues/488
2018-08-07 07:46:58 -07:00
Curtis Castrapel 82c7530b6f fix deletion 2018-08-07 07:46:58 -07:00
Curtis Castrapel 6d8217e00f requirements 2018-08-07 07:46:58 -07:00
Curtis Castrapel cc735e9b33 Error logging 2018-08-07 07:46:58 -07:00
Curtis Castrapel 19753632a9 Show and send error for pending certs 2018-08-07 07:46:58 -07:00
Curtis Castrapel a3e1d08ba2 Adding pessimistic sqlalchemy disconnection handling 2018-08-07 07:46:58 -07:00
Curtis Castrapel 5e34287530 no bare except 2018-08-07 07:46:57 -07:00
Curtis Castrapel dd7c9e3f88 Explicit capture exception during create failure 2018-08-07 07:46:57 -07:00
Curtis Castrapel d8652fad36 Unpinning requests 2018-08-07 07:46:57 -07:00
Curtis Castrapel 58ec0bab09 updated requirements 2018-08-07 07:46:57 -07:00
Marti Raudsepp 094b2fd5a9 Clean up module imports
Example:
* import lemur.common.utils -> from lemur.common import utils
* import sqlalchemy.types as types -> from sqlalchemy import types
2018-08-07 07:46:57 -07:00
Marti Raudsepp 85285b5e62 Cache parsed certificate instead of re-parsing for each field
Use @cached_property decorator to cache the results of parse_certificate().

This significantly cuts down on the number of times certs need to be
parsed for a list view.
2018-08-07 07:46:57 -07:00
Curtis Castrapel 16dc7dc2f6 no bare except 2018-08-07 07:46:57 -07:00
Curtis Castrapel f53067ab29 Explicit capture exception during create failure 2018-08-07 07:46:56 -07:00
Curtis Castrapel efd33db69d Unpinning requests 2018-08-07 07:46:56 -07:00
Steven Reiling 5b13032aec Adds an optional interval variable to notification service's
create_default_expiration_notifications and introduces a new optional
configuration variable, LEMUR_SECURITY_TEAM_EMAIL_INTERVALS, to allow admins
control over the centralized email notification defaults.
2018-08-07 07:46:56 -07:00
Curtis Castrapel 177208f9da updated requirements 2018-08-07 07:46:56 -07:00
Marti Raudsepp b8d017418a Clean up module imports
Example:
* import lemur.common.utils -> from lemur.common import utils
* import sqlalchemy.types as types -> from sqlalchemy import types
2018-08-07 07:46:56 -07:00
Marti Raudsepp ce6e64bd17 Cache parsed certificate instead of re-parsing for each field
Use @cached_property decorator to cache the results of parse_certificate().

This significantly cuts down on the number of times certs need to be
parsed for a list view.
2018-08-07 07:46:56 -07:00
root 6ce044806b initial commit 2018-08-07 07:46:56 -07:00
Justin P 68203436e0 Sinful Use of `$`
Using the `$` sign within any block of text already marked as a code block is a grievous sin due to the fact that it makes it 100% pointless for you to have USED THE CODE BLOCK IN THE FIRST PLACE!

The `$` becomes included in the text we're trying to highlight for us to be able to actually use in our own projects.

Why post the info if you don't want us to use it.

Thank you.
2018-08-07 07:46:55 -07:00
Curtis f9a7b97839
Merge branch 'master' into unittests-use-valid-certs 2018-08-07 07:45:45 -07:00
Cyril Dangerville 2869042f38 Fixed invalid JSON payloads (making API requests fail in particular) (#1522) 2018-08-03 15:26:48 -07:00
Marti Raudsepp 82158aece6 Fill in missing cert rotation_policy; don't ignore validation errors when re-issuing certs
CertificateInputSchema requires the rotation_policy field, but
certificates created before the field existed have set to NULL. Thus
saving such certificates failed and probably caused other errors.

Made cert re-issuing (get_certificate_primitives) more strict so such
errors are harder to miss in the future.
2018-08-03 20:06:21 +03:00
Marti Raudsepp 1f0f432327 Fix unit tests certificates to have correct chains and private keys
In preparation for certificate integrity-checking: invalid certificate
chains and mismatching private keys will no longer be allowed anywhere
in Lemur code.

The test vector certs were generated using the Lemur "cryptography"
authority plugin.

* Certificates are now more similar to real-world usage: long serial
  numbers, etc.
* Private key is included for all certs, so it's easy to re-generate
  anything if needed.
2018-08-03 19:45:13 +03:00
Marti Raudsepp acd2701fa2 Delete dead code in unit tests (#1510) 2018-08-03 08:21:55 -07:00
Marti Raudsepp bb0c229d7e Add .pytest_cache dir to .gitignore (#1512) 2018-08-03 08:12:04 -07:00
Curtis 3f9d66bd51
Merge pull request #1497 from castrapel/letsencrypt_account_support
Letsencrypt account support
2018-07-30 15:37:35 -07:00
Curtis 025d177565
Merge branch 'master' into letsencrypt_account_support 2018-07-30 15:28:29 -07:00
Curtis Castrapel 44192d4494 remove debug print 2018-07-30 15:27:23 -07:00
Curtis 4b5e93cd3c
Merge pull request #1491 from mikegrima/booleans
Proper flask_restful boolean parsing
2018-07-30 15:25:52 -07:00
Curtis Castrapel 0889076d3b Support LetsEncrypt accounts 2018-07-30 15:25:02 -07:00
Mike Grima d6b482755b Proper flask_restful boolean parsing.
This is documented here: https://github.com/flask-restful/flask-restful/issues/488
2018-07-30 13:49:41 -07:00
Curtis b70885595f
Merge pull request #1488 from castrapel/fix_delete
fix deletion
2018-07-27 16:44:23 -07:00
Curtis Castrapel caf99d36d6 fix deletion 2018-07-27 15:52:22 -07:00
Curtis 35341a6828
Merge pull request #1487 from castrapel/cancel_pending_cert_failures
Cancel pending cert failures
2018-07-27 14:26:52 -07:00
Curtis Castrapel 2bb00bc666 requirements 2018-07-27 14:20:22 -07:00
Curtis Castrapel e16c1de001 Error logging 2018-07-27 14:17:50 -07:00
Curtis Castrapel 2a6dda07eb Show and send error for pending certs 2018-07-27 14:15:14 -07:00
Curtis 4fa8f9ecc0
Merge pull request #1468 from castrapel/fix_db
http://docs.sqlalchemy.org/en/latest/core/pooling.html#disconnect-handling-pessimistic
2018-07-23 11:07:45 -07:00
Curtis Castrapel 9b29f9f819 Adding pessimistic sqlalchemy disconnection handling 2018-07-23 10:57:22 -07:00
Curtis Castrapel faa1779204 Merge remote-tracking branch 'upstream/master' 2018-07-23 10:29:52 -07:00
Curtis Castrapel 2f51fea743 no bare except 2018-07-20 13:43:47 -07:00
Curtis Castrapel c78077d8d6 Explicit capture exception during create failure 2018-07-20 13:43:47 -07:00
Curtis Castrapel 0bb7a6e125 Unpinning requests 2018-07-20 13:43:47 -07:00
Steven Reiling bd9203fcbc Adds an optional interval variable to notification service's
create_default_expiration_notifications and introduces a new optional
configuration variable, LEMUR_SECURITY_TEAM_EMAIL_INTERVALS, to allow admins
control over the centralized email notification defaults.
2018-07-20 13:43:47 -07:00
Curtis Castrapel af8cf2d550 updated requirements 2018-07-20 13:43:47 -07:00
Marti Raudsepp d071d85486 Clean up module imports
Example:
* import lemur.common.utils -> from lemur.common import utils
* import sqlalchemy.types as types -> from sqlalchemy import types
2018-07-20 13:43:47 -07:00