Tungsten v0.1.0 Tungsten.CDP.Security View Source
Security
Link to this section Summary
Link to this section Types
cdp_certificate_error_action_type()
View Source
cdp_certificate_error_action_type() :: :cancel | :continue
cdp_certificate_error_action_type() :: :cancel | :continue
Security.CertificateErrorAction
The action to take when a certificate error occurs. continue will continue processing the request and cancel will cancel the request.
cdp_certificate_id_type()
View Source
cdp_certificate_id_type() :: integer()
cdp_certificate_id_type() :: integer()
An internal certificate ID value.
cdp_insecure_content_status_type()
View Source
cdp_insecure_content_status_type() :: %{
ran_mixed_content: boolean(),
displayed_mixed_content: boolean(),
contained_mixed_form: boolean(),
ran_content_with_cert_errors: boolean(),
displayed_content_with_cert_errors: boolean(),
ran_insecure_content_style: cdp_security_state_type(),
displayed_insecure_content_style: cdp_security_state_type()
}
cdp_insecure_content_status_type() :: %{
ran_mixed_content: boolean(),
displayed_mixed_content: boolean(),
contained_mixed_form: boolean(),
ran_content_with_cert_errors: boolean(),
displayed_content_with_cert_errors: boolean(),
ran_insecure_content_style: cdp_security_state_type(),
displayed_insecure_content_style: cdp_security_state_type()
}
Security.InsecureContentStatus
Information about insecure content on the page.
cdp_mixed_content_type_type()
View Source
cdp_mixed_content_type_type() :: :none | :"optionally-blockable" | :blockable
cdp_mixed_content_type_type() :: :none | :"optionally-blockable" | :blockable
A description of mixed content (HTTP resources on HTTPS pages), as defined by https://www.w3.org/TR/mixed-content/#categories
cdp_security_state_explanation_type()
View Source
cdp_security_state_explanation_type() :: %{
:security_state => cdp_security_state_type(),
:title => String.t(),
:summary => String.t(),
:description => String.t(),
:mixed_content_type => cdp_mixed_content_type_type(),
:certificate => [String.t()],
optional(:recommendations) => [String.t()]
}
cdp_security_state_explanation_type() :: %{
:security_state => cdp_security_state_type(),
:title => String.t(),
:summary => String.t(),
:description => String.t(),
:mixed_content_type => cdp_mixed_content_type_type(),
:certificate => [String.t()],
optional(:recommendations) => [String.t()]
}
Security.SecurityStateExplanation
An explanation of an factor contributing to the security state.
cdp_security_state_type()
View Source
cdp_security_state_type() :: :info | :secure | :insecure | :neutral | :unknown
cdp_security_state_type() :: :info | :secure | :insecure | :neutral | :unknown
The security level of a page or resource.
Link to this section Functions
disable(session, parameters \\ %{}, options \\ [])
View Source
disable(GenServer.server(), map(), Tungsten.Connection.exec_options()) ::
{:ok, map()} | {:error, term()}
disable(GenServer.server(), map(), Tungsten.Connection.exec_options()) :: {:ok, map()} | {:error, term()}
Disables tracking security state changes.
enable(session, parameters \\ %{}, options \\ [])
View Source
enable(GenServer.server(), map(), Tungsten.Connection.exec_options()) ::
{:ok, map()} | {:error, term()}
enable(GenServer.server(), map(), Tungsten.Connection.exec_options()) :: {:ok, map()} | {:error, term()}
Enables tracking security state changes.
handle_certificate_error(session, parameters, options \\ [])
View Source
handle_certificate_error(
GenServer.server(),
%{event_id: integer(), action: cdp_certificate_error_action_type()},
Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}
handle_certificate_error( GenServer.server(), %{event_id: integer(), action: cdp_certificate_error_action_type()}, Tungsten.Connection.exec_options() ) :: {:ok, map()} | {:error, term()}
Security.handleCertificateError
Handles a certificate error that fired a certificateError event.
set_ignore_certificate_errors(session, parameters, options \\ [])
View Source
set_ignore_certificate_errors(
GenServer.server(),
%{ignore: boolean()},
Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}
set_ignore_certificate_errors( GenServer.server(), %{ignore: boolean()}, Tungsten.Connection.exec_options() ) :: {:ok, map()} | {:error, term()}
Security.setIgnoreCertificateErrors
Enable/disable whether all certificate errors should be ignored.
set_override_certificate_errors(session, parameters, options \\ [])
View Source
set_override_certificate_errors(
GenServer.server(),
%{override: boolean()},
Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}
set_override_certificate_errors( GenServer.server(), %{override: boolean()}, Tungsten.Connection.exec_options() ) :: {:ok, map()} | {:error, term()}
Security.setOverrideCertificateErrors
Enable/disable overriding certificate errors. If enabled, all certificate error events need to
be handled by the DevTools client and should be answered with handleCertificateError commands.