Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certificate default settings (Notification/Rotation) #4635

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/administration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,25 @@ Lemur allows you to fine tune your certificates to your organization. The follow
and are used when Lemur creates the CSR for your certificates.


.. data:: LEMUR_DEFAULT_CERTIFICATE_NOTIFY
:noindex:

Flags the certificate to notify during certificate creation. Defaults to True.

::

LEMUR_DEFAULT_CERTIFICATE_NOTIFY = True


.. data:: LEMUR_DEFAULT_CERTIFICATE_ROTATE
:noindex:

Flags the certificate to rotate on expiration during certificate creation. Defaults to False.

::

LEMUR_DEFAULT_CERTIFICATE_ROTATE = False

.. data:: LEMUR_DEFAULT_COUNTRY
:noindex:

Expand Down
4 changes: 2 additions & 2 deletions lemur/certificates/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ class CertificateInputSchema(CertificateCreationSchema):
validate=validate.OneOf(CERTIFICATE_KEY_TYPES), missing="ECCPRIME256V1"
)

notify = fields.Boolean(default=True)
rotation = fields.Boolean()
notify = fields.Boolean(default=current_app.config.get("LEMUR_DEFAULT_CERTIFICATE_NOTIFY", True))
rotation = fields.Boolean(default=current_app.config.get("LEMUR_DEFAULT_CERTIFICATE_ROTATE", False))
rotation_policy = fields.Nested(
AssociatedRotationPolicySchema,
missing={"name": "default"},
Expand Down
Loading