-
Notifications
You must be signed in to change notification settings - Fork 4.7k
/
basic_auth.proto
52 lines (44 loc) · 1.9 KB
/
basic_auth.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
syntax = "proto3";
package envoy.extensions.filters.http.basic_auth.v3;
import "envoy/config/core/v3/base.proto";
import "udpa/annotations/sensitive.proto";
import "udpa/annotations/status.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.http.basic_auth.v3";
option java_outer_classname = "BasicAuthProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/basic_auth/v3;basic_authv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Basic Auth]
// Basic Auth :ref:`configuration overview <config_http_filters_basic_auth>`.
// [#extension: envoy.filters.http.basic_auth]
// Basic HTTP authentication.
//
// Example:
//
// .. code-block:: yaml
//
// users:
// inline_string: |-
// user1:{SHA}hashed_user1_password
// user2:{SHA}hashed_user2_password
//
message BasicAuth {
// Username-password pairs used to verify user credentials in the "Authorization" header.
// The value needs to be the htpasswd format.
// Reference to https://httpd.apache.org/docs/2.4/programs/htpasswd.html
config.core.v3.DataSource users = 1 [(udpa.annotations.sensitive) = true];
// This field specifies the header name to forward a successfully authenticated user to
// the backend. The header will be added to the request with the username as the value.
//
// If it is not specified, the username will not be forwarded.
string forward_username_header = 2
[(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}];
}
// Extra settings that may be added to per-route configuration for
// a virtual host or a cluster.
message BasicAuthPerRoute {
// Username-password pairs for this route.
config.core.v3.DataSource users = 1
[(validate.rules).message = {required: true}, (udpa.annotations.sensitive) = true];
}