Documentation ¶
Index ¶
- Constants
- type Activity
- type ActivityControl
- type ActivityPlan
- type ActivityResult
- type ActivityRule
- type ComponentEnforcementRule
- type EnabledPolicyEnforcer
- type Enforcement
- type NilPolicyEnforcer
- type NilPolicyWriter
- type Policies
- type PolicyEnforcer
- type PolicyWriter
- type ScopedName
- type ScrubStrategyDeviceID
- type ScrubStrategyGeo
- type ScrubStrategyIPV4
- type ScrubStrategyIPV6
- type ScrubStrategyUser
- type Scrubber
Constants ¶
const ( ScopeTypeBidder = "bidder" ScopeTypeAnalytics = "analytics" ScopeTypeRTD = "rtd" // real time data ScopeTypeUserID = "userid" ScopeTypeGeneral = "general" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activity ¶ added in v0.256.0
type Activity int
Activity defines privileges which can be controlled directly by the publisher or via privacy policies.
type ActivityControl ¶ added in v0.263.0
type ActivityControl struct {
// contains filtered or unexported fields
}
func NewActivityControl ¶ added in v0.263.0
func NewActivityControl(privacyConf *config.AccountPrivacy) (ActivityControl, error)
func (ActivityControl) Allow ¶ added in v0.263.0
func (e ActivityControl) Allow(activity Activity, target ScopedName) ActivityResult
type ActivityPlan ¶ added in v0.263.0
type ActivityPlan struct {
// contains filtered or unexported fields
}
func (ActivityPlan) Allow ¶ added in v0.263.0
func (p ActivityPlan) Allow(target ScopedName) ActivityResult
type ActivityResult ¶ added in v0.263.0
type ActivityResult int
const ( ActivityAbstain ActivityResult = iota ActivityAllow ActivityDeny )
type ActivityRule ¶ added in v0.263.0
type ActivityRule interface {
Allow(target ScopedName) ActivityResult
}
type ComponentEnforcementRule ¶ added in v0.263.0
type ComponentEnforcementRule struct {
// contains filtered or unexported fields
}
func (ComponentEnforcementRule) Allow ¶ added in v0.263.0
func (r ComponentEnforcementRule) Allow(target ScopedName) 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 Enforcement ¶
Enforcement represents the privacy policies to enforce for an OpenRTB bid request.
func (Enforcement) Any ¶
func (e Enforcement) Any() bool
Any returns true if at least one privacy policy requires enforcement.
func (Enforcement) Apply ¶
func (e Enforcement) Apply(bidRequest *openrtb2.BidRequest)
Apply cleans personally identifiable information from an OpenRTB bid request.
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 ¶
func (NilPolicyWriter) Write(req *openrtb2.BidRequest) error
Write is hardcoded to perform no action with the OpenRTB bid request.
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 ScopedName ¶ added in v0.263.0
func NewScopedName ¶ added in v0.263.0
func NewScopedName(condition string) (ScopedName, error)
type ScrubStrategyDeviceID ¶
type ScrubStrategyDeviceID int
ScrubStrategyDeviceID defines the approach to remove hardware id and device id data.
const ( // ScrubStrategyDeviceIDNone does not remove hardware id and device id data. ScrubStrategyDeviceIDNone ScrubStrategyDeviceID = iota // ScrubStrategyDeviceIDAll removes all hardware and device id data (ifa, mac hashes device id hashes) ScrubStrategyDeviceIDAll )
type ScrubStrategyGeo ¶
type ScrubStrategyGeo int
ScrubStrategyGeo defines the approach to scrub PII from geographical data.
const ( // ScrubStrategyGeoNone does not remove any geographical data. ScrubStrategyGeoNone ScrubStrategyGeo = iota // ScrubStrategyGeoFull removes all geographical data. ScrubStrategyGeoFull // ScrubStrategyGeoReducedPrecision anonymizes geographical data with rounding. ScrubStrategyGeoReducedPrecision )
type ScrubStrategyIPV4 ¶
type ScrubStrategyIPV4 int
ScrubStrategyIPV4 defines the approach to scrub PII from an IPV4 address.
const ( // ScrubStrategyIPV4None does not remove any part of an IPV4 address. ScrubStrategyIPV4None ScrubStrategyIPV4 = iota // ScrubStrategyIPV4Lowest8 zeroes out the last 8 bits of an IPV4 address. ScrubStrategyIPV4Lowest8 )
type ScrubStrategyIPV6 ¶
type ScrubStrategyIPV6 int
ScrubStrategyIPV6 defines the approach to scrub PII from an IPV6 address.
const ( // ScrubStrategyIPV6None does not remove any part of an IPV6 address. ScrubStrategyIPV6None ScrubStrategyIPV6 = iota // ScrubStrategyIPV6Lowest16 zeroes out the last 16 bits of an IPV6 address. ScrubStrategyIPV6Lowest16 // ScrubStrategyIPV6Lowest32 zeroes out the last 32 bits of an IPV6 address. ScrubStrategyIPV6Lowest32 )
type ScrubStrategyUser ¶
type ScrubStrategyUser int
ScrubStrategyUser defines the approach to scrub PII from user data.
const ( // ScrubStrategyUserNone does not remove non-location data. ScrubStrategyUserNone ScrubStrategyUser = iota // ScrubStrategyUserIDAndDemographic removes the user's buyer id, exchange id year of birth, and gender. ScrubStrategyUserIDAndDemographic )
type Scrubber ¶
type Scrubber interface { ScrubDevice(device *openrtb2.Device, id ScrubStrategyDeviceID, ipv4 ScrubStrategyIPV4, ipv6 ScrubStrategyIPV6, geo ScrubStrategyGeo) *openrtb2.Device ScrubUser(user *openrtb2.User, strategy ScrubStrategyUser, geo ScrubStrategyGeo) *openrtb2.User }
Scrubber removes PII from parts of an OpenRTB request.