Commit 83bcf82e authored by Nela Kaczmarek's avatar Nela Kaczmarek Committed by Commit Bot

Add LookupAffiliationByHashPrefix Request and Response to affiliation_api.proto.

This change adds LookupAffiliationByHashPrefixRequest and LookupAffiliationByHashPrefixResponse to support requesting affiliations by sending only hash prefixes of facets.
It will be used in AffiliationServiceImpl to support users requiring more privacy.

Bug: 1108279
Change-Id: I69c6d55520d478f276b76b61a47d89d6d14f5958
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421493Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Nela Kaczmarek <nelakaczmarek@google.com>
Cr-Commit-Position: refs/heads/master@{#808938}
parent 10fb0322
......@@ -10,7 +10,7 @@ option optimize_for = LITE_RUNTIME;
// The messages below mirror the corresponding messages on the server side.
// These should be updated once the server side changes.
// Synced version: http://shortn/_g0W3toNGei
// Synced version: http://shortn/_TgsbdjhbU3
// Contains a list of affiliated facets.
// Affiliated facets are allowed to share credentials among each other.
......@@ -158,3 +158,33 @@ message LookupAffiliationResponse {
// Information required for grouping facets in the UI.
repeated FacetGroup group = 2;
}
// Request message for AffiliationService.LookupByHashPrefix.
message LookupAffiliationByHashPrefixRequest {
// Request mask.
optional LookupAffiliationMask mask = 1;
// Number of bits in each hash prefix. Required, request will fail
// if this is not set.
optional uint32 hash_prefix_length = 2;
// The prefixes of the requested hashes. Encoding of the string prior to
// hashing should be UTF-8. SHA256 should be used to calculate the hashes. The
// prefix will be taken as the first 'hash_prefix_length' number of bits
// of this uint64. Other bits will be ignored.
repeated uint64 hash_prefixes = 3;
}
// Response message for AffiliationService.LookupByHashPrefix.
message LookupAffiliationByHashPrefixResponse {
// Affiliations containing facets that match the requested prefixes.
// Affiliations will be deduplicated, i.e. if an affiliation matched multiple
// prefixes only one copy will be returned. No correlation should be assumed
// between the order of returned affiliations and the order of requested
// prefixes.
repeated Affiliation affiliations = 1;
// Information required for grouping facets in the UI. Ordering and
// deplication works the same as for affiliations.
repeated FacetGroup groups = 2;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment