Security

class Security(cdp: CDP) : Domain

Security

Constructors

Link copied to clipboard
constructor(cdp: CDP)

Types

Link copied to clipboard

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

Link copied to clipboard
@Serializable
data class CertificateErrorParameter(val eventId: Int, val errorType: String, val requestURL: String)

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.

Link copied to clipboard
@Serializable
data class CertificateSecurityState(val protocol: String, val keyExchange: String, val keyExchangeGroup: String? = null, val cipher: String, val mac: String? = null, val certificate: List<String>, val subjectName: String, val issuer: String, val validFrom: Double, val validTo: Double, val certificateNetworkError: String? = null, val certificateHasWeakSignature: Boolean, val certificateHasSha1Signature: Boolean, val modernSSL: Boolean, val obsoleteSslProtocol: Boolean, val obsoleteSslKeyExchange: Boolean, val obsoleteSslCipher: Boolean, val obsoleteSslSignature: Boolean)

Details about the security state of the page certificate.

Link copied to clipboard
@Serializable
data class HandleCertificateErrorParameter(val eventId: Int, val action: Security.CertificateErrorAction)
Link copied to clipboard
@Serializable
data class InsecureContentStatus(val ranMixedContent: Boolean, val displayedMixedContent: Boolean, val containedMixedForm: Boolean, val ranContentWithCertErrors: Boolean, val displayedContentWithCertErrors: Boolean, val ranInsecureContentStyle: Security.SecurityState, val displayedInsecureContentStyle: Security.SecurityState)

Information about insecure content on the page.

Link copied to clipboard

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

Link copied to clipboard
@Serializable
data class SafetyTipInfo(val safetyTipStatus: Security.SafetyTipStatus, val safeUrl: String? = null)
Link copied to clipboard
Link copied to clipboard

The security level of a page or resource.

Link copied to clipboard
@Serializable
data class SecurityStateChangedParameter(val securityState: Security.SecurityState, val schemeIsCryptographic: Boolean, val explanations: List<Security.SecurityStateExplanation>, val insecureContentStatus: Security.InsecureContentStatus, val summary: String? = null)

The security state of the page changed. No longer being sent.

Link copied to clipboard
@Serializable
data class SecurityStateExplanation(val securityState: Security.SecurityState, val title: String, val summary: String, val description: String, val mixedContentType: Security.MixedContentType, val certificate: List<String>, val recommendations: List<String>? = null)

An explanation of an factor contributing to the security state.

Link copied to clipboard
@Serializable
data class SetIgnoreCertificateErrorsParameter(val ignore: Boolean)
Link copied to clipboard
@Serializable
data class SetOverrideCertificateErrorsParameter(val override: Boolean)
Link copied to clipboard
@Serializable
data class VisibleSecurityState(val securityState: Security.SecurityState, val certificateSecurityState: Security.CertificateSecurityState? = null, val safetyTipInfo: Security.SafetyTipInfo? = null, val securityStateIssueIds: List<String>)

Security state information about the page.

Link copied to clipboard
@Serializable
data class VisibleSecurityStateChangedParameter(val visibleSecurityState: Security.VisibleSecurityState)

The security state of the page changed.

Properties

Link copied to clipboard

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.

Link copied to clipboard

The security state of the page changed. No longer being sent.

Link copied to clipboard

The security state of the page changed.

Functions

Link copied to clipboard
suspend fun disable(mode: CommandMode = CommandMode.DEFAULT)

Disables tracking security state changes.

Link copied to clipboard
suspend fun enable(mode: CommandMode = CommandMode.DEFAULT)

Enables tracking security state changes.

Link copied to clipboard
suspend fun handleCertificateError(args: Security.HandleCertificateErrorParameter, mode: CommandMode = CommandMode.DEFAULT)

Handles a certificate error that fired a certificateError event.

Link copied to clipboard
suspend fun setIgnoreCertificateErrors(ignore: Boolean)

Enable/disable whether all certificate errors should be ignored.

Link copied to clipboard
suspend fun setOverrideCertificateErrors(override: Boolean)

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.