@@ -130,10 +130,29 @@ message OIDCConfig {
130
130
// Required.
131
131
string client_id = 5 [(validate.rules ) .string.min_len = 1 ];
132
132
133
- // The OIDC client secret assigned to the filter to be used in the
134
- // [Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
135
- // Required.
136
- string client_secret = 6 [(validate.rules ) .string.min_len = 1 ];
133
+ // This message defines a reference to a Kubernetes Secret resource.
134
+ message SecretRef {
135
+ // The namespace of the referenced Secret, if not set, default to "default" namespace.
136
+ string namespace = 1 ;
137
+
138
+ // The name of the referenced Secret.
139
+ string name = 2 [(validate.rules ) .string.min_len = 1 ];
140
+ }
141
+
142
+ oneof client_secret_config {
143
+ // The OIDC client secret assigned to the filter to be used in the
144
+ // [Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
145
+ // This field keeps the client secret in plain text. Recommend to use `client_secret_ref` instead
146
+ // when running in a Kubernetes cluster.
147
+ string client_secret = 6 ;
148
+
149
+ // The Kubernetes secret that contains the OIDC client secret assigned to the filter to be used in the
150
+ // [Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
151
+ //
152
+ // This is an Opaque secret. The client secret should be stored in the key "client-secret".
153
+ // This filed is only valid when running in a Kubernetes cluster.
154
+ SecretRef client_secret_ref = 20 ;
155
+ }
137
156
138
157
// Additional scopes passed to the OIDC Provider in the
139
158
// [Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
0 commit comments