SCMSecurityProtocol.proto 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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 unstable.
  20. * Please see http://wiki.apache.org/hadoop/Compatibility
  21. * for what changes are allowed for a *unstable* .proto interface.
  22. */
  23. option java_package = "org.apache.hadoop.hdds.protocol.proto";
  24. option java_outer_classname = "SCMSecurityProtocolProtos";
  25. option java_generic_services = true;
  26. option java_generate_equals_and_hash = true;
  27. package hadoop.hdds;
  28. import "hdds.proto";
  29. /**
  30. * This message is send by data node to prove its identity and get an SCM
  31. * signed certificate.
  32. */
  33. message SCMGetDataNodeCertRequestProto {
  34. required DatanodeDetailsProto datanodeDetails = 1;
  35. required string CSR = 2;
  36. }
  37. /**
  38. * This message is send by OzoneManager to prove its identity and get an SCM
  39. * signed certificate.
  40. */
  41. message SCMGetOMCertRequestProto {
  42. required OzoneManagerDetailsProto omDetails = 1;
  43. required string CSR = 2;
  44. }
  45. /**
  46. * Proto request to get a certificate with given serial id.
  47. */
  48. message SCMGetCertificateRequestProto {
  49. required string certSerialId = 1;
  50. }
  51. /**
  52. * Proto request to get CA certificate.
  53. */
  54. message SCMGetCACertificateRequestProto {
  55. }
  56. /**
  57. * Returns a certificate signed by SCM.
  58. */
  59. message SCMGetCertResponseProto {
  60. enum ResponseCode {
  61. success = 1;
  62. authenticationFailed = 2;
  63. invalidCSR = 3;
  64. }
  65. required ResponseCode responseCode = 1;
  66. required string x509Certificate = 2; // Base64 encoded X509 certificate.
  67. optional string x509CACertificate = 3; // Base64 encoded CA X509 certificate.
  68. }
  69. service SCMSecurityProtocolService {
  70. /**
  71. * Get SCM signed certificate for DataNode.
  72. */
  73. rpc getDataNodeCertificate (SCMGetDataNodeCertRequestProto) returns
  74. (SCMGetCertResponseProto);
  75. /**
  76. * Get SCM signed certificate for DataNode.
  77. */
  78. rpc getOMCertificate (SCMGetOMCertRequestProto) returns
  79. (SCMGetCertResponseProto);
  80. /**
  81. * Get SCM signed certificate for DataNode.
  82. */
  83. rpc getCertificate (SCMGetCertificateRequestProto) returns
  84. (SCMGetCertResponseProto);
  85. /**
  86. * Get SCM signed certificate for DataNode.
  87. */
  88. rpc getCACertificate (SCMGetCACertificateRequestProto) returns
  89. (SCMGetCertResponseProto);
  90. }