management.views.tlsΒΆ
TLS setting specific views.
ClassesΒΆ
Mixin which adds data to the context for the TLS settings application. |
|
View to display certificate details, including Subject Alternative Name (SAN) and associated IP addresses. |
|
View to select the method to add a TLS Certificate. |
|
View for generating TLS Server Credentials in the setup wizard. |
|
View to import an TLS-Server Credential from a PKCS12 file. |
|
View to import an Issuing CA from separate PEM files. |
|
Activate a TLS server certificate. |
Module ContentsΒΆ
- class management.views.tls.TlsSettingsContextMixin[source]ΒΆ
Mixin which adds data to the context for the TLS settings application.
- class management.views.tls.TlsView[source]ΒΆ
Bases:
trustpoint.logger.LoggerMixin,TlsSettingsContextMixin,django.views.generic.FormView[management.forms.IPv4AddressForm]View to display certificate details, including Subject Alternative Name (SAN) and associated IP addresses.
- get_form_kwargs()[source]ΒΆ
Pass additional arguments (e.g., SAN IPs) to the form.
- Return type:
dict[str, Any]
- get_context_data(**kwargs)[source]ΒΆ
Add certificate information, including SAN data and issuer details, to the context for display.
- Parameters:
kwargs (dict[str, Any])
- Return type:
dict[str, Any]
- form_valid(form)[source]ΒΆ
Handle valid form submissions.
- Parameters:
- Return type:
django.http.HttpResponse
- class management.views.tls.TlsAddMethodSelectView(**kwargs)[source]ΒΆ
Bases:
django.views.generic.TemplateViewView to select the method to add a TLS Certificate.
- class management.views.tls.GenerateTlsCertificateView[source]ΒΆ
Bases:
trustpoint.logger.LoggerMixin,django.views.generic.FormView[setup_wizard.forms.StartupWizardTlsCertificateForm]View for generating TLS Server Credentials in the setup wizard.
This view handles the generation of TLS Server Credentials. It provides a form for the user to input necessary information such as IP addresses and domain names, and processes the data to generate the required TLS certificates.
- form_valid(form)[source]ΒΆ
Handle a valid form submission for TLS Server Credential generation.
- Parameters:
form (setup_wizard.forms.StartupWizardTlsCertificateForm) β The validated form containing user input for generating the TLS Server Credential.
- Returns:
- Redirect to the success URL upon successful
credential generation, or an error page if an exception occurs.
- Return type:
HttpResponseRedirect
- Raises:
TrustpointTlsServerCredentialError β If no TLS server credential is found.
subprocess.CalledProcessError β If the associated shell script fails.
- class management.views.tls.TlsAddFileImportPkcs12View[source]ΒΆ
Bases:
TlsSettingsContextMixin,django.views.generic.FormView[management.forms.TlsAddFileImportPkcs12Form],trustpoint.logger.LoggerMixinView to import an TLS-Server Credential from a PKCS12 file.
- class management.views.tls.TlsAddFileImportSeparateFilesView[source]ΒΆ
Bases:
TlsSettingsContextMixin,django.views.generic.FormView[management.forms.TlsAddFileImportSeparateFilesForm],trustpoint.logger.LoggerMixinView to import an Issuing CA from separate PEM files.
- class management.views.tls.ActivateTlsServerView(**kwargs)[source]ΒΆ
Bases:
django.views.generic.View,trustpoint.logger.LoggerMixinActivate a TLS server certificate.