providers

package
v0.15.14 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: AGPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgumentRequestFormElement

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

returns a pointer to an ArgumentRequestFormElement

Types

type AccessTokener

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' Common Fate providers. When writing a provider you must implement this interface.

type ArgOptionGroupValueser

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

type ArgSchema map[string]types.Argument

func (ArgSchema) ToAPI

func (a ArgSchema) ToAPI() types.ArgSchema

type ArgSchemarer

type ArgSchemarer interface {
	ArgSchema() ArgSchema
}

type ConfigValidationStep

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

type ConfigValidator

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

type GrantValidationResult struct {
	Name string
	Logs diagnostics.Logs
}

type GrantValidationResults

type GrantValidationResults map[string]GrantValidationResult

func (GrantValidationResults) Failed

func (r GrantValidationResults) Failed() bool

func (GrantValidationResults) FailureMessage

func (r GrantValidationResults) FailureMessage() string

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

type GrantValidationStep

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

type GrantValidationSteps

type GrantValidationSteps map[string]GrantValidationStep

func (GrantValidationSteps) Run

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

type GrantValidator

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, t InstructionsTemplate) (string, error)
}

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

type InstructionsTemplate added in v0.13.0

type InstructionsTemplate struct {
	GrantID     string
	FrontendURL string
}

InstructionsTemplate is template data provided by the Common Fate API.

type InvalidArgumentError

type InvalidArgumentError struct {
	Arg string
}

func (*InvalidArgumentError) Error

func (e *InvalidArgumentError) Error() string

type InvalidGroupIDError

type InvalidGroupIDError struct {
	GroupID string
}

func (*InvalidGroupIDError) Error

func (e *InvalidGroupIDError) Error() string

type InvalidGroupValueError

type InvalidGroupValueError struct {
	GroupID    string
	GroupValue string
}

func (*InvalidGroupValueError) Error

func (e *InvalidGroupValueError) Error() string

type ProviderNotFoundError

type ProviderNotFoundError struct {
	Provider string
}

func (*ProviderNotFoundError) Error

func (e *ProviderNotFoundError) Error() string

type SetupDocer

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