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

subscriber-01: Implement draft-wang-ppm-dap-taskprov-02 #2067

Merged
merged 5 commits into from
Oct 12, 2023

Conversation

inahga
Copy link
Contributor

@inahga inahga commented Oct 3, 2023

Adopts draft-wang-ppm-dap-taskprov-02 for the subscriber-01 branch.

The primary difference between this revision and the latest is that the taskprov configuration is expressed in the extension field of each report share. A helper must parse the extension in each AggregateInitRequest and use it to provision the task.

The implementation of this is unclean. Due to how AggregateInitRequest is structured, we need to know the query type ahead of time. We can't decode it unless we know the query type, but we won't know the query type until we decode it. To work around this, decode by trial.

To simplify implementation I made all helper requests use the main aggregator auth token established in #1976. Leader requests are unmodified, but are effectively inert/useless now. We can consider removing leader endpoints in a future PR.

The first commit contains the operative logic, the remaining commits address tests.

Tests underwent considerable modification. The aggregate init harness needed to be adapted to provide the taskprov extension and aggregator authentication token. I accepted the large amount of change on the basis that we will likely just want to revert this PR to adopt taskprov-04+ again.

I disabled all integration tests as this branch can no longer service non-taskprov leader->helper requests.

@inahga inahga force-pushed the inahga/sub01-taskprov-02 branch from 0f6c66f to 220febd Compare October 3, 2023 19:53
)
.await
.unwrap();

let aggregation_param = dummy_vdaf::AggregationParam(0);
let vdaf = Prio3Aes128Count::new_aes128_count(2).unwrap();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm unhappy about using Prio3 as the test VDAF as that requires us to discard tests that exercise varying aggregation parameters (unless I'm mistaken?).

Unsure if it's really worth addressing in this PR. We can either adapt the taskprov messages to accept dummy_vdaf when compiled under tests, or I can try harder to use Poplar1 (the API is quite different in libprio-rs 0.10 compared to the latest).

Copy link
Contributor

Choose a reason for hiding this comment

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

So far as we know right now, this deployment will only ever use Prio3 family VDAFs, in which case only exercising single-round, aggregation-parameter-less VDAFs is acceptable. I think it's not worth putting in more effort here until we understand this deployment's requirements better.

@inahga inahga marked this pull request as ready for review October 3, 2023 20:03
@inahga inahga requested a review from a team as a code owner October 3, 2023 20:03
Copy link
Contributor

@tgeoghegan tgeoghegan left a comment

Choose a reason for hiding this comment

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

I'm skeptical of the value of investing more work into this branch without more clarity on the requirements here. Thus far we've been making the guesses and divining what to do here from reading tea leaves, and it's already led to wasted effort (going to the taskprov that puts the config in a header and now back to per-report-extensions). Or in the context of this PR, we could simplify it somewhat if we knew which of the two query modes the subscriber is going to use exclusively.

That said, this particular piece of work is already done and this accomplishes what it sets out to do, so I think we can take this change.

)
.await
.unwrap();

let aggregation_param = dummy_vdaf::AggregationParam(0);
let vdaf = Prio3Aes128Count::new_aes128_count(2).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

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

So far as we know right now, this deployment will only ever use Prio3 family VDAFs, in which case only exercising single-round, aggregation-parameter-less VDAFs is acceptable. I think it's not worth putting in more effort here until we understand this deployment's requirements better.

aggregator/src/aggregator.rs Outdated Show resolved Hide resolved
/// Validate and authorize a taskprov request. Returns values necessary for determining whether
/// we can opt into the task. This function might return an opt-out error for conditions that
/// are relevant for all DAP workflows (e.g. task expiration).
#[tracing::instrument(skip(self, aggregator_auth_token), err)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to keep this tracing span?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, I think we should. I originally kept it out since logging on unauthorized requests might end up being just noise, but it in the early stages of integration testing it should aid in debugging.

@inahga
Copy link
Contributor Author

inahga commented Oct 12, 2023

Agreed that we ought to freeze changes to this branch after this PR until we have more clarity on requirements (or better yet, direct time with their engineering).

@inahga inahga merged commit e382f1f into release/0.subscriber-01 Oct 12, 2023
@inahga inahga deleted the inahga/sub01-taskprov-02 branch October 12, 2023 18:17
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

Successfully merging this pull request may close these issues.

2 participants