2023-03-28 21:12:41 +01:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
2023-08-11 09:12:13 -04:00
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
2023-03-28 21:12:41 +01:00
|
|
|
|
2021-11-16 12:04:01 -06:00
|
|
|
//go:build !consulent
|
2019-10-15 16:58:50 -04:00
|
|
|
|
|
|
|
package acl
|
|
|
|
|
2022-11-14 11:36:27 -07: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 16:58:50 -04:00
|
|
|
|
2019-12-18 13:44:32 -05:00
|
|
|
// enterpriseAuthorizer stub interface
|
|
|
|
type enterpriseAuthorizer interface{}
|
2019-12-06 09:25:26 -05:00
|
|
|
|
2019-12-18 13:44:32 -05:00
|
|
|
func enforceEnterprise(_ Authorizer, _ Resource, _ string, _ string, _ *AuthorizerContext) (bool, EnforcementDecision, error) {
|
2019-12-06 09:25:26 -05:00
|
|
|
return false, Deny, nil
|
|
|
|
}
|