awsidc

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidStartUrl             = app.NewValidationError("INVALID_START_URL")
	ErrInvalidAwsRegion            = app.NewValidationError("INVALID_AWS_REGION")
	ErrInvalidLabel                = app.NewValidationError("INVALID_LABEL")
	ErrDeviceAuthFlowNotAuthorized = app.NewValidationError("DEVICE_AUTH_FLOW_NOT_AUTHORIZED")
	ErrDeviceAuthFlowTimedOut      = app.NewValidationError("DEVICE_AUTH_FLOW_TIMED_OUT")
	ErrInstanceWasNotFound         = app.NewValidationError("INSTANCE_WAS_NOT_FOUND")
	ErrInstanceAlreadyRegistered   = app.NewValidationError("INSTANCE_ALREADY_REGISTERED")
	ErrStaleAwsAccessToken         = app.NewValidationError("STALE_AWS_ACCESS_TOKEN")
	ErrTransientAwsClientError     = app.NewValidationError("TRANSIENT_AWS_CLIENT_ERROR")
)
View Source
var AwsIdcEventSource = eventing.EventSource("AwsIdc")
View Source
var ProviderCode = "aws-idc"

Functions

This section is empty.

Types

type AuthorizeDeviceFlowResult

type AuthorizeDeviceFlowResult struct {
	InstanceId      string `json:"instanceId"`
	StartUrl        string `json:"startUrl"`
	Region          string `json:"region"`
	Label           string `json:"label"`
	ClientId        string `json:"clientId"`
	VerificationUri string `json:"verificationUri"`
	UserCode        string `json:"userCode"`
	ExpiresIn       int32  `json:"expiresIn"`
	DeviceCode      string `json:"deviceCode"`
}

type AwsCredentials

type AwsCredentials struct {
	AccessKeyID     string
	SecretAccessKey string
	SessionToken    string
}

type AwsIdcInstanceCreatedEvent

type AwsIdcInstanceCreatedEvent struct {
	InstanceId string

	StartUrl string
	Region   string
	Label    string
}

type AwsIdc_CopyRoleCredentialsCommandInput

type AwsIdc_CopyRoleCredentialsCommandInput struct {
	InstanceId string `json:"instanceId"`
	AccountId  string `json:"accountId"`
	RoleName   string `json:"roleName"`
}

type AwsIdc_FinalizeRefreshAccessTokenCommandInput

type AwsIdc_FinalizeRefreshAccessTokenCommandInput struct {
	InstanceId string `json:"instanceId"`
	Region     string `json:"region"`
	UserCode   string `json:"userCode"`
	DeviceCode string `json:"deviceCode"`
}

type AwsIdc_FinalizeSetupCommandInput

type AwsIdc_FinalizeSetupCommandInput struct {
	ClientId   string `json:"clientId"`
	StartUrl   string `json:"startUrl"`
	AwsRegion  string `json:"awsRegion"`
	Label      string `json:"label"`
	UserCode   string `json:"userCode"`
	DeviceCode string `json:"deviceCode"`
}

type AwsIdc_SaveRoleCredentialsCommandInput

type AwsIdc_SaveRoleCredentialsCommandInput struct {
	InstanceId string `json:"instanceId"`

	AccountId  string `json:"accountId"`
	RoleName   string `json:"roleName"`
	AwsProfile string `json:"awsProfile"`
}

type AwsIdc_SetupCommandInput

type AwsIdc_SetupCommandInput struct {
	StartUrl  string `json:"startUrl"`
	AwsRegion string `json:"awsRegion"`
	Label     string `json:"label"`
}

type AwsIdentityCenterAccount

type AwsIdentityCenterAccount struct {
	AccountId   string                         `json:"accountId"`
	AccountName string                         `json:"accountName"`
	Roles       []AwsIdentityCenterAccountRole `json:"roles"`
}

type AwsIdentityCenterAccountRole

type AwsIdentityCenterAccountRole struct {
	RoleName string `json:"roleName"`
}

type AwsIdentityCenterCardData

type AwsIdentityCenterCardData struct {
	InstanceId           string                     `json:"instanceId"`
	Enabled              bool                       `json:"enabled"`
	Label                string                     `json:"label"`
	IsFavorite           bool                       `json:"isFavorite"`
	IsAccessTokenExpired bool                       `json:"isAccessTokenExpired"`
	AccessTokenExpiresIn string                     `json:"accessTokenExpiresIn"`
	Accounts             []AwsIdentityCenterAccount `json:"accounts"`

	Sinks []plumbing.SinkInstance `json:"sinks"`
}

type AwsIdentityCenterController

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

func NewAwsIdentityCenterController

func NewAwsIdentityCenterController(db *sql.DB, bus *eventing.Eventbus, favoritesRepo favorites.FavoritesRepo, encryptionService encryption.EncryptionService, awsSsoClient awssso.AwsSsoOidcClient, datetime utils.Clock) *AwsIdentityCenterController

func (*AwsIdentityCenterController) AddPlumbers

func (c *AwsIdentityCenterController) AddPlumbers(plumbers ...plumbing.Plumber[AwsCredentials])

func (*AwsIdentityCenterController) CopyRoleCredentials

func (*AwsIdentityCenterController) FinalizeRefreshAccessToken

func (*AwsIdentityCenterController) FinalizeSetup

func (*AwsIdentityCenterController) GetInstanceData

func (c *AwsIdentityCenterController) GetInstanceData(ctx app.Context, instanceId string, forceRefresh bool) (*AwsIdentityCenterCardData, error)

func (*AwsIdentityCenterController) ListInstances

func (c *AwsIdentityCenterController) ListInstances(ctx app.Context) ([]string, error)

func (*AwsIdentityCenterController) MarkAsFavorite

func (c *AwsIdentityCenterController) MarkAsFavorite(ctx app.Context, instanceId string) error

func (*AwsIdentityCenterController) RefreshAccessToken

func (c *AwsIdentityCenterController) RefreshAccessToken(ctx app.Context, instanceId string) (*AuthorizeDeviceFlowResult, error)

func (*AwsIdentityCenterController) SaveRoleCredentials

func (*AwsIdentityCenterController) Setup

func (*AwsIdentityCenterController) UnmarkAsFavorite

func (c *AwsIdentityCenterController) UnmarkAsFavorite(ctx app.Context, instanceId string) error

Jump to

Keyboard shortcuts

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