provider.proto 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /*
  2. Copyright © 2022 ESO Maintainer Team
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. syntax = "proto3";
  14. option go_package = "github.com/external-secrets/external-secrets/pkg/plugin/grpc/plugin.proto";
  15. option java_multiple_files = true;
  16. option java_package = "io.external-secrets.provider.plugin";
  17. option java_outer_classname = "ProviderPluginProto";
  18. package plugin;
  19. service SecretsClient {
  20. // GetSecret returns a single secret from the provider
  21. // if GetSecret returns an error with type NoSecretError
  22. // then the secret entry will be deleted depending on the deletionPolicy.
  23. rpc GetSecret(GetSecretRequest) returns (GetSecretReply) {}
  24. // PushSecret will write a single secret into the provider
  25. rpc PushSecret(PushSecretRequest) returns (PushSecretReply) {}
  26. // DeleteSecret will delete the secret from a provider
  27. rpc DeleteSecret(DeleteSecretRequest) returns (DeleteSecretReply) {}
  28. // GetSecretMap returns multiple k/v pairs from the provider
  29. rpc GetSecretMap(GetSecretMapRequest) returns (GetSecretMapReply) {}
  30. // GetAllSecrets returns multiple k/v pairs from the provider
  31. rpc GetAllSecrets(GetAllSecretsRequest) returns (GetAllSecretsReply) {}
  32. }
  33. message GetSecretRequest {
  34. bytes store = 1;
  35. string namespace = 2;
  36. bytes objects = 3;
  37. RemoteRef remoteRef = 4;
  38. }
  39. message GetSecretReply {
  40. bytes secret = 1;
  41. string error = 2;
  42. }
  43. message PushSecretRequest {
  44. bytes store = 1;
  45. string namespace = 2;
  46. bytes objects = 3;
  47. bytes secret = 4;
  48. PushRemoteRef remoteRef = 5;
  49. }
  50. message PushSecretReply { string error = 1; }
  51. message DeleteSecretRequest {
  52. bytes store = 1;
  53. string namespace = 2;
  54. bytes objects = 3;
  55. PushRemoteRef remoteRef = 4;
  56. }
  57. message DeleteSecretReply { string error = 1; }
  58. message GetSecretMapRequest {
  59. bytes store = 1;
  60. string namespace = 2;
  61. bytes objects = 3;
  62. RemoteRef remoteRef = 4;
  63. }
  64. message GetSecretMapReply {
  65. map<string, bytes> data = 9;
  66. string error = 2;
  67. }
  68. message GetAllSecretsRequest {
  69. bytes store = 1;
  70. string namespace = 2;
  71. bytes objects = 3;
  72. ExternalSecretFind remoteRef = 4;
  73. }
  74. message GetAllSecretsReply {
  75. map<string, bytes> data = 1;
  76. string error = 2;
  77. }
  78. message RemoteRef {
  79. string key = 1;
  80. string metadataPolicy = 2;
  81. string property = 3;
  82. string version = 4;
  83. string conversionStrategy = 5;
  84. string decodingStrategy = 6;
  85. }
  86. message PushRemoteRef {
  87. string remoteKey = 1;
  88. string property = 2;
  89. }
  90. message ExternalSecretFind {
  91. string path = 1;
  92. string findNameRegexp = 2;
  93. map<string, string> tags = 3;
  94. string conversionStrategy = 4;
  95. string decodingStrategy = 5;
  96. }