ecsshellsso

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: 29 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 Args

type Args struct {
	TaskDefinitionFamily string `json:"taskDefinitionFamily"`
}

type CloudTrailEvent

type CloudTrailEvent struct {
	EventVersion string `json:"eventVersion"`
	UserIdentity struct {
		Type           string `json:"type"`
		PrincipalID    string `json:"principalId"`
		Arn            string `json:"arn"`
		AccountID      string `json:"accountId"`
		AccessKeyID    string `json:"accessKeyId"`
		SessionContext struct {
			SessionIssuer struct {
				Type        string `json:"type"`
				PrincipalID string `json:"principalId"`
				Arn         string `json:"arn"`
				AccountID   string `json:"accountId"`
				UserName    string `json:"userName"`
			} `json:"sessionIssuer"`
			WebIDFederationData struct {
			} `json:"webIdFederationData"`
			Attributes struct {
				CreationDate     time.Time `json:"creationDate"`
				MfaAuthenticated string    `json:"mfaAuthenticated"`
			} `json:"attributes"`
		} `json:"sessionContext"`
		InvokedBy string `json:"invokedBy"`
	} `json:"userIdentity"`
	EventTime         time.Time `json:"eventTime"`
	EventSource       string    `json:"eventSource"`
	EventName         string    `json:"eventName"`
	AwsRegion         string    `json:"awsRegion"`
	SourceIPAddress   string    `json:"sourceIPAddress"`
	UserAgent         string    `json:"userAgent"`
	RequestParameters struct {
		Target       string `json:"target"`
		DocumentName string `json:"documentName"`
		Parameters   struct {
			CloudWatchEncryptionEnabled []string `json:"cloudWatchEncryptionEnabled"`
			S3EncryptionEnabled         []string `json:"s3EncryptionEnabled"`
			CloudWatchLogGroupName      []string `json:"cloudWatchLogGroupName"`
			Command                     []string `json:"command"`
		} `json:"parameters"`
	} `json:"requestParameters"`
	ResponseElements struct {
		SessionID  string `json:"sessionId"`
		TokenValue string `json:"tokenValue"`
		StreamURL  string `json:"streamUrl"`
	} `json:"responseElements"`
	RequestID          string `json:"requestID"`
	EventID            string `json:"eventID"`
	ReadOnly           bool   `json:"readOnly"`
	EventType          string `json:"eventType"`
	ManagementEvent    bool   `json:"managementEvent"`
	RecipientAccountID string `json:"recipientAccountId"`
	EventCategory      string `json:"eventCategory"`
}

Auto-generated since the AWS SDK wont return the complete type

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) ArgSchema

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

func (*Provider) Config

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

func (*Provider) EcsExecEnabled

func (p *Provider) EcsExecEnabled(ctx context.Context, taskId string) (bool, error)

for a given task on a ecs cluster this function will determine if the task has enabled exec on it.

func (*Provider) GetPermissionSetARN

func (p *Provider) GetPermissionSetARN(ctx context.Context, permissionSetName string) (*string, error)

func (*Provider) Grant

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

Grant the access

func (*Provider) Init

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

Init the provider.

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)

Options list the argument options for the provider

func (*Provider) RequiresAccessToken

func (p *Provider) RequiresAccessToken() bool

func (*Provider) Revoke

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

Revoke the access

func (*Provider) SetupDocs

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

SetupDocs returns the embedded filesystem containing setup documentation.

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

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

type UserNotFoundError

type UserNotFoundError struct {
	Email string
}

func (*UserNotFoundError) Error

func (e *UserNotFoundError) Error() string

Jump to

Keyboard shortcuts

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