Documentation ¶
Overview ¶
Package security implements the Security domain. Security
Index ¶
- func NewClient(conn *rpcc.Conn) *domainClient
- type CertificateErrorAction
- type CertificateErrorClient
- type CertificateErrorReply
- type CertificateID
- type HandleCertificateErrorArgs
- type InsecureContentStatus
- type MixedContentType
- type SetOverrideCertificateErrorsArgs
- type State
- type StateChangedClient
- type StateChangedReply
- type StateExplanation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.
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 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 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.
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.