2022-02-11 12:25:05 +00:00
|
|
|
package v2
|
|
|
|
|
|
|
|
import (
|
2023-03-07 13:38:26 +00:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/user"
|
2022-02-11 12:25:05 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// ACLChecker is an interface that must provide
|
|
|
|
// ACL related checks.
|
|
|
|
type ACLChecker interface {
|
|
|
|
// CheckBasicACL must return true only if request
|
|
|
|
// passes basic ACL validation.
|
|
|
|
CheckBasicACL(RequestInfo) bool
|
2022-03-18 11:04:32 +00:00
|
|
|
// CheckEACL must return non-nil error if request
|
|
|
|
// doesn't pass extended ACL validation.
|
2023-02-21 11:42:45 +00:00
|
|
|
CheckEACL(any, RequestInfo) error
|
2022-02-11 12:25:05 +00:00
|
|
|
// StickyBitCheck must return true only if sticky bit
|
|
|
|
// is disabled or enabled but request contains correct
|
|
|
|
// owner field.
|
2022-05-31 17:00:41 +00:00
|
|
|
StickyBitCheck(RequestInfo, user.ID) bool
|
2022-02-11 12:25:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// InnerRingFetcher is an interface that must provide
|
|
|
|
// Inner Ring information.
|
|
|
|
type InnerRingFetcher interface {
|
|
|
|
// InnerRingKeys must return list of public keys of
|
|
|
|
// the actual inner ring.
|
|
|
|
InnerRingKeys() ([][]byte, error)
|
|
|
|
}
|
2023-10-30 15:30:23 +00:00
|
|
|
|
|
|
|
// APEChainChecker is the interface that provides methods to
|
|
|
|
// check if the access policy engine permits to perform the request.
|
|
|
|
type APEChainChecker interface {
|
|
|
|
CheckIfRequestPermitted(RequestInfo) error
|
|
|
|
}
|