connector

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountAssignmentMaxWaitDuration = 5 * time.Minute
	AccountAssignmentRetryDelay      = 1 * time.Second
)
View Source
const (
	MembershipEntitlementIDTemplate   = "%s:%s:member"
	V1MembershipEntitlementIDTemplate = "membership:%s"
	// The format of grant IDs follows: 'grant:principal-type:principal-id:entitlement'.
	GrantIDTemplate   = "grant:%s:%s:%s"
	V1GrantIDTemplate = "grant:%s:%s"
)

Variables

This section is empty.

Functions

func AccountIdFromARN

func AccountIdFromARN(input string) (string, error)

func Convert

func Convert[T any, R any](slice []T, f func(in T) R) []R

Convert accepts a list of T and returns a list of R based on the input func.

func GrantID

func GrantID(entitlement *v2.Entitlement, principalId *v2.ResourceId) string

func IsValidRoleARN

func IsValidRoleARN(input string) error

func MembershipEntitlementID

func MembershipEntitlementID(resource *v2.ResourceId) string

func NormalizeAWSIdentityCenterSCIMUrl added in v0.0.8

func NormalizeAWSIdentityCenterSCIMUrl(u string) (string, error)

NormalizeAWSIdentityCenterSCIMUrl normalizes the AWS Identity Center SCIM URL. e.x. https://scim.<region>.amazonaws.com/aAaAaAaAaAa-bBbB-cCcC-dDdD-eEeEeEeEeEeE/scim/v2

func ResourceWithoutPath

func ResourceWithoutPath(resourceType string, input string) (string, error)

func V1GrantID added in v0.0.4

func V1GrantID(entitlementID string, userID string) string

func V1MembershipEntitlementID added in v0.0.4

func V1MembershipEntitlementID(resource *v2.ResourceId) string

Types

type AWS

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

func New

func New(ctx context.Context, config Config) (*AWS, error)

func (*AWS) Asset

func (c *AWS) Asset(ctx context.Context, asset *v2.AssetRef) (string, io.ReadCloser, error)

func (*AWS) Metadata

func (c *AWS) Metadata(ctx context.Context) (*v2.ConnectorMetadata, error)

func (*AWS) ResourceSyncers

func (c *AWS) ResourceSyncers(ctx context.Context) []connectorbuilder.ResourceSyncer

func (*AWS) SetupClients added in v0.0.24

func (c *AWS) SetupClients(ctx context.Context) error

func (*AWS) Validate

func (c *AWS) Validate(ctx context.Context) (annotations.Annotations, error)

type Config

type Config struct {
	UseAssumeRole           bool
	GlobalBindingExternalID string
	GlobalRegion            string
	GlobalRoleARN           string
	GlobalSecretAccessKey   string
	GlobalAccessKeyID       string
	GlobalAwsSsoRegion      string
	GlobalAwsOrgsEnabled    bool
	GlobalAwsSsoEnabled     bool
	ExternalID              string
	RoleARN                 string
	SCIMToken               string
	SCIMEndpoint            string
	SCIMEnabled             bool
}

type PermissionSetBinding

type PermissionSetBinding struct {
	AccountID       string
	PermissionSetId string
}

func (*PermissionSetBinding) String

func (psm *PermissionSetBinding) String() string

func (*PermissionSetBinding) UnmarshalText

func (psm *PermissionSetBinding) UnmarshalText(data []byte) error

type SCIMUser added in v0.0.8

type SCIMUser struct {
	ID       string   `json:"id,omitempty"`
	Schemas  []string `json:"schemas"`
	Username string   `json:"userName"`
	Name     struct {
		FamilyName string `json:"familyName"`
		GivenName  string `json:"givenName"`
	} `json:"name"`
	DisplayName string            `json:"displayName"`
	Active      bool              `json:"active"`
	Emails      []SCIMUserEmail   `json:"emails"`
	Addresses   []SCIMUserAddress `json:"addresses"`
}

SCIMUser is an AWS Identity Center SCIM User.

type SCIMUserAddress added in v0.0.8

type SCIMUserAddress struct {
	Type string `json:"type"`
}

type SCIMUserEmail added in v0.0.8

type SCIMUserEmail struct {
	Value   string `json:"value"`
	Type    string `json:"type"`
	Primary bool   `json:"primary"`
}

Jump to

Keyboard shortcuts

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