Skip to content

Commit 87850f7

Browse files
Merge pull request #145 from IABTechLab/eee-UID2-6315-add-hashing-tool-to-sample-deployment
Add Hashing tool to docker and reverse-proxy services
2 parents 2aa3de9 + 982c135 commit 87850f7

File tree

18 files changed

+828
-1766
lines changed

18 files changed

+828
-1766
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ See the list below for the name of all individual services.
8989
| `prebid-client-server` | Prebid Client Server | 3052 | http://localhost:3052 |
9090
| `prebid-client-side-deferred` | Prebid Client Side Deferred | 3053 | http://localhost:3053 |
9191
| `prebid-secure-signals-client-side` | Prebid Secure Signals | 3061 | http://localhost:3061 |
92+
| `hashing-tool` | Hashing Tool | 3071 | http://localhost:3071 |
9293

9394
---
9495

docker-compose.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,13 @@ services:
139139
env_file:
140140
- .env
141141

142-
142+
# tools
143+
hashing-tool:
144+
build:
145+
context: tools/hashing-tool
146+
dockerfile: Dockerfile
147+
ports:
148+
- "3071:3071"
149+
container_name: hashing-tool
150+
env_file:
151+
- .env

siteDetails.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ const sites = [
8585
port: 3061,
8686
description: 'Prebid Secure Signals Client Side',
8787
},
88+
89+
// Tools
90+
{
91+
name: 'hashing-tool',
92+
domain: 'hashing-tool.sample-dev.com',
93+
port: 3071,
94+
description: 'Hashing Tool',
95+
},
8896
];
8997

9098
// Export for CommonJS (used by createCA.ts)

tools/hashing-tool/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM nginx:alpine
2+
3+
# Install gettext for envsubst
4+
RUN apk add --no-cache gettext
5+
6+
# Copy static files
7+
COPY index.html /usr/share/nginx/html/index.html
8+
COPY app.css /usr/share/nginx/html/app.css
9+
10+
# Copy entrypoint script
11+
COPY entrypoint.sh /entrypoint.sh
12+
RUN chmod +x /entrypoint.sh
13+
14+
# Configure nginx to serve on port 3071
15+
RUN echo 'server { \
16+
listen 3071; \
17+
location / { \
18+
root /usr/share/nginx/html; \
19+
index index.html; \
20+
} \
21+
}' > /etc/nginx/conf.d/default.conf
22+
23+
EXPOSE 3071
24+
25+
ENTRYPOINT ["/entrypoint.sh"]

tools/hashing-tool/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# UID2/EUID Hashing Tool
2+
3+
A tool to verify that your implementation is normalizing and hashing email addresses and phone numbers correctly for UID2 and EUID.
4+
5+
> **Note:** The normalization and hashing logic is identical for both UID2 and EUID.
6+
7+
## Running Locally
8+
9+
### Using Docker Compose
10+
11+
From the repository root:
12+
13+
```bash
14+
docker-compose up -d hashing-tool
15+
```
16+
17+
Access at: http://localhost:3071
18+
19+
### Using the Reverse Proxy (HTTPS)
20+
21+
```bash
22+
docker-compose up -d
23+
```
24+
25+
Access at: https://hashing-tool.sample-dev.com (requires hosts file and certificate setup — see [reverse-proxy README](../reverse-proxy/README.md))
26+
27+
## Usage
28+
29+
1. Select **Email** or **Phone Number**
30+
2. Enter the value to hash
31+
3. Click **Enter**
32+
4. View the normalized value, SHA-256 hash, and base64-encoded result
33+
34+
## Documentation
35+
36+
- [UID2 Normalization and Encoding](https://unifiedid.com/docs/getting-started/gs-normalization-encoding)
37+
- [EUID Normalization and Encoding](https://euid.eu/docs/getting-started/gs-normalization-encoding)
38+

0 commit comments

Comments
 (0)