Пример #1
0
class Certificate(CertificateBase):

    cert_acme = models.ForeignKey(
        'ACMERegistration',
        on_delete=models.CASCADE,
        blank=True,
        null=True
    )
    cert_acme_uri = models.URLField(
        null=True,
        blank=True
    )
    cert_domains_authenticators = EncryptedDictField(
        null=True,
        blank=True
    )
    cert_renew_days = models.IntegerField(
        default=10,
        verbose_name=_("Renew certificate day"),  # Should we change the name ?
        help_text=_('Number of days to renew certificate before expiring'),
        null=True,
        blank=True
    )

    class Meta:
        verbose_name = _("Certificate")
        verbose_name_plural = _("Certificates")
Пример #2
0
class ACMEDNSAuthenticator(Model):
    authenticator = models.CharField(max_length=64,
                                     verbose_name=_('Authenticator'))
    name = models.CharField(max_length=64, unique=True, verbose_name=_('Name'))
    attributes = EncryptedDictField()

    def __str__(self):
        return self.name

    class Meta:
        verbose_name = _('ACME DNS Authenticator')
Пример #3
0
class KeychainCredential(Model):
    name = models.CharField(max_length=255)
    type = models.CharField(max_length=255)
    attributes = EncryptedDictField()

    class Meta:
        verbose_name = _("Keychain Credential")
        verbose_name_plural = _("Keychain Credentials")
        ordering = ["name"]

    def __str__(self):
        return self.name
Пример #4
0
class CloudCredentials(Model):
    name = models.CharField(
        verbose_name=_('Account Name'),
        max_length=100,
    )
    provider = models.CharField(
        verbose_name=_('Provider'),
        max_length=50,
        choices=(),
    )
    attributes = EncryptedDictField()

    def __str__(self):
        return self.name

    class Meta:
        verbose_name = _("Cloud Credential")