privacy

package
v2.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentTypeBidder       = "bidder"
	ComponentTypeAnalytics    = "analytics"
	ComponentTypeRealTimeData = "rtd"
	ComponentTypeGeneral      = "general"
)

Variables

This section is empty.

Functions

func ScrubDeviceIDsIPsUserDemoExt added in v2.1.0

func ScrubDeviceIDsIPsUserDemoExt(reqWrapper *openrtb_ext.RequestWrapper, ipConf IPConf, fieldName string, scrubFullGeo bool)

func ScrubEIDs added in v2.1.0

func ScrubEIDs(reqWrapper *openrtb_ext.RequestWrapper) error

func ScrubGdprID added in v2.1.0

func ScrubGdprID(reqWrapper *openrtb_ext.RequestWrapper)

func ScrubGeoAndDeviceIP added in v2.1.0

func ScrubGeoAndDeviceIP(reqWrapper *openrtb_ext.RequestWrapper, ipConf IPConf)

func ScrubTID added in v2.1.0

func ScrubTID(reqWrapper *openrtb_ext.RequestWrapper)

func ScrubUserFPD added in v2.1.0

func ScrubUserFPD(reqWrapper *openrtb_ext.RequestWrapper)

Types

type Activity

type Activity int

Activity defines Prebid Server actions which can be controlled directly by the publisher or via privacy policies.

const (
	ActivitySyncUser Activity = iota + 1
	ActivityFetchBids
	ActivityEnrichUserFPD
	ActivityReportAnalytics
	ActivityTransmitUserFPD
	ActivityTransmitPreciseGeo
	ActivityTransmitUniqueRequestIDs
	ActivityTransmitTIDs
)

func (Activity) String

func (a Activity) String() string

type ActivityControl

type ActivityControl struct {
	IPv6Config config.IPv6
	IPv4Config config.IPv4
	// contains filtered or unexported fields
}

func NewActivityControl

func NewActivityControl(cfg *config.AccountPrivacy) ActivityControl

func (ActivityControl) Allow

func (e ActivityControl) Allow(activity Activity, target Component, request ActivityRequest) bool

type ActivityPlan

type ActivityPlan struct {
	// contains filtered or unexported fields
}

func (ActivityPlan) Evaluate

func (p ActivityPlan) Evaluate(target Component, request ActivityRequest) bool

type ActivityRequest

type ActivityRequest struct {
	// contains filtered or unexported fields
}

func NewRequestFromBidRequest

func NewRequestFromBidRequest(r openrtb_ext.RequestWrapper) ActivityRequest

func NewRequestFromPolicies

func NewRequestFromPolicies(p Policies) ActivityRequest

func (ActivityRequest) IsBidRequest

func (r ActivityRequest) IsBidRequest() bool

func (ActivityRequest) IsPolicies

func (r ActivityRequest) IsPolicies() bool

type ActivityResult

type ActivityResult int
const (
	ActivityAbstain ActivityResult = iota
	ActivityAllow
	ActivityDeny
)

type Component

type Component struct {
	Type string
	Name string
}

func (Component) MatchesName

func (c Component) MatchesName(v string) bool

func (Component) MatchesType

func (c Component) MatchesType(v string) bool

type ConditionRule

type ConditionRule struct {
	// contains filtered or unexported fields
}

func (ConditionRule) Evaluate

func (r ConditionRule) Evaluate(target Component, request ActivityRequest) ActivityResult

type EnabledPolicyEnforcer

type EnabledPolicyEnforcer struct {
	Enabled        bool
	PolicyEnforcer PolicyEnforcer
}

EnabledPolicyEnforcer decorates a PolicyEnforcer with an enabled flag.

func (EnabledPolicyEnforcer) CanEnforce

func (p EnabledPolicyEnforcer) CanEnforce() bool

CanEnforce returns true when the PolicyEnforcer can enforce.

func (EnabledPolicyEnforcer) ShouldEnforce

func (p EnabledPolicyEnforcer) ShouldEnforce(bidder string) bool

ShouldEnforce returns true when the enforcer is enabled the PolicyEnforcer allows enforcement.

type IPConf added in v2.1.0

type IPConf struct {
	IPV6 config.IPv6
	IPV4 config.IPv4
}

type NilPolicyEnforcer

type NilPolicyEnforcer struct{}

NilPolicyEnforcer implements the PolicyEnforcer interface but will always return false.

func (NilPolicyEnforcer) CanEnforce

func (NilPolicyEnforcer) CanEnforce() bool

CanEnforce is hardcoded to always return false.

func (NilPolicyEnforcer) ShouldEnforce

func (NilPolicyEnforcer) ShouldEnforce(bidder string) bool

ShouldEnforce is hardcoded to always return false.

type NilPolicyWriter

type NilPolicyWriter struct{}

NilPolicyWriter implements the PolicyWriter interface but performs no action.

func (NilPolicyWriter) Write

Write is hardcoded to perform no action with the OpenRTB bid request.

type Policies

type Policies struct {
	GPPSID []int8
}

Policies contains privacy signals and consent for non-OpenRTB activities.

type PolicyEnforcer

type PolicyEnforcer interface {
	// CanEnforce returns true when policy information is specifically provided by the publisher.
	CanEnforce() bool

	// ShouldEnforce returns true when the OpenRTB request should have personally identifiable
	// information (PII) removed or anonymized per the policy.
	ShouldEnforce(bidder string) bool
}

PolicyEnforcer determines if personally identifiable information (PII) should be removed or anonymized per the policy.

type PolicyWriter

type PolicyWriter interface {
	Write(req *openrtb2.BidRequest) error
}

PolicyWriter mutates an OpenRTB bid request with a policy's regulatory information.

type Rule

type Rule interface {
	Evaluate(target Component, request ActivityRequest) ActivityResult
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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