import "github.com/hashicorp/vault/sdk/helper/policyutil"
EquivalentPolicies checks whether the given policy sets are equivalent, as in, they contain the same values. The benefit of this method is that it leaves the "default" policy out of its comparisons as it may be added later by core after a set of policies has been saved by a backend.
ParsePolicies parses a comma-delimited list of policies. The resulting collection will have no duplicate elements. If 'root' policy was present in the list of policies, then all other policies will be ignored, the result will contain just the 'root'. In cases where 'root' is not present, if 'default' policy is not already present, it will be added.
SanitizePolicies performs the common input validation tasks which are performed on the list of policies across Vault. The resulting collection will have no duplicate elements. If 'root' policy was present in the list of policies, then all other policies will be ignored, the result will contain just the 'root'. In cases where 'root' is not present, if 'default' policy is not already present, it will be added if addDefault is set to true.
Package policyutil imports 3 packages (graph) and is imported by 24 packages. Updated 2019-04-12. Refresh now. Tools for package owners.