encryption.proto 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. /**
  19. * These .proto interfaces are private and stable.
  20. * Please see https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/Compatibility.html
  21. * for what changes are allowed for a *stable* .proto interface.
  22. */
  23. syntax="proto2";
  24. // This file contains protocol buffers that are used throughout HDFS -- i.e.
  25. // by the client, server, and data transfer protocols.
  26. option java_package = "org.apache.hadoop.hdfs.protocol.proto";
  27. option java_outer_classname = "EncryptionZonesProtos";
  28. option java_generate_equals_and_hash = true;
  29. package hadoop.hdfs;
  30. import "hdfs.proto";
  31. message CreateEncryptionZoneRequestProto {
  32. required string src = 1;
  33. optional string keyName = 2;
  34. }
  35. message CreateEncryptionZoneResponseProto {
  36. }
  37. message ListEncryptionZonesRequestProto {
  38. required int64 id = 1;
  39. }
  40. message EncryptionZoneProto {
  41. required int64 id = 1;
  42. required string path = 2;
  43. required CipherSuiteProto suite = 3;
  44. required CryptoProtocolVersionProto cryptoProtocolVersion = 4;
  45. required string keyName = 5;
  46. }
  47. message ListEncryptionZonesResponseProto {
  48. repeated EncryptionZoneProto zones = 1;
  49. required bool hasMore = 2;
  50. }
  51. enum ReencryptActionProto {
  52. CANCEL_REENCRYPT = 1;
  53. START_REENCRYPT = 2;
  54. }
  55. message ReencryptEncryptionZoneRequestProto {
  56. required ReencryptActionProto action = 1;
  57. required string zone = 2;
  58. }
  59. message ReencryptEncryptionZoneResponseProto {
  60. }
  61. message ListReencryptionStatusRequestProto {
  62. required int64 id = 1;
  63. }
  64. enum ReencryptionStateProto {
  65. SUBMITTED = 1;
  66. PROCESSING = 2;
  67. COMPLETED = 3;
  68. }
  69. message ZoneReencryptionStatusProto {
  70. required int64 id = 1;
  71. required string path = 2;
  72. required ReencryptionStateProto state = 3;
  73. required string ezKeyVersionName = 4;
  74. required int64 submissionTime = 5;
  75. required bool canceled = 6;
  76. required int64 numReencrypted = 7;
  77. required int64 numFailures = 8;
  78. optional int64 completionTime = 9;
  79. optional string lastFile = 10;
  80. }
  81. message ListReencryptionStatusResponseProto {
  82. repeated ZoneReencryptionStatusProto statuses = 1;
  83. required bool hasMore = 2;
  84. }
  85. message GetEZForPathRequestProto {
  86. required string src = 1;
  87. }
  88. message GetEZForPathResponseProto {
  89. optional EncryptionZoneProto zone = 1;
  90. }