security

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package security implements the Security domain. Security

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the Security domain with the connection set to conn.

Types

type CertificateErrorAction

type CertificateErrorAction string

CertificateErrorAction The action to take when a certificate error occurs. continue will continue processing the request and cancel will cancel the request.

const (
	CertificateErrorActionNotSet   CertificateErrorAction = ""
	CertificateErrorActionContinue CertificateErrorAction = "continue"
	CertificateErrorActionCancel   CertificateErrorAction = "cancel"
)

CertificateErrorAction as enums.

func (CertificateErrorAction) String

func (e CertificateErrorAction) String() string

func (CertificateErrorAction) Valid

func (e CertificateErrorAction) Valid() bool

type CertificateErrorClient

type CertificateErrorClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*CertificateErrorReply, error)
	rpcc.Stream
}

CertificateErrorClient is a client for CertificateError events. There is a certificate error. If overriding certificate errors is enabled, then it should be handled with the handleCertificateError command. Note: this event does not fire if the certificate error has been allowed internally. Only one client per target should override certificate errors at the same time.

type CertificateErrorReply

type CertificateErrorReply struct {
	EventID    int    `json:"eventId"`    // The ID of the event.
	ErrorType  string `json:"errorType"`  // The type of the error.
	RequestURL string `json:"requestURL"` // The url that was requested.
}

CertificateErrorReply is the reply for CertificateError events.

type CertificateID

type CertificateID int

CertificateID An internal certificate ID value.

type HandleCertificateErrorArgs

type HandleCertificateErrorArgs struct {
	EventID int                    `json:"eventId"` // The ID of the event.
	Action  CertificateErrorAction `json:"action"`  // The action to take on the certificate error.
}

HandleCertificateErrorArgs represents the arguments for HandleCertificateError in the Security domain.

func NewHandleCertificateErrorArgs

func NewHandleCertificateErrorArgs(eventID int, action CertificateErrorAction) *HandleCertificateErrorArgs

NewHandleCertificateErrorArgs initializes HandleCertificateErrorArgs with the required arguments.

type InsecureContentStatus

type InsecureContentStatus struct {
	RanMixedContent                bool  `json:"ranMixedContent"`                // True if the page was loaded over HTTPS and ran mixed (HTTP) content such as scripts.
	DisplayedMixedContent          bool  `json:"displayedMixedContent"`          // True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images.
	ContainedMixedForm             bool  `json:"containedMixedForm"`             // True if the page was loaded over HTTPS and contained a form targeting an insecure url.
	RanContentWithCertErrors       bool  `json:"ranContentWithCertErrors"`       // True if the page was loaded over HTTPS without certificate errors, and ran content such as scripts that were loaded with certificate errors.
	DisplayedContentWithCertErrors bool  `json:"displayedContentWithCertErrors"` // True if the page was loaded over HTTPS without certificate errors, and displayed content such as images that were loaded with certificate errors.
	RanInsecureContentStyle        State `json:"ranInsecureContentStyle"`        // Security state representing a page that ran insecure content.
	DisplayedInsecureContentStyle  State `json:"displayedInsecureContentStyle"`  // Security state representing a page that displayed insecure content.
}

InsecureContentStatus Information about insecure content on the page.

type MixedContentType

type MixedContentType string

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

const (
	MixedContentTypeNotSet              MixedContentType = ""
	MixedContentTypeBlockable           MixedContentType = "blockable"
	MixedContentTypeOptionallyBlockable MixedContentType = "optionally-blockable"
	MixedContentTypeNone                MixedContentType = "none"
)

MixedContentType as enums.

func (MixedContentType) String

func (e MixedContentType) String() string

func (MixedContentType) Valid

func (e MixedContentType) Valid() bool

type SetIgnoreCertificateErrorsArgs added in v0.15.5

type SetIgnoreCertificateErrorsArgs struct {
	Ignore bool `json:"ignore"` // If true, all certificate errors will be ignored.
}

SetIgnoreCertificateErrorsArgs represents the arguments for SetIgnoreCertificateErrors in the Security domain.

func NewSetIgnoreCertificateErrorsArgs added in v0.15.5

func NewSetIgnoreCertificateErrorsArgs(ignore bool) *SetIgnoreCertificateErrorsArgs

NewSetIgnoreCertificateErrorsArgs initializes SetIgnoreCertificateErrorsArgs with the required arguments.

type SetOverrideCertificateErrorsArgs

type SetOverrideCertificateErrorsArgs struct {
	Override bool `json:"override"` // If true, certificate errors will be overridden.
}

SetOverrideCertificateErrorsArgs represents the arguments for SetOverrideCertificateErrors in the Security domain.

func NewSetOverrideCertificateErrorsArgs

func NewSetOverrideCertificateErrorsArgs(override bool) *SetOverrideCertificateErrorsArgs

NewSetOverrideCertificateErrorsArgs initializes SetOverrideCertificateErrorsArgs with the required arguments.

type State

type State string

State The security level of a page or resource.

const (
	StateNotSet   State = ""
	StateUnknown  State = "unknown"
	StateNeutral  State = "neutral"
	StateInsecure State = "insecure"
	StateSecure   State = "secure"
	StateInfo     State = "info"
)

State as enums.

func (State) String

func (e State) String() string

func (State) Valid

func (e State) Valid() bool

type StateChangedClient

type StateChangedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*StateChangedReply, error)
	rpcc.Stream
}

StateChangedClient is a client for SecurityStateChanged events. The security state of the page changed.

type StateChangedReply

type StateChangedReply struct {
	SecurityState         State                 `json:"securityState"`         // Security state.
	SchemeIsCryptographic bool                  `json:"schemeIsCryptographic"` // True if the page was loaded over cryptographic transport such as HTTPS.
	Explanations          []StateExplanation    `json:"explanations"`          // List of explanations for the security state. If the overall security state is `insecure` or `warning`, at least one corresponding explanation should be included.
	InsecureContentStatus InsecureContentStatus `json:"insecureContentStatus"` // Information about insecure content on the page.
	Summary               *string               `json:"summary,omitempty"`     // Overrides user-visible description of the state.
}

StateChangedReply is the reply for SecurityStateChanged events.

type StateExplanation

type StateExplanation struct {
	SecurityState    State            `json:"securityState"`    // Security state representing the severity of the factor being explained.
	Title            string           `json:"title"`            // Title describing the type of factor.
	Summary          string           `json:"summary"`          // Short phrase describing the type of factor.
	Description      string           `json:"description"`      // Full text explanation of the factor.
	MixedContentType MixedContentType `json:"mixedContentType"` // The type of mixed content described by the explanation.
	Certificate      []string         `json:"certificate"`      // Page certificate.
}

StateExplanation An explanation of an factor contributing to the security state.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL