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

Switch blinded token requests to use new mywallet endpoint #21516

Closed
jsecretan opened this issue Mar 7, 2022 · 11 comments · Fixed by brave/brave-core#12657
Closed

Switch blinded token requests to use new mywallet endpoint #21516

jsecretan opened this issue Mar 7, 2022 · 11 comments · Fixed by brave/brave-core#12657

Comments

@jsecretan
Copy link

jsecretan commented Mar 7, 2022

Description

In order to better specify the privacy properties of the various ads endpoints, we want to change the hostnames to explicitly reflect the specific use according to our privacy policy:

The following endpoints should be reconfigured to go to mywallet.ads.brave.com, with the same path as current

  • /v1/getstate
  • /v2/confirmation/token/{paymentId}
  • /v2/confirmation/payment/{paymentId}

All other endpoints on ads-serve.brave.com should instead go to anonymous.ads.brave.com


Anonymous (anonymous.ads.*):
GET /v1/issuers/
POST /v2/confirmation/{confirmation_id}/{credential}
GET /v2/confirmation/{confirmation_id}/paymentToken

Non anonymous (mywallet.ads.*):

PUT /v2/confirmation/payment/{payment_id}
GET /v2/confirmation/token/{payment_id}?nonce={nonce}
POST /v2/confirmation/token/{payment_id}
GET /v{n}/catalog falls back to ads-static for production environment
GET /v1/getstate falls back to ads-static for production environment

@jsecretan jsecretan added feature/ads OS/Android Fixes related to Android browser functionality OS/Desktop labels Mar 7, 2022
@tmancey tmancey added enhancement privacy and removed OS/Android Fixes related to Android browser functionality labels Mar 7, 2022
@jsecretan jsecretan changed the title Switch blinded token requests to use IP identified endpoint Switch blinded token requests to use new mywallet endpoint Mar 8, 2022
@ShivanKaul
Copy link
Collaborator

@jsecretan can we make sure that the new endpoints are cert-pinned? @diracdeltas

@diracdeltas
Copy link
Member

see here for where ads-serve is currently pinned: https://github.com/brave/brave-core/blob/c215ec61bd7632a1235be014606361d4e2b32fac/chromium_src/net/tools/transport_security_state_generator/input_file_parsers.cc#L460

@tmancey
Copy link
Contributor

tmancey commented Mar 17, 2022

@jsecretan GET /v{n}/catalog and GET /v1/getstate will fall back to ads-static for production environment, is this still required?

@tmancey
Copy link
Contributor

tmancey commented Mar 23, 2022

@evq @jsecretan if you could let me know if we should be falling back to ads-static as above, that would be great.

@evq
Copy link
Member

evq commented Mar 23, 2022

@jsecretan I believe we discussed moving GET /v1/getstate to a new geo.ads.brave.com, were you also thinking we'd create a static.ads.brave.com for GET /v{n}/catalog for consistency? I assume all can point to the existing cloudfront distribution

@tmancey
Copy link
Contributor

tmancey commented Mar 23, 2022

@evq is the catalog not geo based? Ok it is not by country/region but it is by country

@evq
Copy link
Member

evq commented Mar 24, 2022

@tmancey I didn't think of it from that perspective, but that is a good argument to just consolidate around geo.ads.brave.com and entirely eliminate static in this new naming scheme. I'm in favor, @jsecretan does that work for you?

@jsecretan
Copy link
Author

Sounds good to me, sorry for being slow on this, here is the new issue https://github.com/brave/devops/issues/7274

@btlechowski
Copy link

btlechowski commented May 9, 2022

Verification passed on

Brave 1.39.87 Chromium: 101.0.4951.41 (Official Build) beta (64-bit)
Revision 93c720db8323b3ec10d056025ab95c23a31997c9-refs/branch-heads/4951@{#904}
OS Ubuntu 18.04 LTS

Production

geo - GET geo.ads.brave.com

image

catalog - GET static.ads.brave.com

image

issuers - GET static.ads.brave.com

image

unblinded tokens - POST mywallet.ads.brave.com

image

unblinded tokens - GET mywallet.ads.brave.com

image

redeem unblinded tokens - PUT mywallet.ads.brave.com

image

confirmation - POST anonymous.ads.brave.com

image

confirmation - paymentToken - GET anonymous.ads.brave.com

image

@btlechowski
Copy link

Added QA/Blocked till problems with staging are resolved

@btlechowski
Copy link

Verification passed on

Brave 1.39.100 Chromium: 101.0.4951.61 (Official Build) beta (64-bit)
Revision 3b3633b32c491b4cba5fd7df3c7c0f628547cbcc-refs/branch-heads/4951@{#1189}
OS Ubuntu 18.04 LTS

Staging

geo - GET geo.ads.bravesoftware.com

image

catalog - GET static.ads.bravesoftware.com

image

issuers - GET static.ads.bravesoftware.com

image

unblinded tokens - POST mywallet.ads.bravesoftware.com

image

unblinded tokens - GET mywallet.ads.bravesoftware.com

image

redeem unblinded tokens - PUT mywallet.ads.bravesoftware.com

image

confirmation - POST anonymous.ads.bravesoftware.com

image

confirmation - paymentToken - GET anonymous.ads.bravesoftware.com

image

@tmancey tmancey added this to Ads Jun 10, 2024
@tmancey tmancey moved this to Done in Ads Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants