Merge pull request #10814 from hashicorp/dnephin/acl-resolver-4

acl: remove ACLDisabledTTL
This commit is contained in:
Daniel Nephin 2021-08-17 14:19:00 -04:00 committed by GitHub
commit 9c99249427
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 179 additions and 133 deletions

View file

@ -3,13 +3,14 @@ package autoconf
import ( import (
"fmt" "fmt"
"github.com/mitchellh/mapstructure"
"github.com/hashicorp/consul/agent/config" "github.com/hashicorp/consul/agent/config"
"github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/agent/structs"
"github.com/hashicorp/consul/proto" "github.com/hashicorp/consul/proto"
"github.com/hashicorp/consul/proto/pbautoconf" "github.com/hashicorp/consul/proto/pbautoconf"
"github.com/hashicorp/consul/proto/pbconfig" "github.com/hashicorp/consul/proto/pbconfig"
"github.com/hashicorp/consul/proto/pbconnect" "github.com/hashicorp/consul/proto/pbconnect"
"github.com/mitchellh/mapstructure"
) )
// translateAgentConfig is meant to take in a proto/pbconfig.Config type // translateAgentConfig is meant to take in a proto/pbconfig.Config type
@ -48,7 +49,6 @@ func translateConfig(c *pbconfig.Config) config.Config {
DownPolicy: stringPtrOrNil(a.DownPolicy), DownPolicy: stringPtrOrNil(a.DownPolicy),
DefaultPolicy: stringPtrOrNil(a.DefaultPolicy), DefaultPolicy: stringPtrOrNil(a.DefaultPolicy),
EnableKeyListPolicy: &a.EnableKeyListPolicy, EnableKeyListPolicy: &a.EnableKeyListPolicy,
DisabledTTL: stringPtrOrNil(a.DisabledTTL),
EnableTokenPersistence: &a.EnableTokenPersistence, EnableTokenPersistence: &a.EnableTokenPersistence,
} }

View file

@ -4,11 +4,12 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/stretchr/testify/require"
"github.com/hashicorp/consul/agent/config" "github.com/hashicorp/consul/agent/config"
"github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/agent/structs"
pbconfig "github.com/hashicorp/consul/proto/pbconfig" pbconfig "github.com/hashicorp/consul/proto/pbconfig"
"github.com/hashicorp/consul/proto/pbconnect" "github.com/hashicorp/consul/proto/pbconnect"
"github.com/stretchr/testify/require"
) )
func stringPointer(s string) *string { func stringPointer(s string) *string {
@ -65,7 +66,6 @@ func TestTranslateConfig(t *testing.T) {
DownPolicy: "deny", DownPolicy: "deny",
DefaultPolicy: "deny", DefaultPolicy: "deny",
EnableKeyListPolicy: true, EnableKeyListPolicy: true,
DisabledTTL: "4s",
EnableTokenPersistence: true, EnableTokenPersistence: true,
MSPDisableBootstrap: false, MSPDisableBootstrap: false,
Tokens: &pbconfig.ACLTokens{ Tokens: &pbconfig.ACLTokens{
@ -127,7 +127,6 @@ func TestTranslateConfig(t *testing.T) {
DownPolicy: stringPointer("deny"), DownPolicy: stringPointer("deny"),
DefaultPolicy: stringPointer("deny"), DefaultPolicy: stringPointer("deny"),
EnableKeyListPolicy: boolPointer(true), EnableKeyListPolicy: boolPointer(true),
DisabledTTL: stringPointer("4s"),
EnableTokenPersistence: boolPointer(true), EnableTokenPersistence: boolPointer(true),
Tokens: config.Tokens{ Tokens: config.Tokens{
Master: stringPointer("99e7e490-6baf-43fc-9010-78b6aa9a6813"), Master: stringPointer("99e7e490-6baf-43fc-9010-78b6aa9a6813"),

View file

@ -873,7 +873,6 @@ func (b *builder) build() (rt RuntimeConfig, err error) {
ACLPolicyTTL: b.durationVal("acl.policy_ttl", c.ACL.PolicyTTL), ACLPolicyTTL: b.durationVal("acl.policy_ttl", c.ACL.PolicyTTL),
ACLTokenTTL: b.durationValWithDefault("acl.token_ttl", c.ACL.TokenTTL, b.durationVal("acl_ttl", c.ACLTTL)), ACLTokenTTL: b.durationValWithDefault("acl.token_ttl", c.ACL.TokenTTL, b.durationVal("acl_ttl", c.ACLTTL)),
ACLRoleTTL: b.durationVal("acl.role_ttl", c.ACL.RoleTTL), ACLRoleTTL: b.durationVal("acl.role_ttl", c.ACL.RoleTTL),
ACLDisabledTTL: b.durationVal("acl.disabled_ttl", c.ACL.DisabledTTL),
ACLDownPolicy: stringValWithDefault(c.ACL.DownPolicy, stringVal(c.ACLDownPolicy)), ACLDownPolicy: stringValWithDefault(c.ACL.DownPolicy, stringVal(c.ACLDownPolicy)),
ACLDefaultPolicy: stringValWithDefault(c.ACL.DefaultPolicy, stringVal(c.ACLDefaultPolicy)), ACLDefaultPolicy: stringValWithDefault(c.ACL.DefaultPolicy, stringVal(c.ACLDefaultPolicy)),
}, },

View file

@ -268,8 +268,6 @@ type Config struct {
SnapshotAgent map[string]interface{} `mapstructure:"snapshot_agent"` SnapshotAgent map[string]interface{} `mapstructure:"snapshot_agent"`
// non-user configurable values // non-user configurable values
// DEPRECATED (ACL-Legacy-Compat) - moved into the "acl" stanza
ACLDisabledTTL *string `mapstructure:"acl_disabled_ttl"`
AEInterval *string `mapstructure:"ae_interval"` AEInterval *string `mapstructure:"ae_interval"`
CheckDeregisterIntervalMin *string `mapstructure:"check_deregister_interval_min"` CheckDeregisterIntervalMin *string `mapstructure:"check_deregister_interval_min"`
CheckReapInterval *string `mapstructure:"check_reap_interval"` CheckReapInterval *string `mapstructure:"check_reap_interval"`
@ -741,7 +739,6 @@ type ACL struct {
DefaultPolicy *string `mapstructure:"default_policy"` DefaultPolicy *string `mapstructure:"default_policy"`
EnableKeyListPolicy *bool `mapstructure:"enable_key_list_policy"` EnableKeyListPolicy *bool `mapstructure:"enable_key_list_policy"`
Tokens Tokens `mapstructure:"tokens"` Tokens Tokens `mapstructure:"tokens"`
DisabledTTL *string `mapstructure:"disabled_ttl"`
EnableTokenPersistence *bool `mapstructure:"enable_token_persistence"` EnableTokenPersistence *bool `mapstructure:"enable_token_persistence"`
// Enterprise Only // Enterprise Only

View file

@ -184,9 +184,6 @@ func NonUserSource() Source {
Name: "non-user", Name: "non-user",
Format: "hcl", Format: "hcl",
Data: ` Data: `
acl = {
disabled_ttl = "120s"
}
check_deregister_interval_min = "1m" check_deregister_interval_min = "1m"
check_reap_interval = "30s" check_reap_interval = "30s"
ae_interval = "1m" ae_interval = "1m"

View file

@ -5241,7 +5241,6 @@ func TestLoad_FullConfig(t *testing.T) {
ACLsEnabled: true, ACLsEnabled: true,
Datacenter: "rzo029wg", Datacenter: "rzo029wg",
NodeName: "otlLxGaI", NodeName: "otlLxGaI",
ACLDisabledTTL: 120 * time.Second,
ACLDefaultPolicy: "72c2e7a0", ACLDefaultPolicy: "72c2e7a0",
ACLDownPolicy: "03eb2aee", ACLDownPolicy: "03eb2aee",
ACLTokenTTL: 3321 * time.Second, ACLTokenTTL: 3321 * time.Second,

View file

@ -3,7 +3,6 @@
"ACLMasterToken": "hidden", "ACLMasterToken": "hidden",
"ACLResolverSettings": { "ACLResolverSettings": {
"ACLDefaultPolicy": "", "ACLDefaultPolicy": "",
"ACLDisabledTTL": "0s",
"ACLDownPolicy": "", "ACLDownPolicy": "",
"ACLPolicyTTL": "0s", "ACLPolicyTTL": "0s",
"ACLRoleTTL": "0s", "ACLRoleTTL": "0s",

View file

@ -199,10 +199,11 @@ type ACLResolverConfig struct {
// Delegate that implements some helper functionality that is server/client specific // Delegate that implements some helper functionality that is server/client specific
Delegate ACLResolverDelegate Delegate ACLResolverDelegate
// AutoDisable indicates that RPC responses should be checked and if they indicate ACLs are disabled // DisableDuration is the length of time to leave ACLs disabled when an RPC
// remotely then disable them locally as well. This is particularly useful for the client agent // request to a server indicates that the ACL system is disabled. If set to
// so that it can detect when the servers have gotten ACLs enabled. // 0 then ACLs will not be disabled locally. This value is always set to 0 on
AutoDisable bool // Servers.
DisableDuration time.Duration
// ACLConfig is the configuration necessary to pass through to the acl package when creating authorizers // ACLConfig is the configuration necessary to pass through to the acl package when creating authorizers
// and when authorizing access // and when authorizing access
@ -212,6 +213,8 @@ type ACLResolverConfig struct {
Tokens *token.Store Tokens *token.Store
} }
const aclClientDisabledTTL = 30 * time.Second
// TODO: rename the fields to remove the ACL prefix // TODO: rename the fields to remove the ACL prefix
type ACLResolverSettings struct { type ACLResolverSettings struct {
ACLsEnabled bool ACLsEnabled bool
@ -228,11 +231,6 @@ type ACLResolverSettings struct {
// a major impact on performance. By default, it is set to 30 seconds. // a major impact on performance. By default, it is set to 30 seconds.
ACLRoleTTL time.Duration ACLRoleTTL time.Duration
// ACLDisabledTTL is used by agents to determine how long they will
// wait to check again with the servers if they discover ACLs are not
// enabled. (not user configurable)
ACLDisabledTTL time.Duration
// ACLDownPolicy is used to control the ACL interaction when we cannot // ACLDownPolicy is used to control the ACL interaction when we cannot
// reach the PrimaryDatacenter and the token is not in the cache. // reach the PrimaryDatacenter and the token is not in the cache.
// There are the following modes: // There are the following modes:
@ -295,8 +293,9 @@ type ACLResolver struct {
down acl.Authorizer down acl.Authorizer
autoDisable bool disableDuration time.Duration
disabled time.Time disabledUntil time.Time
// disabledLock synchronizes access to disabledUntil
disabledLock sync.RWMutex disabledLock sync.RWMutex
agentMasterAuthz acl.Authorizer agentMasterAuthz acl.Authorizer
@ -367,7 +366,7 @@ func NewACLResolver(config *ACLResolverConfig) (*ACLResolver, error) {
delegate: config.Delegate, delegate: config.Delegate,
aclConf: config.ACLConfig, aclConf: config.ACLConfig,
cache: cache, cache: cache,
autoDisable: config.AutoDisable, disableDuration: config.DisableDuration,
down: down, down: down,
tokens: config.Tokens, tokens: config.Tokens,
agentMasterAuthz: authz, agentMasterAuthz: authz,
@ -1195,17 +1194,15 @@ func (r *ACLResolver) resolveTokenToIdentityAndRoles(token string) (structs.ACLI
return lastIdentity, nil, lastErr return lastIdentity, nil, lastErr
} }
func (r *ACLResolver) disableACLsWhenUpstreamDisabled(err error) error { func (r *ACLResolver) handleACLDisabledError(err error) {
if !r.autoDisable || err == nil || !acl.IsErrDisabled(err) { if r.disableDuration == 0 || err == nil || !acl.IsErrDisabled(err) {
return err return
} }
r.logger.Debug("ACLs disabled on upstream servers, will retry", "retry_interval", r.config.ACLDisabledTTL) r.logger.Debug("ACLs disabled on servers, will retry", "retry_interval", r.disableDuration)
r.disabledLock.Lock() r.disabledLock.Lock()
r.disabled = time.Now().Add(r.config.ACLDisabledTTL) r.disabledUntil = time.Now().Add(r.disableDuration)
r.disabledLock.Unlock() r.disabledLock.Unlock()
return err
} }
func (r *ACLResolver) resolveLocallyManagedToken(token string) (structs.ACLIdentity, acl.Authorizer, bool) { func (r *ACLResolver) resolveLocallyManagedToken(token string) (structs.ACLIdentity, acl.Authorizer, bool) {
@ -1241,14 +1238,15 @@ func (r *ACLResolver) ResolveTokenToIdentityAndAuthorizer(token string) (structs
if r.delegate.UseLegacyACLs() { if r.delegate.UseLegacyACLs() {
identity, authorizer, err := r.resolveTokenLegacy(token) identity, authorizer, err := r.resolveTokenLegacy(token)
return identity, authorizer, r.disableACLsWhenUpstreamDisabled(err) r.handleACLDisabledError(err)
return identity, authorizer, err
} }
defer metrics.MeasureSince([]string{"acl", "ResolveToken"}, time.Now()) defer metrics.MeasureSince([]string{"acl", "ResolveToken"}, time.Now())
identity, policies, err := r.resolveTokenToIdentityAndPolicies(token) identity, policies, err := r.resolveTokenToIdentityAndPolicies(token)
if err != nil { if err != nil {
r.disableACLsWhenUpstreamDisabled(err) r.handleACLDisabledError(err)
if IsACLRemoteError(err) { if IsACLRemoteError(err) {
r.logger.Error("Error resolving token", "error", err) r.logger.Error("Error resolving token", "error", err)
return &missingIdentity{reason: "primary-dc-down", token: token}, r.down, nil return &missingIdentity{reason: "primary-dc-down", token: token}, r.down, nil
@ -1305,7 +1303,8 @@ func (r *ACLResolver) ResolveTokenToIdentity(token string) (structs.ACLIdentity,
if r.delegate.UseLegacyACLs() { if r.delegate.UseLegacyACLs() {
identity, _, err := r.resolveTokenLegacy(token) identity, _, err := r.resolveTokenLegacy(token)
return identity, r.disableACLsWhenUpstreamDisabled(err) r.handleACLDisabledError(err)
return identity, err
} }
defer metrics.MeasureSince([]string{"acl", "ResolveTokenToIdentity"}, time.Now()) defer metrics.MeasureSince([]string{"acl", "ResolveTokenToIdentity"}, time.Now())
@ -1319,11 +1318,11 @@ func (r *ACLResolver) ACLsEnabled() bool {
return false return false
} }
if r.autoDisable { if r.disableDuration != 0 {
// Whether ACLs are disabled according to RPCs failing with a ACLs Disabled error // Whether ACLs are disabled according to RPCs failing with a ACLs Disabled error
r.disabledLock.RLock() r.disabledLock.RLock()
defer r.disabledLock.RUnlock() defer r.disabledLock.RUnlock()
return !time.Now().Before(r.disabled) return time.Now().After(r.disabledUntil)
} }
return true return true

View file

@ -731,8 +731,8 @@ func newTestACLResolver(t *testing.T, delegate *ACLResolverTestDelegate, cb func
Authorizers: 4, Authorizers: 4,
Roles: 4, Roles: 4,
}, },
AutoDisable: true, DisableDuration: aclClientDisabledTTL,
Delegate: delegate, Delegate: delegate,
} }
if cb != nil { if cb != nil {
@ -3565,7 +3565,7 @@ func TestACLResolver_AgentMaster(t *testing.T) {
r := newTestACLResolver(t, d, func(cfg *ACLResolverConfig) { r := newTestACLResolver(t, d, func(cfg *ACLResolverConfig) {
cfg.Tokens = &tokens cfg.Tokens = &tokens
cfg.Config.NodeName = "foo" cfg.Config.NodeName = "foo"
cfg.AutoDisable = false cfg.DisableDuration = 0
}) })
tokens.UpdateAgentMasterToken("9a184a11-5599-459e-b71a-550e5f9a5a23", token.TokenSourceConfig) tokens.UpdateAgentMasterToken("9a184a11-5599-459e-b71a-550e5f9a5a23", token.TokenSourceConfig)
@ -3580,3 +3580,61 @@ func TestACLResolver_AgentMaster(t *testing.T) {
require.Equal(t, acl.Allow, authz.NodeRead("bar", nil)) require.Equal(t, acl.Allow, authz.NodeRead("bar", nil))
require.Equal(t, acl.Deny, authz.NodeWrite("bar", nil)) require.Equal(t, acl.Deny, authz.NodeWrite("bar", nil))
} }
func TestACLResolver_ACLsEnabled(t *testing.T) {
type testCase struct {
name string
resolver *ACLResolver
enabled bool
}
run := func(t *testing.T, tc testCase) {
require.Equal(t, tc.enabled, tc.resolver.ACLsEnabled())
}
var testCases = []testCase{
{
name: "config disabled",
resolver: &ACLResolver{},
},
{
name: "config enabled, disableDuration=0 (Server)",
resolver: &ACLResolver{
config: ACLResolverSettings{ACLsEnabled: true},
},
enabled: true,
},
{
name: "config enabled, disabled by RPC (Client)",
resolver: &ACLResolver{
config: ACLResolverSettings{ACLsEnabled: true},
disableDuration: 10 * time.Second,
disabledUntil: time.Now().Add(5 * time.Second),
},
},
{
name: "config enabled, past disabledUntil (Client)",
resolver: &ACLResolver{
config: ACLResolverSettings{ACLsEnabled: true},
disableDuration: 10 * time.Second,
disabledUntil: time.Now().Add(-5 * time.Second),
},
enabled: true,
},
{
name: "config enabled, no disabledUntil (Client)",
resolver: &ACLResolver{
config: ACLResolverSettings{ACLsEnabled: true},
disableDuration: 10 * time.Second,
},
enabled: true,
},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
run(t, tc)
})
}
}

View file

@ -191,7 +191,6 @@ func (ac *AutoConfig) updateACLsInConfig(opts AutoConfigOptions, resp *pbautocon
PolicyTTL: ac.config.ACLResolverSettings.ACLPolicyTTL.String(), PolicyTTL: ac.config.ACLResolverSettings.ACLPolicyTTL.String(),
RoleTTL: ac.config.ACLResolverSettings.ACLRoleTTL.String(), RoleTTL: ac.config.ACLResolverSettings.ACLRoleTTL.String(),
TokenTTL: ac.config.ACLResolverSettings.ACLTokenTTL.String(), TokenTTL: ac.config.ACLResolverSettings.ACLTokenTTL.String(),
DisabledTTL: ac.config.ACLResolverSettings.ACLDisabledTTL.String(),
DownPolicy: ac.config.ACLResolverSettings.ACLDownPolicy, DownPolicy: ac.config.ACLResolverSettings.ACLDownPolicy,
DefaultPolicy: ac.config.ACLResolverSettings.ACLDefaultPolicy, DefaultPolicy: ac.config.ACLResolverSettings.ACLDefaultPolicy,
EnableKeyListPolicy: ac.config.ACLEnableKeyListPolicy, EnableKeyListPolicy: ac.config.ACLEnableKeyListPolicy,

View file

@ -153,8 +153,6 @@ func TestAutoConfigInitialConfiguration(t *testing.T) {
} }
c.AutoConfigAuthzAllowReuse = true c.AutoConfigAuthzAllowReuse = true
c.ACLResolverSettings.ACLDisabledTTL = 12 * time.Second
cafile := path.Join(c.DataDir, "cacert.pem") cafile := path.Join(c.DataDir, "cacert.pem")
err := ioutil.WriteFile(cafile, []byte(cacert), 0600) err := ioutil.WriteFile(cafile, []byte(cacert), 0600)
require.NoError(t, err) require.NoError(t, err)
@ -265,7 +263,6 @@ func TestAutoConfigInitialConfiguration(t *testing.T) {
PolicyTTL: "30s", PolicyTTL: "30s",
TokenTTL: "30s", TokenTTL: "30s",
RoleTTL: "30s", RoleTTL: "30s",
DisabledTTL: "12s",
DownPolicy: "extend-cache", DownPolicy: "extend-cache",
DefaultPolicy: "deny", DefaultPolicy: "deny",
Tokens: &pbconfig.ACLTokens{ Tokens: &pbconfig.ACLTokens{
@ -725,7 +722,6 @@ func TestAutoConfig_updateACLsInConfig(t *testing.T) {
ACLPolicyTTL: 7 * time.Second, ACLPolicyTTL: 7 * time.Second,
ACLRoleTTL: 10 * time.Second, ACLRoleTTL: 10 * time.Second,
ACLTokenTTL: 12 * time.Second, ACLTokenTTL: 12 * time.Second,
ACLDisabledTTL: 31 * time.Second,
ACLDefaultPolicy: "allow", ACLDefaultPolicy: "allow",
ACLDownPolicy: "deny", ACLDownPolicy: "deny",
}, },
@ -739,7 +735,6 @@ func TestAutoConfig_updateACLsInConfig(t *testing.T) {
PolicyTTL: "7s", PolicyTTL: "7s",
RoleTTL: "10s", RoleTTL: "10s",
TokenTTL: "12s", TokenTTL: "12s",
DisabledTTL: "31s",
DownPolicy: "deny", DownPolicy: "deny",
DefaultPolicy: "allow", DefaultPolicy: "allow",
EnableKeyListPolicy: true, EnableKeyListPolicy: true,
@ -759,7 +754,6 @@ func TestAutoConfig_updateACLsInConfig(t *testing.T) {
ACLPolicyTTL: 7 * time.Second, ACLPolicyTTL: 7 * time.Second,
ACLRoleTTL: 10 * time.Second, ACLRoleTTL: 10 * time.Second,
ACLTokenTTL: 12 * time.Second, ACLTokenTTL: 12 * time.Second,
ACLDisabledTTL: 31 * time.Second,
ACLDefaultPolicy: "allow", ACLDefaultPolicy: "allow",
ACLDownPolicy: "deny", ACLDownPolicy: "deny",
}, },
@ -773,7 +767,6 @@ func TestAutoConfig_updateACLsInConfig(t *testing.T) {
PolicyTTL: "7s", PolicyTTL: "7s",
RoleTTL: "10s", RoleTTL: "10s",
TokenTTL: "12s", TokenTTL: "12s",
DisabledTTL: "31s",
DownPolicy: "deny", DownPolicy: "deny",
DefaultPolicy: "allow", DefaultPolicy: "allow",
EnableKeyListPolicy: true, EnableKeyListPolicy: true,

View file

@ -123,13 +123,13 @@ func NewClient(config *Config, deps Deps) (*Client, error) {
c.useNewACLs = 0 c.useNewACLs = 0
aclConfig := ACLResolverConfig{ aclConfig := ACLResolverConfig{
Config: config.ACLResolverSettings, Config: config.ACLResolverSettings,
Delegate: c, Delegate: c,
Logger: c.logger, Logger: c.logger,
AutoDisable: true, DisableDuration: aclClientDisabledTTL,
CacheConfig: clientACLCacheConfig, CacheConfig: clientACLCacheConfig,
ACLConfig: newACLConfig(c.logger), ACLConfig: newACLConfig(c.logger),
Tokens: deps.Tokens, Tokens: deps.Tokens,
} }
var err error var err error
if c.acls, err = NewACLResolver(&aclConfig); err != nil { if c.acls, err = NewACLResolver(&aclConfig); err != nil {

View file

@ -450,7 +450,6 @@ func DefaultConfig() *Config {
ACLPolicyTTL: 30 * time.Second, ACLPolicyTTL: 30 * time.Second,
ACLTokenTTL: 30 * time.Second, ACLTokenTTL: 30 * time.Second,
ACLRoleTTL: 30 * time.Second, ACLRoleTTL: 30 * time.Second,
ACLDisabledTTL: 30 * time.Second,
ACLDownPolicy: "extend-cache", ACLDownPolicy: "extend-cache",
ACLDefaultPolicy: "allow", ACLDefaultPolicy: "allow",
}, },

View file

@ -345,6 +345,9 @@ func TestCAManager_UpdateConfigWhileRenewIntermediate(t *testing.T) {
} }
func TestCAManager_SignLeafWithExpiredCert(t *testing.T) { func TestCAManager_SignLeafWithExpiredCert(t *testing.T) {
if testing.Short() {
t.Skip("too slow for testing.Short")
}
args := []struct { args := []struct {
testName string testName string

View file

@ -429,7 +429,6 @@ func NewServer(config *Config, flat Deps) (*Server, error) {
Config: config.ACLResolverSettings, Config: config.ACLResolverSettings,
Delegate: s, Delegate: s,
CacheConfig: serverACLCacheConfig, CacheConfig: serverACLCacheConfig,
AutoDisable: false,
Logger: logger, Logger: logger,
ACLConfig: s.aclConfig, ACLConfig: s.aclConfig,
Tokens: flat.Tokens, Tokens: flat.Tokens,

View file

@ -323,20 +323,22 @@ func (m *TLS) GetPreferServerCipherSuites() bool {
} }
type ACL struct { type ACL struct {
Enabled bool `protobuf:"varint,1,opt,name=Enabled,proto3" json:"Enabled,omitempty"` Enabled bool `protobuf:"varint,1,opt,name=Enabled,proto3" json:"Enabled,omitempty"`
PolicyTTL string `protobuf:"bytes,2,opt,name=PolicyTTL,proto3" json:"PolicyTTL,omitempty"` PolicyTTL string `protobuf:"bytes,2,opt,name=PolicyTTL,proto3" json:"PolicyTTL,omitempty"`
RoleTTL string `protobuf:"bytes,3,opt,name=RoleTTL,proto3" json:"RoleTTL,omitempty"` RoleTTL string `protobuf:"bytes,3,opt,name=RoleTTL,proto3" json:"RoleTTL,omitempty"`
TokenTTL string `protobuf:"bytes,4,opt,name=TokenTTL,proto3" json:"TokenTTL,omitempty"` TokenTTL string `protobuf:"bytes,4,opt,name=TokenTTL,proto3" json:"TokenTTL,omitempty"`
DownPolicy string `protobuf:"bytes,5,opt,name=DownPolicy,proto3" json:"DownPolicy,omitempty"` DownPolicy string `protobuf:"bytes,5,opt,name=DownPolicy,proto3" json:"DownPolicy,omitempty"`
DefaultPolicy string `protobuf:"bytes,6,opt,name=DefaultPolicy,proto3" json:"DefaultPolicy,omitempty"` DefaultPolicy string `protobuf:"bytes,6,opt,name=DefaultPolicy,proto3" json:"DefaultPolicy,omitempty"`
EnableKeyListPolicy bool `protobuf:"varint,7,opt,name=EnableKeyListPolicy,proto3" json:"EnableKeyListPolicy,omitempty"` EnableKeyListPolicy bool `protobuf:"varint,7,opt,name=EnableKeyListPolicy,proto3" json:"EnableKeyListPolicy,omitempty"`
Tokens *ACLTokens `protobuf:"bytes,8,opt,name=Tokens,proto3" json:"Tokens,omitempty"` Tokens *ACLTokens `protobuf:"bytes,8,opt,name=Tokens,proto3" json:"Tokens,omitempty"`
DisabledTTL string `protobuf:"bytes,9,opt,name=DisabledTTL,proto3" json:"DisabledTTL,omitempty"` // Deprecated_DisabledTTL is deprecated. It is no longer populated and should
EnableTokenPersistence bool `protobuf:"varint,10,opt,name=EnableTokenPersistence,proto3" json:"EnableTokenPersistence,omitempty"` // be ignored by clients.
MSPDisableBootstrap bool `protobuf:"varint,11,opt,name=MSPDisableBootstrap,proto3" json:"MSPDisableBootstrap,omitempty"` Deprecated_DisabledTTL string `protobuf:"bytes,9,opt,name=Deprecated_DisabledTTL,json=DeprecatedDisabledTTL,proto3" json:"Deprecated_DisabledTTL,omitempty"` // Deprecated: Do not use.
XXX_NoUnkeyedLiteral struct{} `json:"-"` EnableTokenPersistence bool `protobuf:"varint,10,opt,name=EnableTokenPersistence,proto3" json:"EnableTokenPersistence,omitempty"`
XXX_unrecognized []byte `json:"-"` MSPDisableBootstrap bool `protobuf:"varint,11,opt,name=MSPDisableBootstrap,proto3" json:"MSPDisableBootstrap,omitempty"`
XXX_sizecache int32 `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *ACL) Reset() { *m = ACL{} } func (m *ACL) Reset() { *m = ACL{} }
@ -428,9 +430,10 @@ func (m *ACL) GetTokens() *ACLTokens {
return nil return nil
} }
func (m *ACL) GetDisabledTTL() string { // Deprecated: Do not use.
func (m *ACL) GetDeprecated_DisabledTTL() string {
if m != nil { if m != nil {
return m.DisabledTTL return m.Deprecated_DisabledTTL
} }
return "" return ""
} }
@ -676,57 +679,58 @@ func init() {
func init() { proto.RegisterFile("proto/pbconfig/config.proto", fileDescriptor_aefa824db7b74d77) } func init() { proto.RegisterFile("proto/pbconfig/config.proto", fileDescriptor_aefa824db7b74d77) }
var fileDescriptor_aefa824db7b74d77 = []byte{ var fileDescriptor_aefa824db7b74d77 = []byte{
// 787 bytes of a gzipped FileDescriptorProto // 802 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x55, 0xdd, 0x6e, 0xe2, 0x46, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x55, 0xdd, 0x8e, 0x22, 0x45,
0x14, 0xae, 0xe3, 0xc4, 0x09, 0x43, 0x1b, 0x25, 0x93, 0x88, 0x5a, 0xfd, 0xa1, 0xc8, 0xaa, 0x22, 0x14, 0xb6, 0xa7, 0x77, 0x7a, 0x86, 0x83, 0x6e, 0x76, 0x6b, 0x57, 0xec, 0xf8, 0x83, 0xa4, 0x63,
0x5a, 0x55, 0xa1, 0xa2, 0x6a, 0x55, 0x55, 0xbd, 0x21, 0x10, 0xb5, 0x34, 0x40, 0x91, 0x4d, 0x53, 0x36, 0xa3, 0x31, 0x83, 0xc1, 0x68, 0xd4, 0x78, 0xc3, 0xc0, 0x46, 0x71, 0x01, 0x49, 0x37, 0xae,
0xa9, 0x77, 0xc6, 0x0c, 0x30, 0xaa, 0x99, 0xb1, 0xc6, 0x43, 0x22, 0xde, 0xa4, 0xd7, 0x7d, 0x83, 0x89, 0x37, 0xa6, 0x69, 0x0e, 0x50, 0xb1, 0xa9, 0xea, 0x54, 0x17, 0x3b, 0xe1, 0x4d, 0x7c, 0x0d,
0x7d, 0x8b, 0xbd, 0xdc, 0x47, 0xd8, 0xcd, 0xbe, 0xc0, 0x3e, 0xc2, 0xea, 0xcc, 0x8c, 0x8d, 0x9d, 0xaf, 0x7d, 0x01, 0x2f, 0x7d, 0x04, 0x1d, 0x5f, 0xc0, 0x47, 0x30, 0xf5, 0xd3, 0x4d, 0xf7, 0x08,
0x85, 0x2b, 0x38, 0xdf, 0xf7, 0xcd, 0x99, 0x6f, 0xe6, 0x9c, 0x33, 0x46, 0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 0x0d, 0x1b, 0x43, 0x5d, 0xd5, 0x4f, 0x53, 0x7e, 0xab, 0x9c, 0x3c, 0xd0,
0xea, 0xd6, 0x7f, 0x6f, 0xeb, 0x1f, 0xfd, 0xf3, 0xed, 0x82, 0xca, 0xe5, 0x7a, 0x7a, 0x1d, 0xf1, 0x4e, 0x4a, 0xfb, 0xe6, 0xeb, 0x3f, 0xee, 0xda, 0xce, 0x9f, 0x77, 0x6d, 0xe7, 0xaf, 0xbb, 0xb6,
0x55, 0x6b, 0x19, 0xa6, 0x4b, 0x1a, 0x71, 0x91, 0xc0, 0xc7, 0x28, 0x5d, 0xc7, 0xad, 0xf2, 0x27, 0xf3, 0xeb, 0x3f, 0xed, 0xd7, 0x7e, 0xfa, 0x68, 0x4d, 0xe5, 0x66, 0xb7, 0xb8, 0x4e, 0xf8, 0xb6,
0x6a, 0xea, 0xa8, 0xf8, 0x87, 0xf7, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xef, 0x32, 0xac, 0xbb, 0xbb, 0x89, 0xf3, 0x0d, 0x4d, 0xb8, 0xc8, 0xd4, 0x57, 0x2a, 0xdf, 0xa5, 0xdd, 0xfa, 0xb7, 0x6b,
0x06, 0x00, 0x00, 0xe1, 0x69, 0xfb, 0xd3, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x54, 0x4a, 0x4e, 0xf1, 0xd4, 0x06,
0x00, 0x00,
} }
func (m *Config) Marshal() (dAtA []byte, err error) { func (m *Config) Marshal() (dAtA []byte, err error) {
@ -1049,10 +1053,10 @@ func (m *ACL) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i-- i--
dAtA[i] = 0x50 dAtA[i] = 0x50
} }
if len(m.DisabledTTL) > 0 { if len(m.Deprecated_DisabledTTL) > 0 {
i -= len(m.DisabledTTL) i -= len(m.Deprecated_DisabledTTL)
copy(dAtA[i:], m.DisabledTTL) copy(dAtA[i:], m.Deprecated_DisabledTTL)
i = encodeVarintConfig(dAtA, i, uint64(len(m.DisabledTTL))) i = encodeVarintConfig(dAtA, i, uint64(len(m.Deprecated_DisabledTTL)))
i-- i--
dAtA[i] = 0x4a dAtA[i] = 0x4a
} }
@ -1472,7 +1476,7 @@ func (m *ACL) Size() (n int) {
l = m.Tokens.Size() l = m.Tokens.Size()
n += 1 + l + sovConfig(uint64(l)) n += 1 + l + sovConfig(uint64(l))
} }
l = len(m.DisabledTTL) l = len(m.Deprecated_DisabledTTL)
if l > 0 { if l > 0 {
n += 1 + l + sovConfig(uint64(l)) n += 1 + l + sovConfig(uint64(l))
} }
@ -2589,7 +2593,7 @@ func (m *ACL) Unmarshal(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
case 9: case 9:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DisabledTTL", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Deprecated_DisabledTTL", wireType)
} }
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
@ -2617,7 +2621,7 @@ func (m *ACL) Unmarshal(dAtA []byte) error {
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
m.DisabledTTL = string(dAtA[iNdEx:postIndex]) m.Deprecated_DisabledTTL = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 10: case 10:
if wireType != 0 { if wireType != 0 {

View file

@ -43,7 +43,9 @@ message ACL {
string DefaultPolicy = 6; string DefaultPolicy = 6;
bool EnableKeyListPolicy = 7; bool EnableKeyListPolicy = 7;
ACLTokens Tokens = 8; ACLTokens Tokens = 8;
string DisabledTTL = 9; // Deprecated_DisabledTTL is deprecated. It is no longer populated and should
// be ignored by clients.
string Deprecated_DisabledTTL = 9 [deprecated = true];
bool EnableTokenPersistence = 10; bool EnableTokenPersistence = 10;
bool MSPDisableBootstrap = 11; bool MSPDisableBootstrap = 11;
} }