Documentation ¶
Index ¶
- Constants
- Variables
- func ParseAPEChain(chain *apechain.Chain, rules []string) error
- func ParseAPEChainBinaryOrJSON(chain *apechain.Chain, path string) error
- func ParseAPERule(r *apechain.Rule, rule string) error
- func ParseEACLRule(table *eacl.Table, rule string) error
- func ParseEACLRules(table *eacl.Table, rules []string) error
- func PrettyPrintTableBACL(cmd *cobra.Command, bacl *acl.Basic)
- func PrettyPrintTableEACL(cmd *cobra.Command, table *eacl.Table)
- func PrintHumanReadableAPEChain(cmd *cobra.Command, chain *apechain.Chain)
Constants ¶
const ( ResourceCondition = "resourcecondition" RequestCondition = "requestcondition" )
Variables ¶
var Cmd = &cobra.Command{ Use: "util", Short: "Utility operations", PersistentPreRun: func(cmd *cobra.Command, _ []string) { flags := cmd.Flags() _ = viper.BindPFlag(commonflags.GenerateKey, flags.Lookup(commonflags.GenerateKey)) _ = viper.BindPFlag(commonflags.WalletPath, flags.Lookup(commonflags.WalletPath)) _ = viper.BindPFlag(commonflags.Account, flags.Lookup(commonflags.Account)) }, }
Functions ¶
func ParseAPEChain ¶ added in v0.38.0
ParseAPEChain parses APE chain rules.
func ParseAPEChainBinaryOrJSON ¶ added in v0.38.0
func ParseAPERule ¶ added in v0.38.0
ParseAPERule parses access-policy-engine statement from the following form: <status>[:status_detail] <action>... [<condition>...] <resource>...
Examples: deny Object.Put * deny:QuotaLimitReached Object.Put * allow Object.Put * allow Object.Get ResourceCondition:Department=HR RequestCondition:Actor=ownerA * allow Object.Get any ResourceCondition:Department=HR RequestCondition:Actor=ownerA * allow Object.Get all ResourceCondition:Department=HR RequestCondition:Actor=ownerA * allow Object.* * allow Container.* *
func ParseEACLRule ¶
ParseEACLRule parses eACL table from the following form: <action> <operation> [<filter1> ...] [<target1> ...]
Examples: allow get req:X-Header=123 obj:Attr=value others:0xkey1,key2 system:key3 user:key4
func ParseEACLRules ¶
ParseEACLRules parses eACL table. Uses ParseEACLRule.
func PrettyPrintTableBACL ¶
PrettyPrintTableBACL print basic ACL in table format.
func PrettyPrintTableEACL ¶
PrettyPrintTableEACL print extended ACL in table format.
Types ¶
This section is empty.