Skip to content

Commit 62ac481

Browse files
authored
Merge pull request #837 from IABTechLab/gwh-APIDOCS-2855-how-uid2-created
Gwh apidocs 2855 how uid2 created
2 parents 1356d74 + 5f5afde commit 62ac481

File tree

10 files changed

+182
-7
lines changed

10 files changed

+182
-7
lines changed

docs/getting-started/gs-faqs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ If a user opts out through your website, you should follow your internal procedu
213213

214214
In general yes, the process of generating a raw UID2 from DII is the same, and results in the same value, no matter who sent the request. If two UID2 participants were to send the same email address to the [POST /identity/map](../endpoints/post-identity-map.md) endpoint at the same time, they would both get the same raw UID2 in response.
215215

216-
However, there is a variable factor, which is the <Link href="../ref-info/glossary-uid#gl-salt">salt</Link> value that's used in generating the raw UID2. The salt values are rotated roughly once per year (for details, see [How often should UID2s be refreshed for incremental updates?](#how-often-should-uid2s-be-refreshed-for-incremental-updates)). If the salt value changes between one request and another, those two requests result in two different raw UID2, even when the DII is the same.
216+
However, there is a variable factor, which is the secret <Link href="../ref-info/glossary-uid#gl-salt">salt</Link> value that's used in generating the raw UID2. The salt values are rotated roughly once per year (for details, see [How often should UID2s be refreshed for incremental updates?](#how-often-should-uid2s-be-refreshed-for-incremental-updates)). If the salt value changes between one request and another, those two requests result in two different raw UID2, even when the DII is the same.
217217

