open-consul/agent/consul/acl_oss.go
Mark Anderson ed3e42296d Fixup acl.EnterpriseMeta
Signed-off-by: Mark Anderson <manderson@hashicorp.com>
2022-04-05 15:11:49 -07:00

52 lines
1.6 KiB
Go

//go:build !consulent
// +build !consulent
package consul
import (
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/agent/structs"
)
// EnterpriseACLResolverDelegate stub
type EnterpriseACLResolverDelegate interface{}
func (s *Server) replicationEnterpriseMeta() *acl.EnterpriseMeta {
return structs.ReplicationEnterpriseMeta()
}
func serverPartitionInfo(s *Server) acl.ExportFetcher {
return &partitionInfoNoop{}
}
func newACLConfig(_ acl.ExportFetcher, _ hclog.Logger) *acl.Config {
return &acl.Config{
WildcardName: structs.WildcardSpecifier,
}
}
func (r *ACLResolver) resolveEnterpriseDefaultsForIdentity(identity structs.ACLIdentity) (acl.Authorizer, error) {
return nil, nil
}
// resolveEnterpriseIdentityAndRoles will resolve an enterprise identity to an additional set of roles
func (_ *ACLResolver) resolveEnterpriseIdentityAndRoles(_ structs.ACLIdentity) (structs.ACLIdentity, structs.ACLRoles, error) {
// this function does nothing in OSS
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) {
// this function does nothing in OSS
return nil, nil, nil
}
// 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
}
func setEnterpriseConf(entMeta *acl.EnterpriseMeta, conf *acl.Config) {}