2023-03-28 20:12:41 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
2023-03-28 20:12:41 +00:00
|
|
|
|
2021-11-16 18:04:01 +00:00
|
|
|
//go:build !consulent
|
2019-10-15 20:58:50 +00:00
|
|
|
// +build !consulent
|
|
|
|
|
|
|
|
package acl
|
|
|
|
|
2022-11-14 18:36:27 +00:00
|
|
|
// AuthorizerContext contains extra information that can be
|
|
|
|
// used in the determination of an ACL enforcement decision.
|
|
|
|
type AuthorizerContext struct {
|
|
|
|
// Peer is the name of the peer that the resource was imported from.
|
|
|
|
Peer string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *AuthorizerContext) PeerOrEmpty() string {
|
|
|
|
if c == nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return c.Peer
|
|
|
|
}
|
2019-10-15 20:58:50 +00:00
|
|
|
|
2019-12-18 18:44:32 +00:00
|
|
|
// enterpriseAuthorizer stub interface
|
|
|
|
type enterpriseAuthorizer interface{}
|
2019-12-06 14:25:26 +00:00
|
|
|
|
2019-12-18 18:44:32 +00:00
|
|
|
func enforceEnterprise(_ Authorizer, _ Resource, _ string, _ string, _ *AuthorizerContext) (bool, EnforcementDecision, error) {
|
2019-12-06 14:25:26 +00:00
|
|
|
return false, Deny, nil
|
|
|
|
}
|