commands.check_issuing_ca_validity¶
Management command to check the validity of Issuing CAs.
Classes¶
A Django management command to check for expiring or expired issuing CAs. |
Module Contents¶
- class commands.check_issuing_ca_validity.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]¶
Bases:
django.core.management.base.BaseCommandA Django management command to check for expiring or expired issuing CAs.
This command identifies Issuing Certificate Authorities (CAs) with certificates that are either expiring or expired and generates appropriate notifications for them in the system.
- handle(*args, **kwargs)[source]¶
Entrypoint for the command.
- Parameters:
*args (Any) – Additional positional arguments.
**kwargs (dict[str, Any]) – Additional keyword arguments.
- Return type:
None
- _check_issuing_ca_validity()[source]¶
Task to check for both expiring and expired Issuing CAs.
Expiring CAs trigger a WARNING notification, while expired CAs trigger a CRITICAL notification.
- Return type:
None
- _create_notification(issuing_ca, event, notification_type, message_type, new_status)[source]¶
Helper function to create a notification for an Issuing CA.
Skips notification creation if one already exists for the given event and Issuing CA.
- Parameters:
issuing_ca (pki.models.CaModel)
event (str)
notification_type (str | notifications.models.NotificationModel.NotificationTypes)
message_type (str | notifications.models.NotificationModel.NotificationMessageType)
new_status (notifications.models.NotificationStatus)
- Return type:
None