mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-02 10:52:49 +02:00
custom rego in databroker (#1124)
* add support for sub policies * add support for sub policies * update authz rego policy to support sub policies
This commit is contained in:
parent
1d82be2c0e
commit
504197d83b
10 changed files with 576 additions and 277 deletions
|
@ -9,6 +9,9 @@ session := input.databroker_data.session
|
|||
user := input.databroker_data.user
|
||||
directory_user := input.databroker_data.directory_user
|
||||
|
||||
all_allowed_domains := get_allowed_domains(route_policy)
|
||||
all_allowed_groups := get_allowed_groups(route_policy)
|
||||
all_allowed_users := get_allowed_users(route_policy)
|
||||
|
||||
# allow public
|
||||
allow {
|
||||
|
@ -25,7 +28,7 @@ allow {
|
|||
|
||||
# allow by email
|
||||
allow {
|
||||
user.email == route_policy.allowed_users[_]
|
||||
user.email == all_allowed_users[_]
|
||||
input.session.impersonate_email == ""
|
||||
}
|
||||
|
||||
|
@ -33,33 +36,33 @@ allow {
|
|||
allow {
|
||||
some group
|
||||
directory_user.groups[_] = group
|
||||
route_policy.allowed_groups[_] = group
|
||||
all_allowed_groups[_] = group
|
||||
input.session.impersonate_groups == null
|
||||
}
|
||||
|
||||
# allow by impersonate email
|
||||
allow {
|
||||
route_policy.allowed_users[_] = input.session.impersonate_email
|
||||
all_allowed_users[_] = input.session.impersonate_email
|
||||
}
|
||||
|
||||
# allow by impersonate group
|
||||
allow {
|
||||
some group
|
||||
input.session.impersonate_groups[_] = group
|
||||
route_policy.allowed_groups[_] = group
|
||||
all_allowed_groups[_] = group
|
||||
}
|
||||
|
||||
# allow by domain
|
||||
allow {
|
||||
some domain
|
||||
email_in_domain(user.email, route_policy.allowed_domains[domain])
|
||||
email_in_domain(user.email, all_allowed_domains[domain])
|
||||
input.session.impersonate_email == ""
|
||||
}
|
||||
|
||||
# allow by impersonate domain
|
||||
allow {
|
||||
some domain
|
||||
email_in_domain(input.session.impersonate_email, route_policy.allowed_domains[domain])
|
||||
email_in_domain(input.session.impersonate_email, all_allowed_domains[domain])
|
||||
}
|
||||
|
||||
# allow pomerium urls
|
||||
|
@ -156,3 +159,25 @@ email_in_domain(email, domain) {
|
|||
element_in_list(list, elem) {
|
||||
list[_] = elem
|
||||
}
|
||||
|
||||
get_allowed_users(policy) = v {
|
||||
sub_allowed_users = [sp.allowed_users | sp := policy.sub_policies[_]]
|
||||
v := { x | x = array.concat(
|
||||
policy.allowed_users,
|
||||
[u | u := policy.sub_policies[_].allowed_users[_]]
|
||||
)[_] }
|
||||
}
|
||||
|
||||
get_allowed_domains(policy) = v {
|
||||
v := { x | x = array.concat(
|
||||
policy.allowed_domains,
|
||||
[u | u := policy.sub_policies[_].allowed_domains[_]]
|
||||
)[_] }
|
||||
}
|
||||
|
||||
get_allowed_groups(policy) = v {
|
||||
v := { x | x = array.concat(
|
||||
policy.allowed_groups,
|
||||
[u | u := policy.sub_policies[_].allowed_groups[_]]
|
||||
)[_] }
|
||||
}
|
||||
|
|
|
@ -312,3 +312,37 @@ test_allowed_route_regex {
|
|||
allowed_route("http://example.com/admin/somepath", {"regex": "/admin/.*"})
|
||||
not allowed_route("http://example.com", {"regex": "[xyz]"})
|
||||
}
|
||||
|
||||
test_sub_policy {
|
||||
x := get_allowed_users({
|
||||
"source": "example.com",
|
||||
"allowed_users": ["u1", "u2"],
|
||||
"sub_policies": [
|
||||
{ "allowed_users": ["u1", "u3"] },
|
||||
{ "allowed_users": ["u2", "u4"] }
|
||||
]
|
||||
})
|
||||
x == {"u1", "u2", "u3", "u4"}
|
||||
|
||||
|
||||
y := get_allowed_domains({
|
||||
"source": "example.com",
|
||||
"allowed_domains": ["d1", "d2"],
|
||||
"sub_policies": [
|
||||
{ "allowed_domains": ["d1", "d3"] },
|
||||
{ "allowed_domains": ["d2", "d4"] }
|
||||
]
|
||||
})
|
||||
y == {"d1", "d2", "d3", "d4"}
|
||||
|
||||
|
||||
z := get_allowed_groups({
|
||||
"source": "example.com",
|
||||
"allowed_groups": ["g1", "g2"],
|
||||
"sub_policies": [
|
||||
{ "allowed_groups": ["g1", "g3"] },
|
||||
{ "allowed_groups": ["g2", "g4"] }
|
||||
]
|
||||
})
|
||||
z == {"g1", "g2", "g3", "g4"}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -6,12 +6,14 @@ import (
|
|||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/rs/zerolog"
|
||||
|
||||
"github.com/pomerium/pomerium/authorize/evaluator"
|
||||
"github.com/pomerium/pomerium/config"
|
||||
"github.com/pomerium/pomerium/internal/httputil"
|
||||
"github.com/pomerium/pomerium/internal/log"
|
||||
"github.com/pomerium/pomerium/internal/sessions"
|
||||
|
@ -238,9 +240,52 @@ func (a *Authorize) getEvaluatorRequestFromCheckRequest(in *envoy_service_auth_v
|
|||
ImpersonateGroups: sessionState.ImpersonateGroups,
|
||||
}
|
||||
}
|
||||
p := a.getMatchingPolicy(requestURL)
|
||||
if p != nil {
|
||||
for _, sp := range p.SubPolicies {
|
||||
req.CustomPolicies = append(req.CustomPolicies, sp.Rego...)
|
||||
}
|
||||
}
|
||||
return req
|
||||
}
|
||||
|
||||
func (a *Authorize) getMatchingPolicy(requestURL *url.URL) *config.Policy {
|
||||
options := a.currentOptions.Load()
|
||||
|
||||
for _, p := range options.Policies {
|
||||
if p.Source == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if p.Source.Host != requestURL.Host {
|
||||
continue
|
||||
}
|
||||
|
||||
if p.Prefix != "" {
|
||||
if !strings.HasPrefix(requestURL.Path, p.Prefix) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
if p.Path != "" {
|
||||
if requestURL.Path != p.Path {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
if p.Regex != "" {
|
||||
re, err := regexp.Compile(p.Regex)
|
||||
if err == nil && !re.MatchString(requestURL.String()) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
return &p
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func getHTTPRequestFromCheckRequest(req *envoy_service_auth_v2.CheckRequest) *http.Request {
|
||||
hattrs := req.GetAttributes().GetRequest().GetHttp()
|
||||
hreq := &http.Request{
|
||||
|
|
|
@ -41,6 +41,14 @@ func Test_getEvaluatorRequest(t *testing.T) {
|
|||
a := new(Authorize)
|
||||
encoder, _ := jws.NewHS256Signer([]byte{0, 0, 0, 0}, "")
|
||||
a.currentEncoder.Store(encoder)
|
||||
a.currentOptions.Store(&config.Options{
|
||||
Policies: []config.Policy{{
|
||||
Source: &config.StringURL{URL: &url.URL{Host: "example.com"}},
|
||||
SubPolicies: []config.SubPolicy{{
|
||||
Rego: []string{"allow = true"},
|
||||
}},
|
||||
}},
|
||||
})
|
||||
|
||||
actual := a.getEvaluatorRequestFromCheckRequest(&envoy_service_auth_v2.CheckRequest{
|
||||
Attributes: &envoy_service_auth_v2.AttributeContext{
|
||||
|
@ -74,6 +82,7 @@ func Test_getEvaluatorRequest(t *testing.T) {
|
|||
},
|
||||
ClientCertificate: certPEM,
|
||||
},
|
||||
CustomPolicies: []string{"allow = true"},
|
||||
}
|
||||
assert.Equal(t, expect, actual)
|
||||
}
|
||||
|
|
|
@ -109,10 +109,22 @@ type Policy struct {
|
|||
// EnableGoogleCloudServerlessAuthentication adds "Authorization: Bearer ID_TOKEN" headers
|
||||
// to upstream requests.
|
||||
EnableGoogleCloudServerlessAuthentication bool `mapstructure:"enable_google_cloud_serverless_authentication" yaml:"enable_google_cloud_serverless_authentication,omitempty"` //nolint
|
||||
|
||||
SubPolicies []SubPolicy `mapstructure:"sub_policies" yaml:"sub_policies" json:"sub_policies"`
|
||||
}
|
||||
|
||||
// A SubPolicy is a protobuf Policy within a protobuf Route.
|
||||
type SubPolicy struct {
|
||||
ID string `mapstructure:"id" yaml:"id" json:"id"`
|
||||
Name string `mapstructure:"name" yaml:"name" json:"name"`
|
||||
AllowedUsers []string `mapstructure:"allowed_users" yaml:"allowed_users,omitempty" json:"allowed_users,omitempty"`
|
||||
AllowedGroups []string `mapstructure:"allowed_groups" yaml:"allowed_groups,omitempty" json:"allowed_groups,omitempty"`
|
||||
AllowedDomains []string `mapstructure:"allowed_domains" yaml:"allowed_domains,omitempty" json:"allowed_domains,omitempty"`
|
||||
Rego []string `mapstructure:"rego" yaml:"rego" json:"rego,omitempty"`
|
||||
}
|
||||
|
||||
// NewPolicyFromProto creates a new Policy from a protobuf policy config route.
|
||||
func NewPolicyFromProto(pb *configpb.Policy) (*Policy, error) {
|
||||
func NewPolicyFromProto(pb *configpb.Route) (*Policy, error) {
|
||||
timeout, _ := ptypes.Duration(pb.GetTimeout())
|
||||
|
||||
p := &Policy{
|
||||
|
@ -142,13 +154,34 @@ func NewPolicyFromProto(pb *configpb.Policy) (*Policy, error) {
|
|||
PassIdentityHeaders: pb.GetPassIdentityHeaders(),
|
||||
KubernetesServiceAccountToken: pb.GetKubernetesServiceAccountToken(),
|
||||
}
|
||||
for _, sp := range pb.GetPolicies() {
|
||||
p.SubPolicies = append(p.SubPolicies, SubPolicy{
|
||||
ID: sp.GetId(),
|
||||
Name: sp.GetName(),
|
||||
AllowedUsers: sp.GetAllowedUsers(),
|
||||
AllowedGroups: sp.GetAllowedGroups(),
|
||||
AllowedDomains: sp.GetAllowedDomains(),
|
||||
Rego: sp.GetRego(),
|
||||
})
|
||||
}
|
||||
return p, p.Validate()
|
||||
}
|
||||
|
||||
// ToProto converts the policy to a protobuf type.
|
||||
func (p *Policy) ToProto() *configpb.Policy {
|
||||
func (p *Policy) ToProto() *configpb.Route {
|
||||
timeout := ptypes.DurationProto(p.UpstreamTimeout)
|
||||
return &configpb.Policy{
|
||||
sps := make([]*configpb.Policy, 0, len(p.SubPolicies))
|
||||
for _, sp := range p.SubPolicies {
|
||||
sps = append(sps, &configpb.Policy{
|
||||
Id: sp.ID,
|
||||
Name: sp.Name,
|
||||
AllowedUsers: sp.AllowedUsers,
|
||||
AllowedGroups: sp.AllowedGroups,
|
||||
AllowedDomains: sp.AllowedDomains,
|
||||
Rego: sp.Rego,
|
||||
})
|
||||
}
|
||||
return &configpb.Route{
|
||||
Name: fmt.Sprint(p.RouteID()),
|
||||
From: p.From,
|
||||
To: p.To,
|
||||
|
@ -175,6 +208,7 @@ func (p *Policy) ToProto() *configpb.Policy {
|
|||
PreserveHostHeader: p.PreserveHostHeader,
|
||||
PassIdentityHeaders: p.PassIdentityHeaders,
|
||||
KubernetesServiceAccountToken: p.KubernetesServiceAccountToken,
|
||||
Policies: sps,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -91,8 +91,8 @@ func (src *ConfigSource) rebuild(firstTime bool) {
|
|||
|
||||
// add all the config policies to the list
|
||||
for _, cfgpb := range src.dbConfigs {
|
||||
for _, policypb := range cfgpb.GetPolicies() {
|
||||
policy, err := config.NewPolicyFromProto(policypb)
|
||||
for _, routepb := range cfgpb.GetRoutes() {
|
||||
policy, err := config.NewPolicyFromProto(routepb)
|
||||
if err != nil {
|
||||
log.Warn().Err(err).Msg("databroker: error converting protobuf into policy")
|
||||
continue
|
||||
|
|
|
@ -45,7 +45,7 @@ func TestConfigSource(t *testing.T) {
|
|||
|
||||
data, _ := ptypes.MarshalAny(&configpb.Config{
|
||||
Name: "config",
|
||||
Policies: []*configpb.Policy{
|
||||
Routes: []*configpb.Route{
|
||||
{
|
||||
From: "https://from.example.com",
|
||||
To: "https://to.example.com",
|
||||
|
|
|
@ -31,8 +31,8 @@ type Config struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Policies []*Policy `protobuf:"bytes,2,rep,name=policies,proto3" json:"policies,omitempty"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Routes []*Route `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Config) Reset() {
|
||||
|
@ -74,23 +74,26 @@ func (x *Config) GetName() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (x *Config) GetPolicies() []*Policy {
|
||||
func (x *Config) GetRoutes() []*Route {
|
||||
if x != nil {
|
||||
return x.Policies
|
||||
return x.Routes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Policy struct {
|
||||
type Route struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
|
||||
To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"`
|
||||
AllowedUsers []string `protobuf:"bytes,4,rep,name=allowed_users,json=allowedUsers,proto3" json:"allowed_users,omitempty"`
|
||||
AllowedGroups []string `protobuf:"bytes,5,rep,name=allowed_groups,json=allowedGroups,proto3" json:"allowed_groups,omitempty"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
|
||||
To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"`
|
||||
// Deprecated: Do not use.
|
||||
AllowedUsers []string `protobuf:"bytes,4,rep,name=allowed_users,json=allowedUsers,proto3" json:"allowed_users,omitempty"`
|
||||
// Deprecated: Do not use.
|
||||
AllowedGroups []string `protobuf:"bytes,5,rep,name=allowed_groups,json=allowedGroups,proto3" json:"allowed_groups,omitempty"`
|
||||
// Deprecated: Do not use.
|
||||
AllowedDomains []string `protobuf:"bytes,6,rep,name=allowed_domains,json=allowedDomains,proto3" json:"allowed_domains,omitempty"`
|
||||
Prefix string `protobuf:"bytes,7,opt,name=prefix,proto3" json:"prefix,omitempty"`
|
||||
Path string `protobuf:"bytes,8,opt,name=path,proto3" json:"path,omitempty"`
|
||||
|
@ -112,12 +115,258 @@ type Policy struct {
|
|||
PreserveHostHeader bool `protobuf:"varint,24,opt,name=preserve_host_header,json=preserveHostHeader,proto3" json:"preserve_host_header,omitempty"`
|
||||
PassIdentityHeaders bool `protobuf:"varint,25,opt,name=pass_identity_headers,json=passIdentityHeaders,proto3" json:"pass_identity_headers,omitempty"`
|
||||
KubernetesServiceAccountToken string `protobuf:"bytes,26,opt,name=kubernetes_service_account_token,json=kubernetesServiceAccountToken,proto3" json:"kubernetes_service_account_token,omitempty"`
|
||||
Policies []*Policy `protobuf:"bytes,27,rep,name=policies,proto3" json:"policies,omitempty"`
|
||||
Id string `protobuf:"bytes,28,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Route) Reset() {
|
||||
*x = Route{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_config_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Route) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Route) ProtoMessage() {}
|
||||
|
||||
func (x *Route) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_config_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Route.ProtoReflect.Descriptor instead.
|
||||
func (*Route) Descriptor() ([]byte, []int) {
|
||||
return file_config_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Route) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Route) GetFrom() string {
|
||||
if x != nil {
|
||||
return x.From
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Route) GetTo() string {
|
||||
if x != nil {
|
||||
return x.To
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (x *Route) GetAllowedUsers() []string {
|
||||
if x != nil {
|
||||
return x.AllowedUsers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (x *Route) GetAllowedGroups() []string {
|
||||
if x != nil {
|
||||
return x.AllowedGroups
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (x *Route) GetAllowedDomains() []string {
|
||||
if x != nil {
|
||||
return x.AllowedDomains
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Route) GetPrefix() string {
|
||||
if x != nil {
|
||||
return x.Prefix
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Route) GetPath() string {
|
||||
if x != nil {
|
||||
return x.Path
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Route) GetRegex() string {
|
||||
if x != nil {
|
||||
return x.Regex
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Route) GetCorsAllowPreflight() bool {
|
||||
if x != nil {
|
||||
return x.CorsAllowPreflight
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Route) GetAllowPublicUnauthenticatedAccess() bool {
|
||||
if x != nil {
|
||||
return x.AllowPublicUnauthenticatedAccess
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Route) GetTimeout() *duration.Duration {
|
||||
if x != nil {
|
||||
return x.Timeout
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Route) GetAllowWebsockets() bool {
|
||||
if x != nil {
|
||||
return x.AllowWebsockets
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Route) GetTlsSkipVerify() bool {
|
||||
if x != nil {
|
||||
return x.TlsSkipVerify
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Route) GetTlsServerName() string {
|
||||
if x != nil {
|
||||
return x.TlsServerName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Route) GetTlsCustomCa() string {
|
||||
if x != nil {
|
||||
return x.TlsCustomCa
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Route) GetTlsCustomCaFile() string {
|
||||
if x != nil {
|
||||
return x.TlsCustomCaFile
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Route) GetTlsClientCert() string {
|
||||
if x != nil {
|
||||
return x.TlsClientCert
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Route) GetTlsClientKey() string {
|
||||
if x != nil {
|
||||
return x.TlsClientKey
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Route) GetTlsClientCertFile() string {
|
||||
if x != nil {
|
||||
return x.TlsClientCertFile
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Route) GetTlsClientKeyFile() string {
|
||||
if x != nil {
|
||||
return x.TlsClientKeyFile
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Route) GetSetRequestHeaders() map[string]string {
|
||||
if x != nil {
|
||||
return x.SetRequestHeaders
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Route) GetRemoveRequestHeaders() []string {
|
||||
if x != nil {
|
||||
return x.RemoveRequestHeaders
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Route) GetPreserveHostHeader() bool {
|
||||
if x != nil {
|
||||
return x.PreserveHostHeader
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Route) GetPassIdentityHeaders() bool {
|
||||
if x != nil {
|
||||
return x.PassIdentityHeaders
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Route) GetKubernetesServiceAccountToken() string {
|
||||
if x != nil {
|
||||
return x.KubernetesServiceAccountToken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Route) GetPolicies() []*Policy {
|
||||
if x != nil {
|
||||
return x.Policies
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Route) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Policy struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
AllowedUsers []string `protobuf:"bytes,3,rep,name=allowed_users,json=allowedUsers,proto3" json:"allowed_users,omitempty"`
|
||||
AllowedGroups []string `protobuf:"bytes,4,rep,name=allowed_groups,json=allowedGroups,proto3" json:"allowed_groups,omitempty"`
|
||||
AllowedDomains []string `protobuf:"bytes,5,rep,name=allowed_domains,json=allowedDomains,proto3" json:"allowed_domains,omitempty"`
|
||||
Rego []string `protobuf:"bytes,6,rep,name=rego,proto3" json:"rego,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Policy) Reset() {
|
||||
*x = Policy{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_config_proto_msgTypes[1]
|
||||
mi := &file_config_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -130,7 +379,7 @@ func (x *Policy) String() string {
|
|||
func (*Policy) ProtoMessage() {}
|
||||
|
||||
func (x *Policy) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_config_proto_msgTypes[1]
|
||||
mi := &file_config_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -143,7 +392,14 @@ func (x *Policy) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use Policy.ProtoReflect.Descriptor instead.
|
||||
func (*Policy) Descriptor() ([]byte, []int) {
|
||||
return file_config_proto_rawDescGZIP(), []int{1}
|
||||
return file_config_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *Policy) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Policy) GetName() string {
|
||||
|
@ -153,20 +409,6 @@ func (x *Policy) GetName() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (x *Policy) GetFrom() string {
|
||||
if x != nil {
|
||||
return x.From
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Policy) GetTo() string {
|
||||
if x != nil {
|
||||
return x.To
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Policy) GetAllowedUsers() []string {
|
||||
if x != nil {
|
||||
return x.AllowedUsers
|
||||
|
@ -188,146 +430,13 @@ func (x *Policy) GetAllowedDomains() []string {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (x *Policy) GetPrefix() string {
|
||||
func (x *Policy) GetRego() []string {
|
||||
if x != nil {
|
||||
return x.Prefix
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Policy) GetPath() string {
|
||||
if x != nil {
|
||||
return x.Path
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Policy) GetRegex() string {
|
||||
if x != nil {
|
||||
return x.Regex
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Policy) GetCorsAllowPreflight() bool {
|
||||
if x != nil {
|
||||
return x.CorsAllowPreflight
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Policy) GetAllowPublicUnauthenticatedAccess() bool {
|
||||
if x != nil {
|
||||
return x.AllowPublicUnauthenticatedAccess
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Policy) GetTimeout() *duration.Duration {
|
||||
if x != nil {
|
||||
return x.Timeout
|
||||
return x.Rego
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Policy) GetAllowWebsockets() bool {
|
||||
if x != nil {
|
||||
return x.AllowWebsockets
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Policy) GetTlsSkipVerify() bool {
|
||||
if x != nil {
|
||||
return x.TlsSkipVerify
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Policy) GetTlsServerName() string {
|
||||
if x != nil {
|
||||
return x.TlsServerName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Policy) GetTlsCustomCa() string {
|
||||
if x != nil {
|
||||
return x.TlsCustomCa
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Policy) GetTlsCustomCaFile() string {
|
||||
if x != nil {
|
||||
return x.TlsCustomCaFile
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Policy) GetTlsClientCert() string {
|
||||
if x != nil {
|
||||
return x.TlsClientCert
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Policy) GetTlsClientKey() string {
|
||||
if x != nil {
|
||||
return x.TlsClientKey
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Policy) GetTlsClientCertFile() string {
|
||||
if x != nil {
|
||||
return x.TlsClientCertFile
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Policy) GetTlsClientKeyFile() string {
|
||||
if x != nil {
|
||||
return x.TlsClientKeyFile
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Policy) GetSetRequestHeaders() map[string]string {
|
||||
if x != nil {
|
||||
return x.SetRequestHeaders
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Policy) GetRemoveRequestHeaders() []string {
|
||||
if x != nil {
|
||||
return x.RemoveRequestHeaders
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Policy) GetPreserveHostHeader() bool {
|
||||
if x != nil {
|
||||
return x.PreserveHostHeader
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Policy) GetPassIdentityHeaders() bool {
|
||||
if x != nil {
|
||||
return x.PassIdentityHeaders
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Policy) GetKubernetesServiceAccountToken() string {
|
||||
if x != nil {
|
||||
return x.KubernetesServiceAccountToken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_config_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_config_proto_rawDesc = []byte{
|
||||
|
@ -335,90 +444,107 @@ var file_config_proto_rawDesc = []byte{
|
|||
0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a,
|
||||
0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
|
||||
0x51, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a,
|
||||
0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x17, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69,
|
||||
0x65, 0x73, 0x22, 0xb2, 0x09, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64,
|
||||
0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c,
|
||||
0x6c, 0x6f, 0x77, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c,
|
||||
0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x05, 0x20, 0x03,
|
||||
0x28, 0x09, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70,
|
||||
0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x6d,
|
||||
0x61, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x6f,
|
||||
0x77, 0x65, 0x64, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72,
|
||||
0x65, 0x66, 0x69, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66,
|
||||
0x69, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18,
|
||||
0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x12, 0x30, 0x0a, 0x14,
|
||||
0x63, 0x6f, 0x72, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x6c,
|
||||
0x69, 0x67, 0x68, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x63, 0x6f, 0x72, 0x73,
|
||||
0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x65, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x12, 0x4d,
|
||||
0x0a, 0x23, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x75,
|
||||
0x6e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61,
|
||||
0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x20, 0x61, 0x6c, 0x6c,
|
||||
0x6f, 0x77, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e,
|
||||
0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x33, 0x0a,
|
||||
0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
|
||||
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f,
|
||||
0x75, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x77, 0x65, 0x62, 0x73,
|
||||
0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61, 0x6c,
|
||||
0x6c, 0x6f, 0x77, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a,
|
||||
0x0f, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79,
|
||||
0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x53, 0x6b, 0x69, 0x70, 0x56,
|
||||
0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
|
||||
0x74, 0x6c, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a,
|
||||
0x0d, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x61, 0x18, 0x10,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x6c, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43,
|
||||
0x61, 0x12, 0x2b, 0x0a, 0x12, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f,
|
||||
0x63, 0x61, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74,
|
||||
0x6c, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x61, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x26,
|
||||
0x0a, 0x0f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72,
|
||||
0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x43, 0x6c, 0x69, 0x65,
|
||||
0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6c,
|
||||
0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
|
||||
0x74, 0x6c, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x14,
|
||||
0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x6c, 0x73, 0x43,
|
||||
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x2d, 0x0a,
|
||||
0x13, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x5f,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x6c, 0x73, 0x43,
|
||||
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x5e, 0x0a, 0x13,
|
||||
0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64,
|
||||
0x65, 0x72, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x70, 0x6f, 0x6d, 0x65,
|
||||
0x72, 0x69, 0x75, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x6f, 0x6c, 0x69,
|
||||
0x63, 0x79, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61,
|
||||
0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x73, 0x65, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x16,
|
||||
0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68,
|
||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x72, 0x65,
|
||||
0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x68,
|
||||
0x6f, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x12, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x65,
|
||||
0x61, 0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x65,
|
||||
0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x19, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x13, 0x70, 0x61, 0x73, 0x73, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
|
||||
0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x20, 0x6b, 0x75, 0x62, 0x65,
|
||||
0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x1a, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x1d, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65,
|
||||
0x6e, 0x1a, 0x44, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48,
|
||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75,
|
||||
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2f, 0x70,
|
||||
0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63,
|
||||
0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x4c, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a,
|
||||
0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e,
|
||||
0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e,
|
||||
0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x81, 0x0a,
|
||||
0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66,
|
||||
0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12,
|
||||
0x27, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73,
|
||||
0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f,
|
||||
0x77, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x29, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f,
|
||||
0x77, 0x65, 0x64, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09,
|
||||
0x42, 0x02, 0x18, 0x01, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x47, 0x72, 0x6f,
|
||||
0x75, 0x70, 0x73, 0x12, 0x2b, 0x0a, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x64,
|
||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01,
|
||||
0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68,
|
||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x67,
|
||||
0x65, 0x78, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x6f, 0x72, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77,
|
||||
0x5f, 0x70, 0x72, 0x65, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x12, 0x63, 0x6f, 0x72, 0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x65, 0x66, 0x6c,
|
||||
0x69, 0x67, 0x68, 0x74, 0x12, 0x4d, 0x0a, 0x23, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x75,
|
||||
0x62, 0x6c, 0x69, 0x63, 0x5f, 0x75, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63,
|
||||
0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x55, 0x6e,
|
||||
0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x41, 0x63, 0x63,
|
||||
0x65, 0x73, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0c,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
||||
0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x6f,
|
||||
0x77, 0x5f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b,
|
||||
0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f,
|
||||
0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x6c,
|
||||
0x73, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x74,
|
||||
0x6c, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f,
|
||||
0x6d, 0x5f, 0x63, 0x61, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x6c, 0x73, 0x43,
|
||||
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x61, 0x12, 0x2b, 0x0a, 0x12, 0x74, 0x6c, 0x73, 0x5f, 0x63,
|
||||
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x61, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x11, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6c, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x61,
|
||||
0x46, 0x69, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6c, 0x69, 0x65,
|
||||
0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74,
|
||||
0x6c, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x0e,
|
||||
0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x13,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6c, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b,
|
||||
0x65, 0x79, 0x12, 0x2f, 0x0a, 0x14, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74,
|
||||
0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x11, 0x74, 0x6c, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x46,
|
||||
0x69, 0x6c, 0x65, 0x12, 0x2d, 0x0a, 0x13, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e,
|
||||
0x74, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x10, 0x74, 0x6c, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x46, 0x69,
|
||||
0x6c, 0x65, 0x12, 0x5d, 0x0a, 0x13, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x2d, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11,
|
||||
0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
|
||||
0x73, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28,
|
||||
0x09, 0x52, 0x14, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x73, 0x65,
|
||||
0x72, 0x76, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18,
|
||||
0x18, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x48,
|
||||
0x6f, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x61, 0x73,
|
||||
0x73, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x70, 0x61, 0x73, 0x73, 0x49, 0x64,
|
||||
0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a,
|
||||
0x20, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65,
|
||||
0x6e, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65,
|
||||
0x74, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69,
|
||||
0x65, 0x73, 0x18, 0x1b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72,
|
||||
0x69, 0x75, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63,
|
||||
0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x64, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x1a, 0x44, 0x0a, 0x16, 0x53,
|
||||
0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73,
|
||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
||||
0x01, 0x22, 0xb5, 0x01, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0e, 0x0a, 0x02,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72,
|
||||
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64,
|
||||
0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64,
|
||||
0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61,
|
||||
0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x27, 0x0a, 0x0f,
|
||||
0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18,
|
||||
0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x6f,
|
||||
0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65, 0x67, 0x6f, 0x18, 0x06, 0x20,
|
||||
0x03, 0x28, 0x09, 0x52, 0x04, 0x72, 0x65, 0x67, 0x6f, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74,
|
||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d,
|
||||
0x2f, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x72,
|
||||
0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -433,22 +559,24 @@ func file_config_proto_rawDescGZIP() []byte {
|
|||
return file_config_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_config_proto_goTypes = []interface{}{
|
||||
(*Config)(nil), // 0: pomerium.config.Config
|
||||
(*Policy)(nil), // 1: pomerium.config.Policy
|
||||
nil, // 2: pomerium.config.Policy.SetRequestHeadersEntry
|
||||
(*duration.Duration)(nil), // 3: google.protobuf.Duration
|
||||
(*Route)(nil), // 1: pomerium.config.Route
|
||||
(*Policy)(nil), // 2: pomerium.config.Policy
|
||||
nil, // 3: pomerium.config.Route.SetRequestHeadersEntry
|
||||
(*duration.Duration)(nil), // 4: google.protobuf.Duration
|
||||
}
|
||||
var file_config_proto_depIdxs = []int32{
|
||||
1, // 0: pomerium.config.Config.policies:type_name -> pomerium.config.Policy
|
||||
3, // 1: pomerium.config.Policy.timeout:type_name -> google.protobuf.Duration
|
||||
2, // 2: pomerium.config.Policy.set_request_headers:type_name -> pomerium.config.Policy.SetRequestHeadersEntry
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
1, // 0: pomerium.config.Config.routes:type_name -> pomerium.config.Route
|
||||
4, // 1: pomerium.config.Route.timeout:type_name -> google.protobuf.Duration
|
||||
3, // 2: pomerium.config.Route.set_request_headers:type_name -> pomerium.config.Route.SetRequestHeadersEntry
|
||||
2, // 3: pomerium.config.Route.policies:type_name -> pomerium.config.Policy
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_config_proto_init() }
|
||||
|
@ -470,6 +598,18 @@ func file_config_proto_init() {
|
|||
}
|
||||
}
|
||||
file_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Route); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Policy); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -488,7 +628,7 @@ func file_config_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_config_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
@ -7,18 +7,18 @@ import "google/protobuf/duration.proto";
|
|||
|
||||
message Config {
|
||||
string name = 1;
|
||||
repeated Policy policies = 2;
|
||||
repeated Route routes = 2;
|
||||
}
|
||||
|
||||
message Policy {
|
||||
message Route {
|
||||
string name = 1;
|
||||
|
||||
string from = 2;
|
||||
string to = 3;
|
||||
|
||||
repeated string allowed_users = 4;
|
||||
repeated string allowed_groups = 5;
|
||||
repeated string allowed_domains = 6;
|
||||
repeated string allowed_users = 4 [deprecated = true];
|
||||
repeated string allowed_groups = 5 [deprecated = true];
|
||||
repeated string allowed_domains = 6 [deprecated = true];
|
||||
|
||||
string prefix = 7;
|
||||
string path = 8;
|
||||
|
@ -46,4 +46,16 @@ message Policy {
|
|||
bool pass_identity_headers = 25;
|
||||
|
||||
string kubernetes_service_account_token = 26;
|
||||
|
||||
repeated Policy policies = 27;
|
||||
string id = 28;
|
||||
}
|
||||
|
||||
message Policy {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
repeated string allowed_users = 3;
|
||||
repeated string allowed_groups = 4;
|
||||
repeated string allowed_domains = 5;
|
||||
repeated string rego = 6;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue