ssov2

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountNotFoundError

type AccountNotFoundError struct {
	AccountID string
}

func (*AccountNotFoundError) Error

func (e *AccountNotFoundError) Error() string

type Ancestors added in v0.10.2

type Ancestors []*Node

func (Ancestors) Path added in v0.10.2

func (a Ancestors) Path() (p string)

Path returns a string fomatted path of ancestors from the root to the node ancestors can only be a root or an organizational unit the root node has no ancestors

type Args

type Args struct {
	PermissionSetARN string `json:"permissionSetArn"`
	AccountID        string `json:"accountId"`
}

type Node added in v0.9.0

type Node struct {
	ID     string
	Graph  *OrganizationGraph
	Parent *Node
	// Direct children of this node
	Children []*Node
	// All descendants of this node
	Descendants        []*Node
	OrganizationalUnit *organizationTypes.OrganizationalUnit
	Account            *organizationTypes.Account
	Root               *organizationTypes.Root
	Ancestors          Ancestors
	// contains filtered or unexported fields
}

func (*Node) BuildGraph added in v0.9.0

func (n *Node) BuildGraph(ctx context.Context, provider *Provider) error

func (*Node) DescendantAccountIDs added in v0.9.0

func (n *Node) DescendantAccountIDs() []string

func (*Node) DescendantAccounts added in v0.9.0

func (n *Node) DescendantAccounts() []*Node

func (*Node) DescendantOrganisationTypeAccounts added in v0.9.0

func (n *Node) DescendantOrganisationTypeAccounts() []organizationTypes.Account

func (*Node) DescendantOrganizationalUnitIDs added in v0.9.0

func (n *Node) DescendantOrganizationalUnitIDs() []string

func (*Node) DescendantOrganizationalUnits added in v0.9.0

func (n *Node) DescendantOrganizationalUnits() []*Node

func (*Node) IsAccount added in v0.9.0

func (n *Node) IsAccount() bool

func (*Node) IsOrganizationalUnit added in v0.9.0

func (n *Node) IsOrganizationalUnit() bool

func (*Node) IsRoot added in v0.9.0

func (n *Node) IsRoot() bool

type OrganizationGraph added in v0.9.0

type OrganizationGraph struct {
	Root *Node
	// contains filtered or unexported fields
}

type PermissionSetNotFoundErr

type PermissionSetNotFoundErr struct {
	PermissionSet string
	// the underlying AWS error
	AWSErr error
}

func (*PermissionSetNotFoundErr) Error

func (e *PermissionSetNotFoundErr) Error() string

type PermissionSetNotManagedByGrantedError

type PermissionSetNotManagedByGrantedError struct {
	PermissionSet string
	// the underlying AWS error
	AWSErr error
}

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func (*Provider) ArgOptionGroupValues added in v0.9.0

func (p *Provider) ArgOptionGroupValues(ctx context.Context, argId string, groupID string, groupValues []string) ([]string, error)

func (*Provider) ArgSchema

func (p *Provider) ArgSchema() providers.ArgSchema

func (*Provider) Config

func (p *Provider) Config() gconfig.Config

func (*Provider) Grant

func (p *Provider) Grant(ctx context.Context, subject string, args []byte, grantID string) error

Grant the access by calling the AWS SSO API.

func (*Provider) Init

func (p *Provider) Init(ctx context.Context) error

func (*Provider) Instructions

func (p *Provider) Instructions(ctx context.Context, subject string, args []byte, grantId string) (string, error)

func (*Provider) IsActive

func (p *Provider) IsActive(ctx context.Context, subject string, args []byte, grantID string) (bool, error)

IsActive checks whether the access is active by calling the AWS SSO API.

func (*Provider) Options

func (p *Provider) Options(ctx context.Context, arg string) (*types.ArgOptionsResponse, error)

List options for arg

func (*Provider) Revoke

func (p *Provider) Revoke(ctx context.Context, subject string, args []byte, grantID string) error

Revoke the access by calling the AWS SSO API.

func (*Provider) SetupDocs

func (p *Provider) SetupDocs() embed.FS

SetupDocs returns the embedded filesystem containing setup documentation.

func (*Provider) Validate

func (p *Provider) Validate(ctx context.Context, subject string, args []byte) error

Validate the access against AWS SSO without actually granting it. This provider requires that the user name matches the user's email address.

func (*Provider) ValidateConfig

func (p *Provider) ValidateConfig() map[string]providers.ConfigValidationStep

func (*Provider) ValidateGrant added in v0.7.0

func (p *Provider) ValidateGrant() providers.GrantValidationSteps

type UserNotFoundError

type UserNotFoundError struct {
	Email string
}

func (*UserNotFoundError) Error

func (e *UserNotFoundError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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