Skip to content

REV-32: GPP Section-Header parsers for MD/IN/KY/RI#5

Closed
revcontent-paperclip[bot] wants to merge 1 commit into
masterfrom
REV-32-iabconsent-md-in-ky-ri-parsers
Closed

REV-32: GPP Section-Header parsers for MD/IN/KY/RI#5
revcontent-paperclip[bot] wants to merge 1 commit into
masterfrom
REV-32-iabconsent-md-in-ky-ri-parsers

Conversation

@revcontent-paperclip

@revcontent-paperclip revcontent-paperclip Bot commented Jun 15, 2026

Copy link
Copy Markdown

What

Adds IAB GPP US-State parsers for Maryland (24), Indiana (25), Kentucky (26), Rhode Island (27) in iabconsent. Split out of REV-28 (Minnesota + TCF 2.3, PR #4).

Design

These sections differ from the older flat US-State sections in their core field set, but use the same segment layout: section value = core segment (segment 0) + optional subsection (segment 1), split on .. The spec's "Section Header" (SectionID/Version/SubSections) is part of the GPP client-side API representation and is not serialized into the encoded consent string.

  • Combined MspaMode Int(2) (0=N/A, 1=Opt-Out Option, 2=Service Provider) replaces the separate MspaOptOutOptionMode/MspaServiceProviderMode. Core ordering: MspaVersion, MspaCoveredTransaction, MspaMode first.
  • MD: core omits SensitiveDataProcessing and KnownChildSensitiveDataConsents; subsection 1 is the legacy GPC subsection (carries a SubsectionType prefix).
  • IN/KY/RI: core adds a single KnownChildSensitiveDataConsents Int(2); subsection 1 is Sensitive Data Consents = SensitiveDataProcessing N-Bitfield(2,8), no type prefix.
  • Section IDs 24–27 added; dispatch wired through NewMspa / MapGppSectionToParser. New code isolated in mspa_us_state_v2.go; only MspaMode is added to the shared struct.

Validation

Wire format + field layout verified against the canonical IAB reference encoder/decoder and test vectors in iabgpp-es PR #106:

  • MD: BQAA (default, GPC excluded), BQAA.QA (default), BVVU.YA (all fields set, GPC=true)
  • IN/KY/RI: BQAA (default, sensitive excluded), BQAA.AAA (default), BVVV.kkk (all fields set, sensitive=[2,1,0,2,1,0,2,1])

Tests decode those canonical strings per state and assert the parsed values, plus an end-to-end ParseGppConsent routing test. go build + full suite green (57 checks).

Notes

  • MD/IN/KY/RI specs are finalized (out of public comment Dec 2025; laws in effect). iabgpp-es PR #106 is still open (not yet merged), but it is the canonical IAB reference implementation and provides the conformance vectors used here.
  • SID constants for these four use explicit values (24–27) and include UsMinnesotaSID = 23 so they don't collide with the sibling REV-28 / PR REV-28: Add Minnesota (usmn) GPP parser and IAB TCF v2.3 support #4 branch.

Tracking: REV-32.

Implement IAB GPP US-State parsers for Maryland (24), Indiana (25),
Kentucky (26), and Rhode Island (27).

These sections differ from the older flat US-State sections in their core
field set, but use the same segment layout: section value = core segment
(segment 0) + optional subsection (segment 1), split on ".". The spec's
"Section Header" (SectionID/Version/SubSections) is part of the client-side
API representation and is NOT serialized into the encoded payload.

- Combined MspaMode Int(2) field (0=N/A, 1=Opt-Out Option, 2=Service
  Provider) replacing the separate OptOutOption/ServiceProvider fields.
  Core ordering: MspaVersion, MspaCoveredTransaction, MspaMode first.
- MD core omits SensitiveDataProcessing + KnownChildSensitiveDataConsents;
  MD subsection 1 is the legacy GPC subsection (carries SubsectionType).
- IN/KY/RI core adds a single KnownChildSensitiveDataConsents Int(2);
  subsection 1 is "Sensitive Data Consents" (N-Bitfield(2,8), no type prefix).
- Section IDs 24-27 added; dispatch wired through NewMspa / MapGppSectionToParser.

Wire format + field layout verified against the canonical IAB reference
encoder/decoder and test vectors in iabgpp-es PR #106 (UsMd "BQAA.QA" /
"BVVU.YA"; UsIn/UsKy/UsRi "BQAA.AAA" / "BVVV.kkk"). Tests decode those
canonical strings per state, plus an end-to-end ParseGppConsent routing test.
Build + full suite green.

Co-Authored-By: Paperclip <[email protected]>
@revcontent-paperclip

Copy link
Copy Markdown
Author

Superseded by #6, which consolidates this branch with its sibling into a single conflict-free, test-verified PR for REVA-165 (these two branches both declared and could not both merge). Recommend closing in favor of #6.

@revcontent-paperclip

Copy link
Copy Markdown
Author

Superseded by #6, which consolidates this branch with its sibling into a single conflict-free, test-verified PR for REVA-165. (These two branches both declared UsMinnesotaSID — one via iota, one explicitly as 23 — so they could not both merge to master.) Recommend closing in favor of #6. My earlier comment here was truncated by a shell-quoting bug; this is the corrected note.

revcontent-paperclip Bot added a commit that referenced this pull request Jun 17, 2026
Add GPP parsers for the newer US-State sections Minnesota (23), Maryland (24), Indiana (25), Kentucky (26), Rhode Island (27), reusing MspaParsedConsent + enums; confirm IAB TCF v2.3 (TCFPolicyVersion 5 -> MinorVersion 3) is handled by the existing v2 parser. Flat-section ParseConsent() envelopes consolidated into parseMspaSection(); fixture-style tests added for the new states, pinned to canonical iabgpp-es vectors.

Supersedes #4 and #5.

Co-Authored-By: Paperclip <[email protected]>
@revcontent-paperclip

Copy link
Copy Markdown
Author

Superseded by #6, which consolidated the REV-28 + REV-32 work (MN/MD/IN/KY/RI GPP parsers + TCF v2.3) and merged to master as 997f477. Closing as superseded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants