pki.models.domainΒΆ
Module that contains the DomainModel.
ClassesΒΆ
Domain Model. |
|
Model representing allowed certificate profiles for a domain. |
Module ContentsΒΆ
- class pki.models.domain.DomainModel(*args, **kwargs)[source]ΒΆ
Bases:
django.db.models.ModelDomain Model.
- __repr__()[source]ΒΆ
Machine-readable representation of the Domain model instance.
- Returns:
Machine-readable representation of the Domain model model instance.
- Return type:
str
- __str__()[source]ΒΆ
Human-readable representation of the Domain model instance.
- Returns:
Human-readable representation of the Domain model model instance.
- Return type:
str
- save(**kwargs)[source]ΒΆ
Save the Domain model and add default certificate profiles.
- Parameters:
kwargs (Any)
- Return type:
None
- property signature_suite: trustpoint_core.oid.SignatureSuite[source]ΒΆ
Get the signature suite for the domain (based on its Issuing CA).
- Return type:
trustpoint_core.oid.SignatureSuite
- property public_key_info: trustpoint_core.oid.PublicKeyInfo[source]ΒΆ
Get the public key info for the domain (based on its Issuing CA).
- Return type:
trustpoint_core.oid.PublicKeyInfo
- get_issuing_ca_or_value_error()[source]ΒΆ
Gets the corresponding Issuing CA.
- Returns:
The corresponding Issuing CA.
- Raises:
ValueError β If no Issuing CA is set.
- Return type:
- get_allowed_cert_profiles()[source]ΒΆ
Gets the allowed certificate profiles for this domain.
- Returns:
QuerySet of allowed DomainAllowedCertificateProfileModel instances.
- Return type:
django.db.models.QuerySet[DomainAllowedCertificateProfileModel]
- get_allowed_cert_profile_names()[source]ΒΆ
Gets the set of allowed certificate profile names for this domain.
- Returns:
Set of allowed certificate profile names.
- Return type:
set[str]
- get_allowed_cert_profile(cert_profile_str)[source]ΒΆ
Gets the requested certificate profile if it is allowed for this domain. Else, raises a ValueError.
- Parameters:
cert_profile_str (str) β The name of the certificate profile to check.
- Returns:
The requested CertificateProfileModel (if allowed).
- Return type:
- set_allowed_cert_profiles(allowed_profile_data)[source]ΒΆ
Sets the certificate profiles allowed in the domain.
- Parameters:
allowed_profile_data (dict[str, str]) β Dict where key is allowed certificate profile ID (str) and value is optional alias
- Returns:
Set of rejected aliases due to duplication in the form of (alias, profile unique name)
- Return type:
set[tuple[str, str]]