rsaauth

package
v0.0.0-...-955c50f Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 24 Imported by: 1

Documentation

Overview

Package rsaauth is an interface to the RSA signed methods of the SSM service.

Index

Constants

View Source
const (
	// SsmAuthHeader is the header that holds private key signature for iir-rsa signed requests
	SsmAuthHeader = "SSM-AsymmetricKeyAuthorization"
)

Variables

This section is empty.

Functions

func BuildRSASignature

func BuildRSASignature(encodedPrivateKey string, stringToSign string) (signature string, err error)

BuildRSASignature signs a string using a private RSA signing key

func MakeSignRsaHandler

func MakeSignRsaHandler(encodedPrivateKey string) func(req *request.Request)

MakeSignRsaHandler creates an http handler that signs the request using an RSA private key

func NewIirRsaClient

func NewIirRsaClient(log log.T, appConfig *appconfig.SsmagentConfig, imdsClient iirprovider.IEC2MdsSdkClient, region, encodedPrivateKey string) authtokenrequest.IClient

NewIirRsaClient creates a new ssm client that signs requests with both instance identity credentials and private key

func NewRsaClient

func NewRsaClient(log log.T, appConfig *appconfig.SsmagentConfig, serverId, region, encodedPrivateKey string) authtokenrequest.IClient

NewRsaClient creates a new SSM client instance that signs requests using a private key

func SignRsa

func SignRsa(req *request.Request)

Types

type IRsaClientDeps

type IRsaClientDeps interface {
	NewStaticCredentials(id string, secret string, token string) *credentials.Credentials
	NewSession(config *aws.Config) (*session.Session, error)
	AwsConfig(log log.T, appConfig appconfig.SsmagentConfig, service string, region string) *aws.Config
	NewSsmSdk(p client.ConfigProvider, cfgs ...*aws.Config) *ssm.SSM
	NewAuthTokenClient(sdk *ssm.SSM) authtokenrequest.IClient
	MakeAddToUserAgentHandler(name string, version string, extra ...string) func(*request.Request)
	NewCredentials(provider credentials.Provider) *credentials.Credentials
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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