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

Be able to run an attestated end to end test with Chrome and the key/value service #49

Open
fhoering opened this issue May 6, 2024 · 7 comments

Comments

@fhoering
Copy link

fhoering commented May 6, 2024

We would like to deploy the key/value service on GCP and/or AWS and be able to run a real end to end test with a Chrome on-device auction being able to call the TEE key/value service.

In particular this means that we can:

  • deploy the key/value GRPC service in a TEE, we would like to test all features from the ad retrieval workflow
  • deploy the envoy proxy to translate HTTP => GRPC requests (in the same TEE or separate TEEs by setting up TEE => TEE communication), it seems like at least the GCP deployment only handles GRPC and the load balancer part still needs to be set up
    https://github.com/privacysandbox/protected-auction-key-value-service/blob/9a60180f9d6f52a4ca805e5463ecc9e5e80e88f9/docs/deployment/deploying_on_gcp.md
  • having Chrome run an on-device auction, can Chrome already handle the v2 API ? Here only the v1 is mentioned and it is what is currently being tested for on-device auctions
  • having the coordinator/KMS checking the attestation and provision the TEE with private keys and give Chrome access to the public keys, in general it seems like the code attestation part is not handled yet, we would like be able to simulate this step offline also in particular verifying the published code hashes of the key/value service and all dependencies
  • Chrome initiates the TLS connection with the key/value service TEE
  • The auction can start sending keys to the key/value service and handle the reply

Can you give us a timeline on when a documentation for this setup could be ready ?

@lx3-g
Copy link
Collaborator

lx3-g commented May 6, 2024

Hello Fabian Höring,

We have a roadmap which we will publish soon. That roadmap should answer your questions above. Once it's published, we will update this thread,

Alex

@peiwenhu
Copy link
Collaborator

peiwenhu commented May 6, 2024

Hi, Fabian,

I think you have mentioned this in somewhere else and it might have been confusing to you: to clarify, the ad retrieval workflow is for Protected App Signals. It is not for Protected Audience. On a high level, the K/V server can be used in both PAS and PA. However, the UDF (and server query) API is slightly different in each, which enables different workflows. This particular workflow, cannot be used as-is in PA. It is only supported when used along with the Bidding & Auction services in the PAS context.

@fhoering
Copy link
Author

fhoering commented May 7, 2024

OK. I would like to use the key/value server for Protected Audience.
But I'm referring to this page because it contains a good documentation on the features I would like to use in particular ad filtering and ML inference. Also see my comment from here.

It seems like the first step to do, to replace our current BYO key/value server implementation that already works but without the additional complexity of bidding and auction services. And that means I need UDFs, ML inference and potential other new features.

This particular workflow, cannot be used as-is in PA. It is only supported when used along with the Bidding & Auction services in the PAS context.

Should I make a formal request/ticket to support this workflow ?

@michaelkleber
Copy link
Contributor

Hi Fabian, Protected Audience doesn't support dynamic ad retrieval. First, this would be a real change to the privacy model. Second, for on-device PA, there isn't an easy path to add it because it doesn't interact well with k-anon checks.

There was a bunch of discussion in the first half of WICG/turtledove#729. The Microsoft Edge folks have said they do want to support dynamic ad retrieval in the Ad Selection API, their version of PA + B&A, and we discussed a bit in WICG/privacy-preserving-ads#54.

Is the rest of this flow still valuable to you without the dynamic ad retrieval, keeping the current PA mechanism where the ad URLs must be stored in the Interest Group? (Perhaps with the quick-IG-update capability from the bottom half of WICG/turtledove#729?)

@fhoering
Copy link
Author

Yes, I think everything can be done without dynamic ad retrieval and by storing the render urls directly in the interest group. The latest changes to reduce the IG update time with updateIfOlderThanMs will also help.

I had a look at the page explaining a high level overview of Protected APP signals and the actual implementation and maybe the confusion is coming from the fact that they seem very different.

So I will re-explain my use case. I'm in the context of Protected Audience executed in an on-device auction in Chrome and I would like to use the TEE key/value service for the following:

  • Coarse-grained ad selection
  • Ad Filtering
  • Lightweight scoring and Top-K selection (this is where ML inference is needed)

I would precompute a list of candidate ads during IG creation and then during bidding, when the key/value service is called, score the list of candidate ads, send the score back to the bidding function and then select the right ad based on the score. I likely will not have 100k candidates but orders of magnitude less, a reasonable amount to be stored inside the interest group but enough such that I would like to do real time scoring during bidding all the time instead of scoring the ads during tagging and only putting the relevant ads and scores.

This use case assumes that some additional signals are made available in the key/value server for example the geolocation to do country based ad candidate filtering. But I understood at some point (WICG/turtledove#892) that more signals like geo location signals and also publisher related signals could be provided to the TEE kv server call.

@bjschnei
Copy link

Hi Fabian,

Chrome does not yet support the V2 API, but the KV server does have an internal translation, enabling UDF execution for V1 see flag

To clarify prior comments, all functionality in the KV server is available to you, including setQuery, in the event you would like to use it for your PA UDF logic.

@bjschnei bjschnei reopened this Jun 21, 2024
@fhoering
Copy link
Author

fhoering commented Jun 24, 2024

Yes, I succeeded to set up V1 => V2 mapping to be able to query with the existing way. The V1 protocol seems also simpler than the V2 protocol.

About the features it seems like model ML inference is not available yet in the KV server.

In general this ticket is mostly about some documentation on how to set up the attested KV service with the coordinator. So no need necessarily to talk about ML inference here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants