Skip to content

Commit a0312e6

Browse files
James DeFelicejieyu
authored andcommitted
spec: label secret fields with csi_secret option
* partial fix for #206
1 parent 187d72d commit a0312e6

File tree

3 files changed

+325
-288
lines changed

3 files changed

+325
-288
lines changed

csi.proto

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22
syntax = "proto3";
33
package csi.v0;
44

5+
import "google/protobuf/descriptor.proto";
56
import "google/protobuf/wrappers.proto";
67

78
option go_package = "csi";
9+
10+
extend google.protobuf.FieldOptions {
11+
// Indicates that a field MAY contain information that is sensitive
12+
// and MUST be treated as such (e.g. not logged).
13+
bool csi_secret = 50000;
14+
}
815
service Identity {
916
rpc GetPluginInfo(GetPluginInfoRequest)
1017
returns (GetPluginInfoResponse) {}
@@ -211,7 +218,8 @@ message CreateVolumeRequest {
211218
// Secrets required by plugin to complete volume creation request.
212219
// This field is OPTIONAL. Refer to the `Secrets Requirements`
213220
// section on how to use this field.
214-
map<string, string> controller_create_secrets = 5;
221+
map<string, string> controller_create_secrets = 5
222+
[(csi_secret) = true];
215223

216224
// If specified, the new volume will be pre-populated with data from
217225
// this source. This field is OPTIONAL.
@@ -565,7 +573,8 @@ message DeleteVolumeRequest {
565573
// Secrets required by plugin to complete volume deletion request.
566574
// This field is OPTIONAL. Refer to the `Secrets Requirements`
567575
// section on how to use this field.
568-
map<string, string> controller_delete_secrets = 2;
576+
map<string, string> controller_delete_secrets = 2
577+
[(csi_secret) = true];
569578
}
570579

571580
message DeleteVolumeResponse {
@@ -593,7 +602,8 @@ message ControllerPublishVolumeRequest {
593602
// Secrets required by plugin to complete controller publish volume
594603
// request. This field is OPTIONAL. Refer to the
595604
// `Secrets Requirements` section on how to use this field.
596-
map<string, string> controller_publish_secrets = 5;
605+
map<string, string> controller_publish_secrets = 5
606+
[(csi_secret) = true];
597607

598608
// Attributes of the volume to be used on a node. This field is
599609
// OPTIONAL and MUST match the attributes of the Volume identified
@@ -624,7 +634,8 @@ message ControllerUnpublishVolumeRequest {
624634
// ControllerPublishVolume call for the specified volume.
625635
// This field is OPTIONAL. Refer to the `Secrets Requirements`
626636
// section on how to use this field.
627-
map<string, string> controller_unpublish_secrets = 3;
637+
map<string, string> controller_unpublish_secrets = 3
638+
[(csi_secret) = true];
628639
}
629640

630641
message ControllerUnpublishVolumeResponse {
@@ -807,7 +818,7 @@ message CreateSnapshotRequest {
807818
// Secrets required by plugin to complete snapshot creation request.
808819
// This field is OPTIONAL. Refer to the `Secrets Requirements`
809820
// section on how to use this field.
810-
map<string, string> create_snapshot_secrets = 3;
821+
map<string, string> create_snapshot_secrets = 3 [(csi_secret) = true];
811822

812823
// Plugin specific parameters passed in as opaque key-value pairs.
813824
// This field is OPTIONAL. The Plugin is responsible for parsing and
@@ -871,7 +882,7 @@ message DeleteSnapshotRequest {
871882
// Secrets required by plugin to complete snapshot deletion request.
872883
// This field is OPTIONAL. Refer to the `Secrets Requirements`
873884
// section on how to use this field.
874-
map<string, string> delete_snapshot_secrets = 2;
885+
map<string, string> delete_snapshot_secrets = 2 [(csi_secret) = true];
875886
}
876887

877888
message DeleteSnapshotResponse {}
@@ -946,7 +957,7 @@ message NodeStageVolumeRequest {
946957
// Secrets required by plugin to complete node stage volume request.
947958
// This field is OPTIONAL. Refer to the `Secrets Requirements`
948959
// section on how to use this field.
949-
map<string, string> node_stage_secrets = 5;
960+
map<string, string> node_stage_secrets = 5 [(csi_secret) = true];
950961

951962
// Attributes of the volume to publish. This field is OPTIONAL and
952963
// MUST match the attributes of the `Volume` identified by
@@ -1008,7 +1019,7 @@ message NodePublishVolumeRequest {
10081019
// Secrets required by plugin to complete node publish volume request.
10091020
// This field is OPTIONAL. Refer to the `Secrets Requirements`
10101021
// section on how to use this field.
1011-
map<string, string> node_publish_secrets = 7;
1022+
map<string, string> node_publish_secrets = 7 [(csi_secret) = true];
10121023

10131024
// Attributes of the volume to publish. This field is OPTIONAL and
10141025
// MUST match the attributes of the Volume identified by

0 commit comments

Comments
 (0)