全球隐私控制(GPC)实现
global-privacy-control
根据 CPRA 第 1798.135(e) 条,提供全球隐私控制(GPC)自动退出信号的实现指南。涵盖 Sec-GPC HTTP 请求头检测、JavaScript navigator.globalPrivacyControl API,以及 CA、CO、CT、MT、TX 和 OR 等州的特定要求。包括服务器端检测代码和合规映射。
- License 许可
- Apache-2.0
- 最近更新
- 2026-03-17
- Stars
- ★ 338
- Forks
- 68
01 前言 Front Matter
- name
- global-privacy-control
- license
- Apache-2.0
- metadata
- { "tags": "global-privacy-control, gpc, cpra, opt-out-signal, browser-privacy", "author": "mukul975", "domain": "privacy", "version": "1.0", "subdomain": "consent-management" }
- description
- Implementation guide for Global Privacy Control (GPC) automated opt-out signal per CPRA Section 1798.135(e). Covers Sec-GPC HTTP header detection, JavaScript navigator.globalPrivacyControl API, and state-specific requirements for CA, CO, CT, MT, TX, and OR. Includes server-side detection code and compliance mapping.
02 资源文件 4
- 资产文件assets/template.md4.0 KB
- 参考文档references/standards.md3.6 KB
- 参考文档references/workflows.md5.3 KB
- 脚本scripts/process.py11.6 KB
03 SKILL.md 正文
Implementing Global Privacy Control (GPC)
Overview
Global Privacy Control (GPC) is a browser-level signal that communicates a user's privacy preference to opt out of the sale or sharing of their personal information. The GPC specification defines both an HTTP header (Sec-GPC: 1) and a JavaScript API (navigator.globalPrivacyControl) for transmitting this signal.
Under California Privacy Rights Act (CPRA) Section 1798.135(e), businesses must treat GPC signals as valid opt-out requests. The California Attorney General confirmed this enforcement position in the Sephora settlement (August 2022, $1.2 million fine), which was the first enforcement action involving GPC signals.
Legal Requirements by State
California — CPRA (effective January 1, 2023)
- Section 1798.135(e): A business that collects consumers' personal information shall treat the consumer's use of an opt-out preference signal as a valid request to opt out of sale/sharing under Section 1798.120.
- AG Regulation 11 CCR 7025(b): If a business collects personal information from consumers online, the business shall treat an opt-out preference signal as a valid request to opt-out of sale/sharing for that browser or device and any consumer profile associated with that browser or device.
- Sephora Settlement (August 2022): California AG fined Sephora $1.2 million for failing to honor GPC signals, among other violations.
Colorado — Colorado Privacy Act (CPA, effective July 1, 2024)
- Section 6-1-1306(1)(a)(IV)(A): Consumers may exercise the right to opt out through an opt-out preference signal sent by a platform, technology, or mechanism on behalf of the consumer, to the extent technically feasible.
- CPA Rules 4.6: Controllers must recognize universal opt-out mechanisms by July 1, 2024.
Connecticut — Connecticut Data Privacy Act (CTDPA, effective July 1, 2023)
- Section 42-520(b)(5): Beginning January 1, 2025, controllers must recognize universal opt-out mechanisms for the sale of personal data and targeted advertising.
Montana — Montana Consumer Data Privacy Act (effective October 1, 2024)
- Section 30-14-2807: Controllers must recognize opt-out preference signals as valid opt-out requests for the sale of personal data and targeted advertising.
Texas — Texas Data Privacy and Security Act (TDPSA, effective July 1, 2024)
- Section 541.055: Controllers must allow consumers to opt out of the sale of personal data and targeted advertising. Universal opt-out mechanisms must be honored beginning January 1, 2025.
Oregon — Oregon Consumer Privacy Act (effective July 1, 2024)
- Section 646A.578: Controllers shall provide a method by which consumers can opt out that includes recognition of opt-out preference signals.
GPC Technical Specification
HTTP Header Detection
The GPC signal is transmitted as an HTTP request header:
Sec-GPC: 1
This header is set by the browser (or browser extension) on every HTTP request when the user has enabled GPC. The header is absent (not set to 0) when GPC is not enabled.
JavaScript API Detection
The GPC signal is also available via the JavaScript DOM API:
// Check if GPC is supported and enabled
if (navigator.globalPrivacyControl === true) {
// User has opted out — do not sell/share personal information
// Do not load non-essential tracking scripts
// Set internal opt-out flag for this user
}
Key considerations:
navigator.globalPrivacyControlreturnstruewhen GPC is enablednavigator.globalPrivacyControlreturnsfalseorundefinedwhen GPC is not enabled or not supported- Check should occur before loading any tracking or advertising scripts
Server-Side Detection (HTTP Header)
On the server side, check for the Sec-GPC header in incoming requests:
If Sec-GPC header is present AND equals "1":
→ Set opt-out flag for this session/user
→ Do not initiate sale or sharing of personal information
→ Do not load third-party tracking pixels
→ Log GPC signal receipt for compliance records
Implementation Architecture at CloudVault SaaS Inc.
Client-Side Detection
CloudVault SaaS Inc. checks GPC at two points:
-
Page Load: Before initializing any analytics or advertising SDKs, check
navigator.globalPrivacyControl. Iftrue, suppress non-essential tracking. -
Consent Banner Interaction: If GPC is detected, pre-select the "Opt Out of Sale/Sharing" option in the cookie consent banner and display a notice: "We detected your Global Privacy Control signal. Your opt-out preference has been applied."
Server-Side Processing
The CloudVault SaaS Inc. backend middleware:
- Inspects every incoming HTTP request for the
Sec-GPC: 1header. - If detected, sets a session-level flag
gpc_opt_out = true. - If the request is associated with an authenticated user, propagates the opt-out to the user's consent record for applicable purposes (sale/sharing).
- Returns a
Sec-GPCresponse header echoing the signal (transparency). - Logs the GPC signal receipt with timestamp, user agent, and associated user ID (if authenticated).
Mapping GPC to Internal Consent System
GPC is a binary signal (opt out of sale/sharing). CloudVault SaaS Inc. maps it to specific consent purposes:
| GPC Signal | Internal Purpose | Action |
|---|---|---|
| Sec-GPC: 1 | pur_benchmarking_003 (Third-party data sharing) | Withdraw consent / opt out |
| Sec-GPC: 1 | pur_advertising_004 (Targeted advertising) | Withdraw consent / opt out |
| Sec-GPC: 1 | pur_analytics_001 (Service improvement) | No change (internal use, not sale/sharing) |
| Sec-GPC: 1 | pur_marketing_002 (Product emails) | No change (direct marketing, not sale/sharing) |
Conflict Resolution
When a user has manually opted in via the preference center but their browser sends GPC:
- CPRA approach: GPC takes precedence. Per AG regulation 11 CCR 7025(c), if a conflict exists between the opt-out preference signal and the consumer's participation in a financial incentive program, the business shall respect the opt-out preference signal but may notify the consumer of the conflict and give the consumer the choice to confirm their participation.
- CloudVault SaaS Inc. policy: Display a notification: "Your browser is sending a Global Privacy Control signal to opt out of data sharing. This overrides your previous opt-in. To continue sharing data for industry benchmarking, you can confirm your preference in Settings > Privacy."
Compliance Verification
To verify GPC implementation:
- Install a GPC-enabled browser or extension (Firefox with Enhanced Tracking Protection, DuckDuckGo browser, Brave browser, or the OptMeowt extension for Chrome)
- Navigate to CloudVault SaaS Inc. application
- Verify that
Sec-GPC: 1header is sent in network requests - Confirm that tracking scripts are not loaded
- Confirm that the consent banner reflects the opt-out preference
- Verify server-side logs record the GPC signal
- Confirm that authenticated users have their consent record updated
Key Regulatory References
- CPRA Section 1798.135(e) — Opt-out preference signal requirement
- California AG Regulation 11 CCR 7025 — GPC implementation details
- GPC Specification (globalprivacycontrol.org) — Technical standard
- Colorado Privacy Act Section 6-1-1306(1)(a)(IV)(A) — Universal opt-out
- Connecticut CTDPA Section 42-520(b)(5) — Universal opt-out mechanism
- Montana MCDPA Section 30-14-2807 — Opt-out preference signals
- Texas TDPSA Section 541.055 — Opt-out methods
- Oregon OCPA Section 646A.578 — Opt-out preference signals
- Sephora Settlement (California AG, August 2022) — First GPC enforcement
04 同仓库更多 Skills
职场邮件监控合规
workplace-email-privacy
依据 Barbulescu 诉罗马尼亚案(欧洲人权法院大法庭)、EDPB 指引及各国劳动法,实施工作场所电子邮件与互联网监控合规。涵盖可接受使用政策、合理的隐私期待、比例原则测试以及内容监控与元数据监控的区别。关键词:邮件监控、Barbulescu、职场隐私、互联网监控、可接受使用政策、ECHR、比例原则。
举报人数据保护合规
whistleblower-data
依据欧盟指令 2019/1937 和 GDPR,为举报(吹哨)系统实施数据保护合规。涵盖匿名举报渠道、举报人与被指控人的身份保护、保存期限限制、访问限制以及反报复措施。涉及成员国转化立法与数据保护机构(DPA)指引。关键词:举报人、指令 2019/1937、匿名举报、身份保护、报复、保存期限、举报渠道。
供应商终止数据返还与删除
vendor-termination-data
依据 GDPR 第 28(3)(g) 条的供应商终止数据返还与删除流程。涵盖数据提取格式、删除证明要求、过渡规划、残留数据处理以及终止后核验。
供应商隐私风险评分
vendor-risk-scoring
面向数据处理者管理的供应商隐私风险分级方法论。涵盖数据量、敏感度、传输地点、认证情况、泄露历史和控制成熟度等评分要素,通过加权风险计算进行风险分级与等级划分。
供应商隐私尽职调查
vendor-privacy-due-diligence
依据 GDPR 第 28(1) 条的签约前供应商隐私尽职调查。涵盖风险问卷、技术控制评估、认证审查、数据流分析以及针对处理者合作的书面充分性决策。
供应商隐私合规审计
vendor-privacy-audit
依据 GDPR 第 28(3)(h) 条进行现场和远程供应商审计程序。涵盖审计计划、证据收集方法、问题发现分类、整改跟踪以及用于处理者合规验证的审计报告生成。