Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Privacy Gateway] onboarding guide #18646

Open
wants to merge 3 commits into
base: production
Choose a base branch
from
Open

Conversation

deadlypants1973
Copy link
Contributor

@deadlypants1973 deadlypants1973 commented Dec 10, 2024

14563

Summary

adding privacy proxy onboarding guide

Documentation checklist

Copy link

cloudflare-workers-and-pages bot commented Dec 10, 2024

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: dad28d4
Status: ✅  Deploy successful!
Preview URL: https://ec952220.cloudflare-docs-7ou.pages.dev
Branch Preview URL: https://kate-fixes-pgg.cloudflare-docs-7ou.pages.dev

View logs

Copy link
Contributor

@hyperlint-ai hyperlint-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 2 total issue(s) found.

- **Privacy Proxy**: The HTTP CONNECT-based proxy service running on Cloudflare’s edge. This service validates the PAT passed by the client, enforces any double spend prevention necessary for the token. The service handles proxying of the wrapped HTTP request, as well as selection of the egress path and IP.
- **Origin**: The external (target) website for the end-user request.

DNS resolution uses [Cloudflare’s public resolver (1.1.1.1)](/1.1.1.1/) infrastructure for name resolution.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DNS resolution uses [Cloudflares public resolver (1.1.1.1)](/1.1.1.1/) infrastructure for name resolution.
DNS resolution uses [Cloudflare's public resolver (1.1.1.1)](/1.1.1.1/) infrastructure for name resolution.

Issues:

  • Style Guide - (cloudflare.NonStandardQuotes-warning) Use standard single quotes or double quotes only. Do not use any of the following quote mark types: ‘ ’ “ ”. In the text, we found this character: ’

Fix Explanation:

The non-standard single quote ’ should be replaced with the standard single quote ' to comply with the style guide. This change ensures consistency and adherence to the style guidelines.

@github-actions github-actions bot added size/m and removed size/s labels Dec 11, 2024
Copy link
Contributor

@hyperlint-ai hyperlint-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 9 total issue(s) found.

Copy link
Contributor Author

@deadlypants1973 deadlypants1973 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Questions for Mari

## System overview

The Cloudflare Privacy Proxy consists of a generic HTTPS CONNECT (and CONNECT-UDP ) proxy.
These may be used to ensure that knowledge of sensitive user information leaked in web traffic is not only available to those that need it to function.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
These may be used to ensure that knowledge of sensitive user information leaked in web traffic is not only available to those that need it to function.
These proxies ensure sensitive user information in web traffic is only accessible to those requiring it for functionality.

The Cloudflare Privacy Proxy consists of a generic HTTPS CONNECT (and CONNECT-UDP ) proxy.
These may be used to ensure that knowledge of sensitive user information leaked in web traffic is not only available to those that need it to function.

A high level overview of the system is shown below. Control plane services are shown in orange, whereas dataplane services are shown in blue.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A high level overview of the system is shown below. Control plane services are shown in orange, whereas dataplane services are shown in blue.
A high-level overview of how the the Prixacy Proxy works is shown below. Control plane services are shown in orange. Dataplane services are shown in blue.

The following components comprise the Privacy Proxy system:

- **Client**: The end-user making HTTP requests via the Privacy Proxy from within a web browser and/or other supported client.
- **Attester**: The client-facing service that authenticates the validity of end-user accounts, validates entitlements, and requests a PAT from the issuer on behalf of the end-user. Not operated by Cloudflare.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Attester**: The client-facing service that authenticates the validity of end-user accounts, validates entitlements, and requests a PAT from the issuer on behalf of the end-user. Not operated by Cloudflare.
- **Attester**: The client-facing service that authenticates the validity of end-user accounts, validates entitlements, and requests a Private Access Token (PAT) from the issuer on behalf of the end user. Not operated by Cloudflare.


- **Client**: The end-user making HTTP requests via the Privacy Proxy from within a web browser and/or other supported client.
- **Attester**: The client-facing service that authenticates the validity of end-user accounts, validates entitlements, and requests a PAT from the issuer on behalf of the end-user. Not operated by Cloudflare.
- **Privacy API**: Cloudflare service that issues PATs to the client for redemption against the Privacy Proxy service. This service mints Private Access Tokens (PATs) using the RSA blind signature protocol.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Privacy API**: Cloudflare service that issues PATs to the client for redemption against the Privacy Proxy service. This service mints Private Access Tokens (PATs) using the RSA blind signature protocol.
- **Privacy API**: Cloudflare service that issues PATs to the client for redemption against the Privacy Proxy service. Cloudflare Privacy Proxy mints Private Access Tokens (PATs) using the RSA blind signature protocol.

- **Client**: The end-user making HTTP requests via the Privacy Proxy from within a web browser and/or other supported client.
- **Attester**: The client-facing service that authenticates the validity of end-user accounts, validates entitlements, and requests a PAT from the issuer on behalf of the end-user. Not operated by Cloudflare.
- **Privacy API**: Cloudflare service that issues PATs to the client for redemption against the Privacy Proxy service. This service mints Private Access Tokens (PATs) using the RSA blind signature protocol.
- **Privacy Proxy**: The HTTP CONNECT-based proxy service running on Cloudflare’s edge. This service validates the PAT passed by the client, enforces any double spend prevention necessary for the token. The service handles proxying of the wrapped HTTP request, as well as selection of the egress path and IP.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Privacy Proxy**: The HTTP CONNECT-based proxy service running on Cloudflares edge. This service validates the PAT passed by the client, enforces any double spend prevention necessary for the token. The service handles proxying of the wrapped HTTP request, as well as selection of the egress path and IP.
- **Privacy Proxy**: The HTTP CONNECT-based proxy service running on Cloudflare's edge. Privacy Proxy validates the PAT passed by the client, enforces any double spend prevention necessary for the token. Privacy Proxy handles proxying of the wrapped HTTP request, as well as selection of the egress path and IP.

@mari the second sentence seems incomplete, is there supposed to be an "and" after "client," and before "enforces"?


This gets the token configuration for a region.

- In this case, we want the API to select the region automatically, so we must also include the X-Forwarded-For HTTP request header including the client IP for handling the region lookup.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- In this case, we want the API to select the region automatically, so we must also include the X-Forwarded-For HTTP request header including the client IP for handling the region lookup.
- In this case, you want the API to select the region automatically, so you must also include the `X-Forwarded-For` HTTP request header including the client IP for handling the region lookup.

This gets the token configuration for a region.

- In this case, we want the API to select the region automatically, so we must also include the X-Forwarded-For HTTP request header including the client IP for handling the region lookup.
- The “ _auto ” region indicates that the Privacy Proxy should use the (client; leftmost) IP address in the X-Forwarded-For HTTP request header shall be used for region selection by the edge service.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- The _autoregion indicates that the Privacy Proxy should use the (client; leftmost) IP address in the X-Forwarded-For HTTP request header shall be used for region selection by the edge service.
- The `_auto` region indicates that the Privacy Proxy should use the (client; leftmost) IP address in the `X-Forwarded-For` HTTP request header shall be used for region selection by the edge service.

@mari sentence seems wrong after "HTTP request header"


:::

- This request may specify the desired quota management policy in an HTTP header, “Sec-Quota-Policy”, which is an integer value of either 1, 2, or 3 for single-use unlimited bandwidth, single-use limited bandwidth, and multi-use limited bandwidth, respectively.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- This request may specify the desired quota management policy in an HTTP header, Sec-Quota-Policy, which is an integer value of either 1, 2, or 3 for single-use unlimited bandwidth, single-use limited bandwidth, and multi-use limited bandwidth, respectively.
- This request may specify the desired quota management policy in an HTTP header, `Sec-Quota-Policy`, which is an integer value of either `1`, `2`, or `3` for single-use unlimited bandwidth, single-use limited bandwidth, and multi-use limited bandwidth, respectively.

```

- `requests` field is a list of byte arrays for signing, which are encoded into base 64 strings. Each request is the output of the [corresponding client blind signature operation](https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-rsa-blind-signatures#section-5.1.1).
- `key_id` is a 32-byte key ID that identifies the key used to produce the signature (details are at https://tfpauly.github.io/privacy-proxy/draft-privacy-token.html). This is generated as SHA256(`token_key`), this is used by the server to determine which token key the client is using.
Copy link
Contributor Author

@deadlypants1973 deadlypants1973 Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `key_id` is a 32-byte key ID that identifies the key used to produce the signature (details are at https://tfpauly.github.io/privacy-proxy/draft-privacy-token.html). This is generated as SHA256(`token_key`), this is used by the server to determine which token key the client is using.
- `key_id` is a 32-byte key ID that identifies the key used to produce the signature (details are at https://tfpauly.github.io/privacy-proxy/draft-privacy-token.html). This is generated as SHA256(`token_key`), this is used by the server to determine which token key the client is using.

@mari are both instances of "this" refererring to key_id as the proper noun? If so, I will change "this" to key_id.


If `key_id` is invalid, the response status code is `404`.

If one of the strings in the requests field is not correctly encoded base 64 string, the response status code is `400`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If one of the strings in the requests field is not correctly encoded base 64 string, the response status code is `400`.
If one of the strings in the `requests` field is not correctly encoded base 64 string, the response status code is `400`.

@deadlypants1973 deadlypants1973 marked this pull request as ready for review December 12, 2024 00:21
@deadlypants1973 deadlypants1973 requested a review from a team as a code owner December 12, 2024 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants