2023-03-28 18:39:22 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2021-11-16 18:04:01 +00:00
|
|
|
//go:build !consulent
|
2019-10-15 20:58:50 +00:00
|
|
|
// +build !consulent
|
|
|
|
|
|
|
|
package consul
|
|
|
|
|
|
|
|
import (
|
2021-12-13 17:43:33 +00:00
|
|
|
"github.com/hashicorp/go-hclog"
|
|
|
|
|
2019-10-15 20:58:50 +00:00
|
|
|
"github.com/hashicorp/consul/acl"
|
2019-10-25 15:06:16 +00:00
|
|
|
"github.com/hashicorp/consul/agent/structs"
|
2019-10-15 20:58:50 +00:00
|
|
|
)
|
|
|
|
|
2019-10-25 15:06:16 +00:00
|
|
|
// EnterpriseACLResolverDelegate stub
|
|
|
|
type EnterpriseACLResolverDelegate interface{}
|
|
|
|
|
2022-04-05 21:10:06 +00:00
|
|
|
func (s *Server) replicationEnterpriseMeta() *acl.EnterpriseMeta {
|
2019-12-10 02:26:41 +00:00
|
|
|
return structs.ReplicationEnterpriseMeta()
|
|
|
|
}
|
2019-10-28 17:49:57 +00:00
|
|
|
|
2021-10-27 16:47:57 +00:00
|
|
|
func serverPartitionInfo(s *Server) acl.ExportFetcher {
|
2021-10-24 22:28:46 +00:00
|
|
|
return &partitionInfoNoop{}
|
|
|
|
}
|
|
|
|
|
2021-10-27 16:47:57 +00:00
|
|
|
func newACLConfig(_ acl.ExportFetcher, _ hclog.Logger) *acl.Config {
|
2020-01-13 20:51:40 +00:00
|
|
|
return &acl.Config{
|
|
|
|
WildcardName: structs.WildcardSpecifier,
|
|
|
|
}
|
2019-10-15 20:58:50 +00:00
|
|
|
}
|
2019-10-25 15:06:16 +00:00
|
|
|
|
|
|
|
func (r *ACLResolver) resolveEnterpriseDefaultsForIdentity(identity structs.ACLIdentity) (acl.Authorizer, error) {
|
|
|
|
return nil, nil
|
|
|
|
}
|
2020-02-13 19:55:27 +00:00
|
|
|
|
|
|
|
// resolveEnterpriseIdentityAndRoles will resolve an enterprise identity to an additional set of roles
|
|
|
|
func (_ *ACLResolver) resolveEnterpriseIdentityAndRoles(_ structs.ACLIdentity) (structs.ACLIdentity, structs.ACLRoles, error) {
|
2023-08-23 16:53:44 +00:00
|
|
|
// this function does nothing in CE
|
2020-02-13 19:55:27 +00:00
|
|
|
return nil, nil, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// resolveEnterpriseIdentityAndPolicies will resolve an enterprise identity to an additional set of policies
|
|
|
|
func (_ *ACLResolver) resolveEnterpriseIdentityAndPolicies(_ structs.ACLIdentity) (structs.ACLIdentity, structs.ACLPolicies, error) {
|
2023-08-23 16:53:44 +00:00
|
|
|
// this function does nothing in CE
|
2020-02-13 19:55:27 +00:00
|
|
|
return nil, nil, nil
|
|
|
|
}
|
2021-04-14 16:39:35 +00:00
|
|
|
|
|
|
|
// resolveLocallyManagedEnterpriseToken will resolve a managed service provider token to an identity and authorizer
|
|
|
|
func (_ *ACLResolver) resolveLocallyManagedEnterpriseToken(_ string) (structs.ACLIdentity, acl.Authorizer, bool) {
|
|
|
|
return nil, nil, false
|
|
|
|
}
|
2021-10-24 22:28:46 +00:00
|
|
|
|
2022-04-05 21:10:06 +00:00
|
|
|
func setEnterpriseConf(entMeta *acl.EnterpriseMeta, conf *acl.Config) {}
|