Documentation ¶
Overview ¶
Package managedidentity package
Index ¶
- func NewManagedIdentityDelegateMap(ctx context.Context, cfg *config.Config, pluginCatalog *plugin.Catalog) (map[models.ManagedIdentityType]Delegate, error)
- type CreateManagedIdentityAliasInput
- type CreateManagedIdentityInput
- type Delegate
- type DeleteManagedIdentityInput
- type GetManagedIdentitiesInput
- type MockDelegate
- type MoveManagedIdentityInput
- type Service
- type UpdateManagedIdentityInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateManagedIdentityAliasInput ¶ added in v0.2.0
type CreateManagedIdentityAliasInput struct { Group *models.Group Name string AliasSourceID string }
CreateManagedIdentityAliasInput is the input for creating a managed identity alias.
type CreateManagedIdentityInput ¶ added in v0.2.0
type CreateManagedIdentityInput struct { Type models.ManagedIdentityType Name string Description string GroupID string Data []byte AccessRules []struct { Type models.ManagedIdentityAccessRuleType RunStage models.JobType ModuleAttestationPolicies []models.ManagedIdentityAccessRuleModuleAttestationPolicy AllowedUserIDs []string AllowedServiceAccountIDs []string AllowedTeamIDs []string VerifyStateLineage bool } }
CreateManagedIdentityInput contains the fields for creating a new managed identity
type Delegate ¶
type Delegate interface { CreateCredentials(ctx context.Context, identity *models.ManagedIdentity, job *models.Job) ([]byte, error) SetManagedIdentityData(ctx context.Context, managedIdentity *models.ManagedIdentity, input []byte) error }
Delegate handles the logic for a specific type of managed identity
type DeleteManagedIdentityInput ¶
type DeleteManagedIdentityInput struct { ManagedIdentity *models.ManagedIdentity Force bool }
DeleteManagedIdentityInput is the input for deleting a managed identity or alias.
type GetManagedIdentitiesInput ¶
type GetManagedIdentitiesInput struct { // Sort specifies the field to sort on and direction Sort *db.ManagedIdentitySortableField // PaginationOptions supports cursor based pagination PaginationOptions *pagination.Options // Search returns only the managed identities with a name or resource path that starts with the value of search Search *string // AliasSourceID is used to return aliases for a given managed identity AliasSourceID *string // NamespacePath is the namespace to return managed identities for NamespacePath string // IncludeInherited includes inherited managed identities in the result IncludeInherited bool }
GetManagedIdentitiesInput is the input for listing managed identities
type MockDelegate ¶ added in v0.2.0
MockDelegate is an autogenerated mock type for the Delegate type
func NewMockDelegate ¶ added in v0.2.0
func NewMockDelegate(t mockConstructorTestingTNewMockDelegate) *MockDelegate
NewMockDelegate creates a new instance of MockDelegate. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockDelegate) CreateCredentials ¶ added in v0.2.0
func (_m *MockDelegate) CreateCredentials(ctx context.Context, identity *models.ManagedIdentity, job *models.Job) ([]byte, error)
CreateCredentials provides a mock function with given fields: ctx, identity, job
func (*MockDelegate) SetManagedIdentityData ¶ added in v0.2.0
func (_m *MockDelegate) SetManagedIdentityData(ctx context.Context, managedIdentity *models.ManagedIdentity, input []byte) error
SetManagedIdentityData provides a mock function with given fields: ctx, managedIdentity, input
type MoveManagedIdentityInput ¶ added in v0.16.0
MoveManagedIdentityInput is the input for moving a managed identity to a new group.
type Service ¶
type Service interface { GetManagedIdentityByID(ctx context.Context, id string) (*models.ManagedIdentity, error) GetManagedIdentityByPath(ctx context.Context, path string) (*models.ManagedIdentity, error) GetManagedIdentities(ctx context.Context, input *GetManagedIdentitiesInput) (*db.ManagedIdentitiesResult, error) GetManagedIdentitiesByIDs(ctx context.Context, ids []string) ([]models.ManagedIdentity, error) CreateManagedIdentity(ctx context.Context, input *CreateManagedIdentityInput) (*models.ManagedIdentity, error) UpdateManagedIdentity(ctx context.Context, input *UpdateManagedIdentityInput) (*models.ManagedIdentity, error) DeleteManagedIdentity(ctx context.Context, input *DeleteManagedIdentityInput) error CreateCredentials(ctx context.Context, identity *models.ManagedIdentity) ([]byte, error) GetManagedIdentitiesForWorkspace(ctx context.Context, workspaceID string) ([]models.ManagedIdentity, error) AddManagedIdentityToWorkspace(ctx context.Context, managedIdentityID string, workspaceID string) error RemoveManagedIdentityFromWorkspace(ctx context.Context, managedIdentityID string, workspaceID string) error GetManagedIdentityAccessRules(ctx context.Context, managedIdentity *models.ManagedIdentity) ([]models.ManagedIdentityAccessRule, error) GetManagedIdentityAccessRulesByIDs(ctx context.Context, ids []string) ([]models.ManagedIdentityAccessRule, error) GetManagedIdentityAccessRule(ctx context.Context, ruleID string) (*models.ManagedIdentityAccessRule, error) CreateManagedIdentityAccessRule(ctx context.Context, input *models.ManagedIdentityAccessRule) (*models.ManagedIdentityAccessRule, error) UpdateManagedIdentityAccessRule(ctx context.Context, input *models.ManagedIdentityAccessRule) (*models.ManagedIdentityAccessRule, error) DeleteManagedIdentityAccessRule(ctx context.Context, rule *models.ManagedIdentityAccessRule) error CreateManagedIdentityAlias(ctx context.Context, input *CreateManagedIdentityAliasInput) (*models.ManagedIdentity, error) DeleteManagedIdentityAlias(ctx context.Context, input *DeleteManagedIdentityInput) error MoveManagedIdentity(ctx context.Context, input *MoveManagedIdentityInput) (*models.ManagedIdentity, error) }
Service implements managed identity functionality
func NewService ¶
func NewService( logger logger.Logger, dbClient *db.Client, limitChecker limits.LimitChecker, managedIdentityDelegateMap map[models.ManagedIdentityType]Delegate, workspaceService workspace.Service, jobService job.Service, activityService activityevent.Service, ) Service
NewService creates an instance of Service
type UpdateManagedIdentityInput ¶ added in v0.2.0
UpdateManagedIdentityInput contains the fields for updating a managed identity
Directories ¶
Path | Synopsis |
---|---|
Package awsfederated package
|
Package awsfederated package |
Package azurefederated package
|
Package azurefederated package |
Package tharsisfederated package
|
Package tharsisfederated package |