authorizer

package
v0.20.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthParams added in v0.8.18

type AuthParams struct {
	Identity     string       `name:"identity" help:"caller identity" default:""`
	IdentityType IdentityType `name:"identity-type" enum:"sub,jwt,none" help:"type of identity [sub|jwt|none]"  default:"none"`
	Resource     string       `name:"resource" help:"a JSON object to include as resource context"`
	PolicyID     string       `name:"policy-id" required:"" help:"policy id"`
}

func (AuthParams) IdentityContext added in v0.8.18

func (a AuthParams) IdentityContext() *api.IdentityContext

func (AuthParams) ResourceContext added in v0.8.18

func (a AuthParams) ResourceContext() (*structpb.Struct, error)

type CompileCmd added in v0.20.2

type CompileCmd struct {
	AuthParams `embed:""`
	Statement  string `arg:"stmt" name:"stmt" required:"" help:"query statement"`
	Path       string `name:"path" help:"policy package to evaluate"`
	Input      string `name:"input" help:"query input context"`
}

func (*CompileCmd) Run added in v0.20.2

func (cmd *CompileCmd) Run(c *cc.CommonCtx) error

type DecisionTreeCmd

type DecisionTreeCmd struct {
	AuthParams `embed:""`
	Path       string   `name:"path" help:"policy package to evaluate"`
	Decisions  []string `name:"decisions" default:"*" help:"policy decisions to return"`
}

func (*DecisionTreeCmd) Run

func (cmd *DecisionTreeCmd) Run(c *cc.CommonCtx) error

type EvalDecisionCmd

type EvalDecisionCmd struct {
	AuthParams `embed:""`
	Path       string   `name:"path" required:"" help:"policy package to evaluate"`
	Decisions  []string `name:"decisions" required:"" help:"policy decisions to return"`
}

func (*EvalDecisionCmd) Run

func (cmd *EvalDecisionCmd) Run(c *cc.CommonCtx) error

type ExecQueryCmd

type ExecQueryCmd struct {
	AuthParams `embed:""`
	Statement  string `arg:"stmt" name:"stmt" required:"" help:"query statement"`
	Path       string `name:"path" help:"policy package to evaluate"`
	Input      string `name:"input" help:"query input context"`
}

func (*ExecQueryCmd) Run

func (cmd *ExecQueryCmd) Run(c *cc.CommonCtx) error

type GetPolicyCmd added in v0.20.2

type GetPolicyCmd struct {
	PolicyID      string `name:"policy-id" required:"" help:"policy id"`
	PolicyName    string `name:"policy-name" required:"" help:"policy name"`
	InstanceLabel string `name:"instance-label" required:"" help:"policy's instance label"`
}

func (*GetPolicyCmd) Run added in v0.20.2

func (cmd *GetPolicyCmd) Run(c *cc.CommonCtx) error

type IdentityType added in v0.8.18

type IdentityType string
const (
	IdentityTypeNone IdentityType = "none"
	IdentityTypeSub  IdentityType = "sub"
	IdentityTypeJwt  IdentityType = "jwt"
)

type ListPoliciesCmd added in v0.20.2

type ListPoliciesCmd struct {
	PolicyName    string `name:"policy-name" required:"" help:"policy name"`
	InstanceLabel string `name:"instance-label" required:"" help:"policy's instance label"`
}

func (*ListPoliciesCmd) Run added in v0.20.2

func (cmd *ListPoliciesCmd) Run(c *cc.CommonCtx) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL