2023-03-15 19:00:52 +03:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
2024-01-02 21:36:20 +03:00
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
2023-03-15 19:00:52 +03:00
|
|
|
|
2022-01-05 21:02:03 +03:00
|
|
|
//go:build !enterprise
|
2018-09-18 06:03:00 +03:00
|
|
|
|
|
|
|
package vault
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/hashicorp/vault/helper/namespace"
|
2019-04-13 00:54:35 +03:00
|
|
|
"github.com/hashicorp/vault/sdk/logical"
|
2018-09-18 06:03:00 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
type entPolicyStore struct{}
|
|
|
|
|
|
|
|
func (ps *PolicyStore) extraInit() {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ps *PolicyStore) loadNamespacePolicies(context.Context, *Core) error { return nil }
|
|
|
|
|
|
|
|
func (ps *PolicyStore) getACLView(*namespace.Namespace) *BarrierView {
|
|
|
|
return ps.aclView
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ps *PolicyStore) getRGPView(ns *namespace.Namespace) *BarrierView {
|
|
|
|
return ps.rgpView
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ps *PolicyStore) getEGPView(ns *namespace.Namespace) *BarrierView {
|
|
|
|
return ps.egpView
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ps *PolicyStore) getBarrierView(ns *namespace.Namespace, _ PolicyType) *BarrierView {
|
|
|
|
return ps.getACLView(ns)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ps *PolicyStore) handleSentinelPolicy(context.Context, *Policy, *BarrierView, *logical.StorageEntry) error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ps *PolicyStore) parseEGPPaths(*Policy) error { return nil }
|
|
|
|
|
|
|
|
func (ps *PolicyStore) invalidateEGPTreePath(string) {}
|
|
|
|
|
|
|
|
func (ps *PolicyStore) pathsToEGPPaths(*Policy) ([]*egpPath, error) { return nil, nil }
|
|
|
|
|
|
|
|
func (ps *PolicyStore) loadACLPolicyNamespaces(ctx context.Context, policyName, policyText string) error {
|
|
|
|
return ps.loadACLPolicyInternal(namespace.RootContext(ctx), policyName, policyText)
|
|
|
|
}
|