Tungsten v0.1.0 Tungsten.CDP.Security View Source

Security

Security

Link to this section Summary

Link to this section Types

Link to this type

cdp_certificate_error_action_type() View Source
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.

Link to this type

cdp_certificate_id_type() View Source
cdp_certificate_id_type() :: integer()

Security.CertificateId

An internal certificate ID value.

Link to this type

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()
}

Security.InsecureContentStatus

Information about insecure content on the page.

Link to this type

cdp_mixed_content_type_type() View Source
cdp_mixed_content_type_type() :: :none | :"optionally-blockable" | :blockable

Security.MixedContentType

A description of mixed content (HTTP resources on HTTPS pages), as defined by https://www.w3.org/TR/mixed-content/#categories

Link to this type

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()]
}

Security.SecurityStateExplanation

An explanation of an factor contributing to the security state.

Link to this type

cdp_security_state_type() View Source
cdp_security_state_type() :: :info | :secure | :insecure | :neutral | :unknown

Security.SecurityState

The security level of a page or resource.

Link to this section Functions

Link to this function

disable(session, parameters \\ %{}, options \\ []) View Source
disable(GenServer.server(), map(), Tungsten.Connection.exec_options()) ::
  {:ok, map()} | {:error, term()}

Security.disable

Disables tracking security state changes.

Link to this function

enable(session, parameters \\ %{}, options \\ []) View Source
enable(GenServer.server(), map(), Tungsten.Connection.exec_options()) ::
  {:ok, map()} | {:error, term()}

Security.enable

Enables tracking security state changes.

Link to this function

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()}

Security.handleCertificateError

Handles a certificate error that fired a certificateError event.

Link to this function

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()}

Security.setIgnoreCertificateErrors

Enable/disable whether all certificate errors should be ignored.

Link to this function

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()}

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.