providers

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgumentRequestFormElement added in v0.10.0

func ArgumentRequestFormElement(element types.ArgumentRequestFormElement) *types.ArgumentRequestFormElement

returns a pointer to an ArgumentRequestFormElement

Types

type AccessTokener added in v0.5.0

type AccessTokener interface {
	RequiresAccessToken() bool
}

AccessTokeners can indicate whether they need an access token to be generated as part of the access workflow.

Access Tokens are used in Access Providers to tie a particular session in the downstream service back to the access request. In our ECS Shell provider, access tokens are enabled for audited Python shell access.

type Accessor

type Accessor interface {
	// Grant the access.
	Grant(ctx context.Context, subject string, args []byte, grantID string) error

	// Revoke the access.
	Revoke(ctx context.Context, subject string, args []byte, grantID string) error
}

Accessors know how to grant and revoke access to something. Accessors are considered the 'bare minimum' Granted providers. When writing a provider you must implement this interface.

type ArgOptionGroupValueser added in v0.9.0

type ArgOptionGroupValueser interface {
	ArgOptionGroupValues(ctx context.Context, argId string, groupingName string, groupingValues []string) ([]string, error)
}

type ArgOptioner

type ArgOptioner interface {
	Options(ctx context.Context, arg string) (*types.ArgOptionsResponse, error)
}

ArgOptioner provides a list of options for an argument and groupings if available.

type ArgSchema added in v0.9.0

type ArgSchema map[string]types.Argument

func (ArgSchema) ToAPI added in v0.9.0

func (a ArgSchema) ToAPI() types.ArgSchema

type ArgSchemarer

type ArgSchemarer interface {
	ArgSchema() ArgSchema
}

type ConfigValidationStep added in v0.4.0

type ConfigValidationStep struct {
	Name            string
	FieldsValidated []string
	Run             func(ctx context.Context) diagnostics.Logs
}

type ConfigValidator added in v0.4.0

type ConfigValidator interface {
	ValidateConfig() map[string]ConfigValidationStep
}

ConfigValues can validate the configuration of the Access Provider, such as checking whether API keys are valid and if roles can be assumed.

type GrantValidationResult added in v0.7.0

type GrantValidationResult struct {
	Name string
	Logs diagnostics.Logs
}

type GrantValidationResults added in v0.7.0

type GrantValidationResults map[string]GrantValidationResult

func (GrantValidationResults) Failed added in v0.7.0

func (r GrantValidationResults) Failed() bool

func (GrantValidationResults) FailureMessage added in v0.7.0

func (r GrantValidationResults) FailureMessage() string

FailureMessage returns an error string containing the names of the failed validation steps, else an empty string

type GrantValidationStep added in v0.7.0

type GrantValidationStep struct {
	Run              func(ctx context.Context, subject string, args []byte) diagnostics.Logs
	UserErrorMessage string
}

type GrantValidationSteps added in v0.7.0

type GrantValidationSteps map[string]GrantValidationStep

func (GrantValidationSteps) Run added in v0.7.0

Run runs each of the validation steps in parallel then returns the results

type GrantValidator added in v0.7.0

type GrantValidator interface {
	ValidateGrant() GrantValidationSteps
}

GrantValidator know how to validate access without actually granting it.

type Instructioner

type Instructioner interface {
	Instructions(ctx context.Context, subject string, args []byte, grantId string) (string, error)
}

Instructioners provide instructions on how a user can access a role or resource that we've granted access to

type InvalidArgumentError

type InvalidArgumentError struct {
	Arg string
}

func (*InvalidArgumentError) Error

func (e *InvalidArgumentError) Error() string

type InvalidGroupIDError added in v0.9.0

type InvalidGroupIDError struct {
	GroupID string
}

func (*InvalidGroupIDError) Error added in v0.9.0

func (e *InvalidGroupIDError) Error() string

type InvalidGroupValueError added in v0.9.0

type InvalidGroupValueError struct {
	GroupID    string
	GroupValue string
}

func (*InvalidGroupValueError) Error added in v0.9.0

func (e *InvalidGroupValueError) Error() string

type ProviderNotFoundError

type ProviderNotFoundError struct {
	Provider string
}

func (*ProviderNotFoundError) Error

func (e *ProviderNotFoundError) Error() string

type SetupDocer added in v0.4.0

type SetupDocer interface {
	SetupDocs() embed.FS
}

SetupDocers return an embedded filesystem containing setup documentation.

Directories

Path Synopsis
aws
azure
ad

Jump to

Keyboard shortcuts

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