Documentation
¶
Index ¶
- func ArgumentRequestFormElement(element types.ArgumentRequestFormElement) *types.ArgumentRequestFormElement
- type AccessTokener
- type Accessor
- type ArgOptionGroupValueser
- type ArgOptioner
- type ArgSchema
- type ArgSchemarer
- type ConfigValidationStep
- type ConfigValidator
- type GrantValidationResult
- type GrantValidationResults
- type GrantValidationStep
- type GrantValidationSteps
- type GrantValidator
- type Instructioner
- type InstructionsTemplate
- type InvalidArgumentError
- type InvalidGroupIDError
- type InvalidGroupValueError
- type ProviderNotFoundError
- type SetupDocer
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 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 ArgSchemarer ¶
type ArgSchemarer interface {
ArgSchema() ArgSchema
}
type ConfigValidationStep ¶
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 GrantValidationSteps ¶
type GrantValidationSteps map[string]GrantValidationStep
func (GrantValidationSteps) Run ¶
func (s GrantValidationSteps) Run(ctx context.Context, subject string, args []byte) GrantValidationResults
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
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 ¶
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 ¶
SetupDocers return an embedded filesystem containing setup documentation.