218218
For more information, see [Monitor for Salt Bucket Rotations for Your Stored Raw UID2s](../guides/integration-advertiser-dataprovider-overview.md#5-monitor-for-salt-bucket-rotations-for-your-stored-raw-uid2s) in the *Advertiser/Data Provider Integration Guide*.
219219

docs/getting-started/gs-normalization-encoding.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ An email hash is a Base64-encoded <Link href="../ref-info/glossary-uid#gl-sha-25
6161
| :--- | :--- | :--- |
6262
| Normalized email address | `[email protected]` | Normalization is always the first step. |
6363
| SHA-256 hash of normalized email address | `b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514` | This 64-character string is a hex-encoded representation of the 32-byte SHA-256. |
64-
| Hex to Base64 SHA-256 encoding of normalized email address | `tMmiiTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf/F5HVRQ=` | This 44-character string is a Base64-encoded representation of the 32-byte SHA-256.<br/>WARNING: The SHA-256 hash string in the example above is a hex-encoded representation of the hash value. You must Base64-encode the raw bytes of the hash or use a Base64 encoder that takes a hex-encoded value as input.<br/>Use this encoding for `email_hash` values sent in the request body. |
64+
| Hex to Base64 encoding of SHA-256 hash | `tMmiiTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf/F5HVRQ=` | This 44-character string is a Base64-encoded representation of the 32-byte SHA-256.<br/>WARNING: The SHA-256 hash string in the example above is a hex-encoded representation of the hash value. You must Base64-encode the raw bytes of the hash or use a Base64 encoder that takes a hex-encoded value as input.<br/>Use this encoding for `email_hash` values sent in the request body. |
6565

6666
:::important
6767
When applying Base64 encoding, be sure to Base64-encode the raw bytes of the hash or use a Base64 encoder that takes a hex-encoded value as input.
@@ -100,7 +100,7 @@ The following table shows an example of a simple input phone number, and the res
100100
| :--- | :--- | :--- |
101101
| Normalized phone number | `+12345678901` | Normalization is always the first step. |
102102
| SHA-256 hash of normalized phone number | `10e6f0b47054a83359477dcb35231db6de5c69fb1816e1a6b98e192de9e5b9ee` |This 64-character string is a hex-encoded representation of the 32-byte SHA-256. |
103-
| Hex to Base64 SHA-256 encoding of normalized and hashed phone number | `EObwtHBUqDNZR33LNSMdtt5cafsYFuGmuY4ZLenlue4=` | This 44-character string is a Base64-encoded representation of the 32-byte SHA-256.<br/>NOTE: The SHA-256 hash is a hexadecimal value. You must use a Base64 encoder that takes a hex value as input. Use this encoding for `phone_hash` values sent in the request body. |
103+
| Hex to Base64 encoding of SHA-256 hash | `EObwtHBUqDNZR33LNSMdtt5cafsYFuGmuY4ZLenlue4=` | This 44-character string is a Base64-encoded representation of the 32-byte SHA-256.<br/>NOTE: The SHA-256 hash is a hexadecimal value. You must use a Base64 encoder that takes a hex value as input. Use this encoding for `phone_hash` values sent in the request body. |
104104

105105
:::warning
106106
When applying Base64 encoding, be sure to use a function that takes a hex value as input. If you use a function that takes text as input, the result is a longer string which is invalid for the purposes of UID2.

docs/ref-info/glossary-uid.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ import Link from '@docusaurus/Link';
204204
<!-- <dd>**new**</dd> -->
205205

206206
<dt><MdxJumpAnchor id="gl-core-service"><a href="#gl-core-service">Core Service</a></MdxJumpAnchor></dt>
207-
<dd>The UID2 Core Service is a centralized service that manages access to <a href="#gl-salt">salts</a>, encryption keys, and other relevant data in the UID2 ecosystem.</dd>
207+
<dd>The UID2 Core Service is a centralized service that manages access to secret <a href="#gl-salt">salts</a>, encryption keys, and other relevant data in the UID2 ecosystem.</dd>
208208
<dd>For an overview of all the UID2 services, see <a href="../intro#components">Components</a>.</dd>
209209

210210
</dl>
@@ -339,7 +339,7 @@ import Link from '@docusaurus/Link';
339339

340340
<dt><MdxJumpAnchor id="gl-operator"><a href="#gl-operator">Operator</a></MdxJumpAnchor></dt>
341341
<dd>An Operator is an organization or entity that runs the UID2 <a href="#gl-operator-service">Operator Service</a>. The UID2 Operator is the API server in the UID2 ecosystem.</dd>
342-
<dd>Operators perform multiple functions, such as receiving <a href="#gl-encryption-key">encryption keys</a> and <a href="#gl-salt">salts</a> from the UID2 Core Service, salting and hashing personal data (<Link href="#gl-dii">DII</Link>) to return raw UID2s, and encrypting raw UID2s to generate UID2 tokens.</dd>
342+
<dd>Operators perform multiple functions, such as receiving <a href="#gl-encryption-key">encryption keys</a> and secret <a href="#gl-salt">salts</a> from the UID2 Core Service, salting and hashing personal data (<Link href="#gl-dii">DII</Link>) to return raw UID2s, and encrypting raw UID2s to generate UID2 tokens.</dd>
343343
<dd>A participant can also choose to become a <a href="#gl-private-operator">Private Operator</a> to access UID2 APIs and to generate raw UID2s and UID2 tokens from within a private infrastructure.</dd>
344344
<dd>For details, see <a href="../intro#participants">participants</a> and <a href="../ref-info/ref-operators-public-private">The UID2 Operator</a>.</dd>
345345

@@ -406,15 +406,15 @@ import Link from '@docusaurus/Link';
406406
<dl>
407407

408408
<dt><MdxJumpAnchor id="gl-salt"><a href="#gl-salt">Salt</a></MdxJumpAnchor></dt>
409-
<dd>A string of characters that is used in the process of transforming an email address or phone number into a secure, opaque value that cannot by itself be traced back to the original value (raw UID2 or UID2 token).</dd>
409+
<dd>A string of characters that is used in the process of transforming an email address or phone number into a secure, opaque value that cannot by itself be traced back to the original value (raw UID2 or UID2 token). Salt values are kept secret.</dd>
410410
<dd>The UID2 service uses salt as part of the process, along with hashing and encryption, to secure the original value. Salt is added to the input value before hashing.</dd>
411411

412412
<dt><MdxJumpAnchor id="gl-salt-bucket"><a href="#gl-salt-bucket">Salt bucket</a></MdxJumpAnchor></dt>
413413
<dd>A salt bucket is used to manage secret <a href="#gl-salt">salt</a> values, used to generate raw UID2s or UID2 tokens, over time. Each bucket contains a single current salt value, which remains active for approximately one year before being rotated to a new value. Buckets can be updated independently of one another.</dd>
414414
<dd>There are just over one million salt buckets, and each email address or phone number is assigned to a specific bucket in a deterministic manner. However, this assignment is not permanent; it might change when the bucket's current secret salt is rotated to a new value.</dd>
415415

416416
<dt><MdxJumpAnchor id="gl-salt-bucket-id"><a href="#gl-salt-bucket-id">Salt bucket ID</a></MdxJumpAnchor></dt>
417-
<dd>A salt bucket ID is a unique string of characters that identifies a specific <a href="#gl-salt-bucket">salt bucket</a>. The salt bucket ID can be used to check which salt buckets have recently had their salt values updated, indicating which emails or phone numbers need their raw UID2 values regenerated.</dd>
417+
<dd>A salt bucket ID is a unique string of characters that identifies a specific <a href="#gl-salt-bucket">salt bucket</a>. The salt bucket ID can be used to check which salt buckets have recently had their secret salt values updated, indicating which emails or phone numbers need their raw UID2 values regenerated.</dd>
418418
<dd>For an example of a salt bucket ID, see the response to the `POST /identity/buckets` endpoint: <a href="../endpoints/post-identity-buckets#decrypted-json-response-format">Decrypted JSON Response Format</a>.</dd>
419419

420420
<dt><MdxJumpAnchor id="gl-salted-hash"><a href="#gl-salted-hash">Salted hash</a></MdxJumpAnchor></dt>
489 KB
Loading
Binary file not shown.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
title: How the UID2 Token Is Created
3+
description: Reference information about the process for generating a UID2 token.
4+
hide_table_of_contents: false
5+
sidebar_position: 06
6+
---
7+
8+
import Link from '@docusaurus/Link';
9+
10+
# How the UID2 Token Is Created
11+
12+
:::note
13+
This article describes how the UID2 token that the publisher sends in the bidstream is created. The process is the same for advertisers creating UID2 tokens for conversion pixels. It does not apply to <Link href="../ref-info/glossary-uid#gl-tokenized-sharing">tokenized sharing</Link>, where raw UID2s are encrypted into UID2 tokens before sending to another sharing participant.
14+
:::
15+
16+
When a publisher sends a user's <Link href="../ref-info/glossary-uid#gl-dii">DII</Link>&#8212;<Link href="../ref-info/glossary-uid#gl-hash">hashed</Link> or unhashed email addresses or phone numbers&#8212;to the UID2 Operator, and in return receives a <Link href="../ref-info/glossary-uid#gl-uid2-token">UID2 token</Link> to use for targeted advertising, there is a very specific sequence of processing steps that occurs along the way.
17+
18+
Some preliminary steps are taken by the publisher, but most of the processing steps are done by the UID2 <Link href="../ref-info/glossary-uid#gl-operator">Operator</Link>.
19+
20+
It's very important that the publisher steps are performed in the correct sequence:
21+
- When steps are performed in sequence, the resulting value can be recognized as related to other [UID2 identifiers](../intro.md#uid2-identifier-types) generated from online activity by the same individual: the underlying [raw UID2](../ref-info/glossary-uid.md#gl-raw-uid2) matches the raw UID2s generated by other UID2 participants from the same DII, and therefore the token is suitable for targeted advertising.
22+
- If steps are taken out of sequence, the resulting value cannot be related to other UID2 identifiers generated from online activity by the same individual, and therefore the token is not suitable for targeted advertising.
23+
24+
For a summary, see [Steps to Create a UID2 Token](#steps-to-create-a-uid2-token). For an example in diagram form, see [Creating a UID2 Token&#8212;Example](#creating-a-uid2-tokenexample).
25+
26+
## Steps to Create a UID2 Token
27+
28+
The following table shows the steps for creating a UID2 token from DII, the sequence, and who performs each step.
29+
30+
For an example with sample values, see [Creating a UID2 Token&#8212;Example](#creating-a-uid2-tokenexample).
31+
32+
<table width="100%">
33+
<thead>
34+
<tr>
35+
<th width="5%">Step</th>
36+
<th width="35%">Action</th>
37+
<th width="30%">Who Does It?</th>
38+
<th width="35%">Documentation</th>
39+
</tr>
40+
</thead>
41+
<tbody>
42+
<tr>
43+
<td>1</td>
44+
<td><Link href="../ref-info/glossary-uid#gl-normalize">Normalization</Link></td>
45+
<td>**Email**: Publisher or UID2 Operator<br/>**Phone number**: Publisher must normalize</td>
46+
<td>[Email Address Normalization](../getting-started/gs-normalization-encoding.md#email-address-normalization)<br/>[Phone Number Normalization](../getting-started/gs-normalization-encoding.md#phone-number-normalization)</td>
47+
</tr>
48+
<tr>
49+
<td>2</td>
50+
<td><Link href="../ref-info/glossary-uid#gl-sha-256">SHA-256</Link> hashing of normalized email address</td>
51+
<td>Publisher or UID2 Operator</td>
52+
<td>[Email Address Hash Encoding](../getting-started/gs-normalization-encoding.md#email-address-hash-encoding)<br/>[Phone Number Hash Encoding](../getting-started/gs-normalization-encoding.md#phone-number-hash-encoding)</td>
53+
</tr>
54+
<tr>
55+
<td>3</td>
56+
<td>Base64 encoding of SHA-256 hash</td>
57+
<td>Publisher or UID2 Operator</td>
58+
<td>[Email Address Hash Encoding](../getting-started/gs-normalization-encoding.md#email-address-hash-encoding)<br/>[Phone Number Hash Encoding](../getting-started/gs-normalization-encoding.md#phone-number-hash-encoding)</td>
59+
</tr>
60+
<tr>
61+
<td>4</td>
62+
<td>Send value to UID2 Operator via the [POST&nbsp;/token/generate](../endpoints/post-token-generate.md) endpoint, an SDK, Prebid.js, or another supported integration.</td>
63+
<td>Publisher</td>
64+
<td>Various: for a summary, see [Implementation Resources](../overviews/overview-publishers.md#implementation-resources)</td>
65+
</tr>
66+
<tr>
67+
<td>5</td>
68+
<td>Perform multiple steps including hashing and adding the secret <Link href="../ref-info/glossary-uid#gl-salt">salt</Link> value to create a raw UID2.</td>
69+
<td>UID2 Operator</td>
70+
<td>Not applicable: these steps are all performed by the UID2 Operator.</td>
71+
</tr>
72+
<tr>
73+
<td>6</td>
74+
<td>Encrypt the raw UID2 to create a UID2 token.</td>
75+
<td>UID2 Operator</td>
76+
<td>Not applicable: performed by the UID2 Operator.</td>
77+
</tr>
78+
</tbody>
79+
</table>
80+
81+
## Creating a UID2 Token&#8212;Example
82+
83+
The following diagram shows the high-level steps for creating a [raw UID2](../ref-info/glossary-uid.md#gl-raw-uid2) (first column, second column) and then a [UID2 token](../ref-info/glossary-uid.md#gl-uid2-token) (third column).
84+
85+
The publisher can send a request to the [POST&nbsp;/token/generate](../endpoints/post-token-generate.md) endpoint or use one of the other integration options, such as an SDK or Prebid. Whatever the integration option, the result is a UID2 token&#8212;an encrypted value that the publisher can send in the bidstream for targeted advertising.
86+
87+
![Sequential steps for creating a UID2](images/HowUID2Created_UID2ImplementationPlaybook.jpg)
489 KB
Loading
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
title: How the UID2 Token Is Created
3+
description: Reference information about the process for generating a UID2 token.
4+
hide_table_of_contents: false
5+
sidebar_position: 06
6+
---
7+
8+
import Link from '@docusaurus/Link';
9+
10+
# How the UID2 Token Is Created
11+
12+
:::note
13+
This article describes how the UID2 token that the publisher sends in the bidstream is created. The process is the same for advertisers creating UID2 tokens for conversion pixels. It does not apply to <Link href="../ref-info/glossary-uid#gl-tokenized-sharing">tokenized sharing</Link>, where raw UID2s are encrypted into UID2 tokens before sending to another sharing participant.
14+
:::
15+
16+
When a publisher sends a user's <Link href="../ref-info/glossary-uid#gl-dii">DII</Link>&#8212;<Link href="../ref-info/glossary-uid#gl-hash">hashed</Link> or unhashed email addresses or phone numbers&#8212;to the UID2 Operator, and in return receives a <Link href="../ref-info/glossary-uid#gl-uid2-token">UID2 token</Link> to use for targeted advertising, there is a very specific sequence of processing steps that occurs along the way.
17+
18+
Some preliminary steps are taken by the publisher, but most of the processing steps are done by the UID2 <Link href="../ref-info/glossary-uid#gl-operator">Operator</Link>.
19+
20+
It's very important that the publisher steps are performed in the correct sequence:
21+
- When steps are performed in sequence, the resulting value can be recognized as related to other [UID2 identifiers](../intro.md#uid2-identifier-types) generated from online activity by the same individual: the underlying [raw UID2](../ref-info/glossary-uid.md#gl-raw-uid2) matches the raw UID2s generated by other UID2 participants from the same DII, and therefore the token is suitable for targeted advertising.
22+
- If steps are taken out of sequence, the resulting value cannot be related to other UID2 identifiers generated from online activity by the same individual, and therefore the token is not suitable for targeted advertising.
23+
24+
For a summary, see [Steps to Create a UID2 Token](#steps-to-create-a-uid2-token). For an example in diagram form, see [Creating a UID2 Token&#8212;Example](#creating-a-uid2-tokenexample).
25+
26+
## Steps to Create a UID2 Token
27+
28+
The following table shows the steps for creating a UID2 token from DII, the sequence, and who performs each step.
29+
30+
For an example with sample values, see [Creating a UID2 Token&#8212;Example](#creating-a-uid2-tokenexample).
31+
32+
<table width="100%">
33+
<thead>
34+
<tr>
35+
<th width="5%">Step</th>
36+
<th width="35%">Action</th>
37+
<th width="30%">Who Does It?</th>
38+
<th width="35%">Documentation</th>
39+
</tr>
40+
</thead>
41+
<tbody>
42+
<tr>
43+
<td>1</td>
44+
<td><Link href="../ref-info/glossary-uid#gl-normalize">Normalization</Link></td>
45+
<td>**Email**: Publisher or UID2 Operator<br/>**Phone number**: Publisher must normalize</td>
46+
<td>[Email Address Normalization](../getting-started/gs-normalization-encoding.md#email-address-normalization)<br/>[Phone Number Normalization](../getting-started/gs-normalization-encoding.md#phone-number-normalization)</td>
47+
</tr>
48+
<tr>
49+
<td>2</td>
50+
<td><Link href="../ref-info/glossary-uid#gl-sha-256">SHA-256</Link> hashing of normalized email address</td>
51+
<td>Publisher or UID2 Operator</td>
52+
<td>[Email Address Hash Encoding](../getting-started/gs-normalization-encoding.md#email-address-hash-encoding)<br/>[Phone Number Hash Encoding](../getting-started/gs-normalization-encoding.md#phone-number-hash-encoding)</td>
53+
</tr>
54+
<tr>
55+
<td>3</td>
56+
<td>Base64 encoding of SHA-256 hash</td>
57+
<td>Publisher or UID2 Operator</td>
58+
<td>[Email Address Hash Encoding](../getting-started/gs-normalization-encoding.md#email-address-hash-encoding)<br/>[Phone Number Hash Encoding](../getting-started/gs-normalization-encoding.md#phone-number-hash-encoding)</td>
59+
</tr>
60+
<tr>
61+
<td>4</td>
62+
<td>Send value to UID2 Operator via the [POST&nbsp;/token/generate](../endpoints/post-token-generate.md) endpoint, an SDK, Prebid.js, or another supported integration.</td>
63+
<td>Publisher</td>
64+
<td>Various: for a summary, see [Implementation Resources](../overviews/overview-publishers.md#implementation-resources)</td>
65+
</tr>
66+
<tr>
67+
<td>5</td>
68+
<td>Perform multiple steps including hashing and adding the secret <Link href="../ref-info/glossary-uid#gl-salt">salt</Link> value to create a raw UID2.</td>
69+
<td>UID2 Operator</td>
70+
<td>Not applicable: these steps are all performed by the UID2 Operator.</td>
71+
</tr>
72+
<tr>
73+
<td>6</td>
74+
<td>Encrypt the raw UID2 to create a UID2 token.</td>
75+
<td>UID2 Operator</td>
76+
<td>Not applicable: performed by the UID2 Operator.</td>
77+
</tr>
78+
</tbody>
79+
</table>
80+
81+
## Creating a UID2 Token&#8212;Example
82+
83+
The following diagram shows the high-level steps for creating a [raw UID2](../ref-info/glossary-uid.md#gl-raw-uid2) (first column, second column) and then a [UID2 token](../ref-info/glossary-uid.md#gl-uid2-token) (third column).
84+
85+
The publisher can send a request to the [POST&nbsp;/token/generate](../endpoints/post-token-generate.md) endpoint or use one of the other integration options, such as an SDK or Prebid. Whatever the integration option, the result is a UID2 token&#8212;an encrypted value that the publisher can send in the bidstream for targeted advertising.
86+
87+
![Sequential steps for creating a UID2](images/HowUID2Created_UID2ImplementationPlaybook.jpg)

0 commit comments

Comments
 (0)