vault.proto 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. // Trusted vault protos to communicate with backend written in proto3 to avoid
  5. // subtle differences between enum fields.
  6. syntax = "proto3";
  7. option java_multiple_files = true;
  8. option java_package = "org.chromium.components.sync.protocol";
  9. option optimize_for = LITE_RUNTIME;
  10. package sync_pb;
  11. message SharedMemberKey {
  12. int32 epoch = 1;
  13. bytes wrapped_key = 2;
  14. bytes member_proof = 3;
  15. }
  16. message RotationProof {
  17. int32 new_epoch = 1;
  18. bytes rotation_proof = 2;
  19. }
  20. message SecurityDomainDetails {
  21. message SyncDetails { bool degraded_recoverability = 1; }
  22. SyncDetails sync_details = 1;
  23. }
  24. message SecurityDomain {
  25. string name = 1;
  26. int32 current_epoch = 2;
  27. SecurityDomainDetails security_domain_details = 3;
  28. }
  29. message SecurityDomainMember {
  30. string name = 1;
  31. bytes public_key = 2;
  32. message SecurityDomainMembership {
  33. string security_domain = 1;
  34. repeated SharedMemberKey keys = 3;
  35. repeated RotationProof rotation_proofs = 4;
  36. }
  37. repeated SecurityDomainMembership memberships = 3;
  38. enum MemberType {
  39. MEMBER_TYPE_UNSPECIFIED = 0;
  40. MEMBER_TYPE_PHYSICAL_DEVICE = 1;
  41. }
  42. MemberType member_type = 4;
  43. }
  44. message JoinSecurityDomainsRequest {
  45. SecurityDomain security_domain = 1;
  46. SecurityDomainMember security_domain_member = 2;
  47. repeated SharedMemberKey shared_member_key = 3;
  48. int32 member_type_hint = 4;
  49. }
  50. message JoinSecurityDomainsResponse {
  51. SecurityDomain security_domain = 1;
  52. }
  53. message JoinSecurityDomainsErrorDetail {
  54. JoinSecurityDomainsResponse already_exists_response = 1;
  55. }
  56. // TODO(crbug.com/1234719): figure out how to link google.protobuf.Any and use
  57. // it instead.
  58. message Proto3Any {
  59. string type_url = 1;
  60. bytes value = 2;
  61. }
  62. // Forked version of google.rpc.Status.
  63. message RPCStatus {
  64. repeated Proto3Any details = 3;
  65. }