aws

package
v0.0.0-...-fc4206c Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package aws provides an ssh.Signer on top of AWS KMS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Region          string `json:"region,omitempty" yaml:"region,omitempty"`
	AccessKeyID     string `json:"access_key_id,omitempty" yaml:"access_key_id,omitempty"`
	SecretAccessKey string `json:"secret_access_key,omitempty" yaml:"secret_access_key,omitempty"`
	SessionToken    string `json:"session_token,omitempty" yaml:"session_token,omitempty"`
}

Config is the configuration for the AWS client.

func (Config) BuildKMSClient

func (c Config) BuildKMSClient(ctx context.Context) (*kms.Client, error)

BuildKMSClient builds an AWS KMS client from the configuration.

type KMSAgentConfig

type KMSAgentConfig struct {
	Config
	KeyIDs []string `json:"key_ids" yaml:"key_ids"`
}

KMSAgentConfig is the configuration for authentication with keypairs stored in AWS KMS.

func (KMSAgentConfig) Build

func (c KMSAgentConfig) Build(ctx context.Context) (agent.Agent, error)

Build builds an agent.Agent from the configuration.

func (KMSAgentConfig) Validate

func (c KMSAgentConfig) Validate() error

Validate validates the configuration and returns an error if it is not valid.

type KMSConfig

type KMSConfig struct {
	Config
	KeyID string `json:"key_id" yaml:"key_id"`
}

KMSConfig is the configuration for authentication with a keypair stored in AWS KMS.

func (KMSConfig) Build

func (c KMSConfig) Build(ctx context.Context) (ssh.Signer, error)

Build builds an ssh.Signer from the configuration.

func (KMSConfig) Validate

func (c KMSConfig) Validate() error

Validate validates the configuration and returns an error if it is not valid.

Jump to

Keyboard shortcuts

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