ssov2

package
v0.15.14 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: AGPL-3.0 Imports: 25 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

type Ancestors []*Node

func (Ancestors) Path

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 NoOpRateLimit added in v0.14.4

type NoOpRateLimit struct{}

https://github.com/aws/aws-sdk-go-v2/issues/543#issuecomment-620124268

func (NoOpRateLimit) AddTokens added in v0.14.4

func (NoOpRateLimit) AddTokens(uint) error

func (NoOpRateLimit) GetToken added in v0.14.4

func (NoOpRateLimit) GetToken(context.Context, uint) (func() error, error)

type Node

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

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

func (*Node) DescendantAccountIDs

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

func (*Node) DescendantAccounts

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

func (*Node) DescendantOrganisationTypeAccounts

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

func (*Node) DescendantOrganizationalUnitIDs

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

func (*Node) DescendantOrganizationalUnits

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

func (*Node) IsAccount

func (n *Node) IsAccount() bool

func (*Node) IsOrganizationalUnit

func (n *Node) IsOrganizationalUnit() bool

func (*Node) IsRoot

func (n *Node) IsRoot() bool

type OrganizationGraph

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 PermissionSetNotManagedByCommonFateError

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

type Provider

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

func (*Provider) ArgOptionGroupValues

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, t providers.InstructionsTemplate) (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

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