Skip to content

Commit

Permalink
Merge pull request #214 from privacysandbox/dev
Browse files Browse the repository at this point in the history
Release 1.2.0 to prod
  • Loading branch information
Seburan authored Dec 7, 2023
2 parents 5acddf5 + daf1504 commit 5d152b6
Show file tree
Hide file tree
Showing 88 changed files with 9,079 additions and 5,225 deletions.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ assignees: ""
---

**Describe the bug**

A clear and concise description of what the bug is.

**To Reproduce**

Steps to reproduce the behavior:

1. Go to '...'
Expand All @@ -18,9 +20,11 @@ Steps to reproduce the behavior:
4. See error

**Expected behavior**

A clear and concise description of what you expected to happen.

**Screenshots**

If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
Expand All @@ -37,4 +41,5 @@ If applicable, add screenshots to help explain your problem.
- Version [e.g. 22]

**Additional context**

Add any other context about the problem here.
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ assignees: ""
---

**Is your feature request related to a problem? Please describe.**

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**

A clear and concise description of what you want to happen.

**Describe alternatives you've considered**

A clear and concise description of any alternative solutions or features you've considered.

**Additional context**

Add any other context or screenshots about the feature request here.
35 changes: 35 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

config:
line-length:
line_length: 150
#stern: true
code_blocks: false
tables: false

# these are apparently in conflict with prettier's markdown formatting
list-marker-space: false
list-indent: false
ul-indent: false

headings: false

# we use inline html tags for docusaurus layout
no-inline-html: false

# we use ordered list for demo step by step but with additional information between steps
ol-prefix: false

fix: true
42 changes: 42 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

fail_fast: true
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
types_or:
- markdown
- json
- javascript
- ts
- html
- css
- json
- yaml

- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.10.0
hooks:
- id: markdownlint-cli2
name: lint markdown
ci:
autofix_prs: false
autoupdate_branch: dev
autoupdate_schedule: monthly
32 changes: 25 additions & 7 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,46 @@
{
"printWidth": 150,
"printWidth": 80,
"tabWidth": 2,
"trailingComma": "none",
"semi": false,
"useTabs": false,
"semi": true,
"singleQuote": true,
"quoteProps": "preserve",
"bracketSpacing": false,
"trailingComma": "all",
"arrowParens": "always",
"embeddedLanguageFormatting": "off",
"proseWrap": "always",
"overrides": [
{
"files": [
"**/*.js",
"**/*.ts",
"**/*.html",
"**/*.css",
"**/*.md"
"**/*.css"
]
},
{
"files": [
"**/*.json",
"**/*.yaml",
"**/*.yml"
],
"options": {
"singleQuote": false
}
},
{
"files": [
"**/*.json",
"**/tailwind.config.js"
],
"options": {
"printWidth": 40
}
},
{
"files": ["**/*.md"],
"options": {
"printWidth": 150
}
}
]
}
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Changelog

## v1.2 (2023/12/6)

### Enhancements

- GitHub documentation : Add a changelog
- Home Site : upgrade CMS to [Docusaurus v3](https://docusaurus.io/blog/releases/3.0)
- Enrollment and Attestation :
- DSP Site : serve attestation file version2 on privacy-sandbox-demos-dsp.dev
- SSP Site : serve attestation file version2 on privacy-sandbox-demos-ssp.dev
- CI/CD : Cloud Build copies the attestation files from cicd/attestations to dsp/ssp services for the target environment
- Update deployment documentation with instructions related to enrollment and attestation
- Demos
- Use Case : Single-touch conversion Attribution. Move attribution code from SSP to DSP and update documentation
- Tools :

- Add [Aggregatable Report Converter](https://github.com/privacysandbox/privacy-sandbox-demos/tree/main/tools/aggregatable_report_converter) to the
tooling codebase. This tool helps developers to create debug aggregatable reports that can be used for Local Testing and AWS Aggregation Service
testing.

- CI/CD Linting and Reformating code base on commit/PR
- pre-commit.ci won't fix automatically but only raise a warning when submitting PR
- prettier will now wrap markdown file where line length exceeds 150 chars
- markdownlint will ignore line length on tables, ordered list validation, and html tags included for docusaurus layout.

### Bug Fixes

- #76
- #77
- #178

---

## v1.1 (2023/10/13)

### Enhancements

- Shop site : refactor service using expressJS (from nextJS)
- Shop site : fix issue with Firebase filtering session cookies
- DSP Site : attestation file is served from privacy-sandbox-demos-dsp.dev
- Use Case : remarketing. Move `renderURL` from the SSP codebase to the DSP codebase.
- Use Case : VAST Video Protected Audience. Release v1.

### Bug Fixes

- Use Case : Single-touch conversion Attribution. Fix registering attribution sources ("Attribution-Reporting-Eligible" is a Dictionary Structured
Header and thus need to be decoded accordingly)
- Home site : fix Docusaurus and nginx configuration that prevented direct links to use cases
- Home site : fix broken links in documentation
- GitHub documentation : update deployment guides

---

## v1.0.0 (2023/06/30)

- Launch Privacy Sandbox Demos [Github Repository](https://github.com/privacysandbox/privacy-sandbox-demos)
- Launch hosted demos [https://privacy-sandbox-demos.dev/](https://privacy-sandbox-demos.dev/)
- Publication of a [blog post](https://developer.chrome.com/blog/privacy-sandbox-demos/)on [developers.chrome.com](http://developers.chrome.com/)
47 changes: 33 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
# How to Contribute

We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.
We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.

## Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution,
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to <https://cla.developers.google.com/> to see
your current agreements on file or to sign a new one.
Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your
contribution, this simply gives us permission to use and redistribute your contributions as part of the project. Head over to
<https://cla.developers.google.com/> to see your current agreements on file or to sign a new one.

You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.
You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to
do it again.

## Code reviews

All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. Consult
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
information on using pull requests.
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests.

## Code linting

We use a pre-commit hook to clean/format code before submitting a change. This allows for a cleaner code base. pre-commit will fetch and trigger the
_prettier_ and _markdown_ link tools and run it through your staged files.

Install pre-commit on your cloud top

```shell
sudo apt install pre-commit
```

Then install the git hook :

```shell
pre-commit install
```

you can also run pre-commit on all the files manually before committing your changes :

```shell
pre-commit run --all-files
```

more information about pre-commit : <https://pre-commit.com/>
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
# Privacy Sandbox Demos

A use case demo library for
[Privacy Sandbox APIs](https://developer.chrome.com/en/docs/privacy-sandbox/) on the web.
A use case demo library for [Privacy Sandbox APIs](https://developer.chrome.com/en/docs/privacy-sandbox/) on the web.

## Motivation

The Privacy Sandbox initiative offers [20+ APIs](https://developer.chrome.com/en/docs/privacy-sandbox/) to protect people’s privacy online while giving companies and developers tools to build thriving digital businesses.
The Privacy Sandbox initiative offers [20+ APIs](https://developer.chrome.com/en/docs/privacy-sandbox/) to protect people’s privacy online while
giving companies and developers tools to build thriving digital businesses.

Web ecosystem developers expect new approaches to typical use cases supported today by third-party cookies. These use cases often require incorporating a combination of new Privacy Sandbox APIs into their products, which requires advanced planning and a clear understanding how these APIs work.
Web ecosystem developers expect new approaches to typical use cases supported today by third-party cookies. These use cases often require
incorporating a combination of new Privacy Sandbox APIs into their products, which requires advanced planning and a clear understanding how these APIs
work.

## Our proposition

The Privacy Sandbox Demos repository offers cookbook recipes, sample code, and demo applications, based on Privacy Sandbox APIs. These are intended to aid businesses and developers in adapting their applications and the businesses they support to a web ecosystem without third-party cookies.
The Privacy Sandbox Demos repository offers cookbook recipes, sample code, and demo applications, based on Privacy Sandbox APIs. These are intended to
aid businesses and developers in adapting their applications and the businesses they support to a web ecosystem without third-party cookies.

All the demo code and assets are released under the Apache open-source [license](https://github.com/privacysandbox/privacy-sandbox-demos) to allow you to extend and modify the code for your own needs.
All the demo code and assets are released under the Apache open-source [license](https://github.com/privacysandbox/privacy-sandbox-demos) to allow you
to extend and modify the code for your own needs.

This repository contains :

Expand All @@ -23,7 +27,8 @@ This repository contains :
- [Instructions for deploying and running the demos on Google Cloud Platform](docs/deploy-to-gcp.md)
- Development framework to contribute to the project

If you are a developer we recommend you follow the [deployment instructions](docs/deploy-to-linux-docker.md). If you are simply curious, we recommend you have a look at our [Google-hosted instances](https://privacy-sandbox-demos.dev) to quickly start learning and experimenting.
If you are a developer we recommend you follow the [deployment instructions](docs/deploy-to-linux-docker.md). If you are simply curious, we recommend
you have a look at our [Google-hosted instances](https://privacy-sandbox-demos.dev) to quickly start learning and experimenting.

## Use Cases

Expand All @@ -44,7 +49,8 @@ These use cases are based on a set of demo apps and services that we have develo
| SSP service (Supply Side Platform) | The demo SSP service will Choose ads to show based on Topics, Protected Audience auctions and other contextual or first-party signals. Show ads in iframe or fenced frame. Register view/click impressions with Attribution Reporting API. Detect ad fraud via Private State Tokens |
| DSP service (Demand Side Platform) | The demo DSP service will Add a user into an Interest Group with Protected Audience API. Register conversions with Attribution Reporting API |

We’re continuing our effort to deliver comprehensive documentation and demos, and we welcome your feedback on which use cases you would like to see in future releases. Share your ideas and feedback on our issue tracker.
We’re continuing our effort to deliver comprehensive documentation and demos, and we welcome your feedback on which use cases you would like to see in
future releases. Share your ideas and feedback on our issue tracker.

---

Expand Down
41 changes: 41 additions & 0 deletions cicd/attestations/privacy-sandbox-attestations.json.dsp.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"privacy_sandbox_api_attestations": [
{
"attestation_parser_version": "2",
"attestation_version": "1",
"privacy_policy": [
"https://policies.google.com/privacy"
],
"ownership_token": "nTnUCtbPyTd5O9ev8OlcTRRGz02BYKf2qXRbZ3baiwZy5Pqsss5wOiu6Fi6lv6nT",
"issued_seconds_since_epoch": 1698941188,
"enrollment_id": "Z7XX7",
"enrollment_site": "https://privacy-sandcastle-dev-dsp.web.app/",
"platform_attestations": [
{
"platform": "chrome",
"attestations": {
"attribution_reporting_api": {
"ServiceNotUsedForIdentifyingUserAcrossSites": true
},
"shared_storage_api": {
"ServiceNotUsedForIdentifyingUserAcrossSites": true
},
"private_aggregation_api": {
"ServiceNotUsedForIdentifyingUserAcrossSites": true
},
"topics_api": {
"ServiceNotUsedForIdentifyingUserAcrossSites": true
},
"protected_audience_api": {
"ServiceNotUsedForIdentifyingUserAcrossSites": true
}
}
},
{
"platform": "android",
"attestations": {}
}
]
}
]
}
Loading

0 comments on commit 5d152b6

Please sign in to comment.