Documentation ¶
Overview ¶
Package rsaauth is an interface to the RSA signed methods of the SSM service.
Index ¶
- Constants
- func BuildRSASignature(encodedPrivateKey string, stringToSign string) (signature string, err error)
- func MakeSignRsaHandler(encodedPrivateKey string) func(req *request.Request)
- func NewIirRsaClient(log log.T, appConfig *appconfig.SsmagentConfig, ...) authtokenrequest.IClient
- func NewRsaClient(log log.T, appConfig *appconfig.SsmagentConfig, ...) authtokenrequest.IClient
- func SignRsa(req *request.Request)
- type IRsaClientDeps
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 ¶
BuildRSASignature signs a string using a private RSA signing key
func MakeSignRsaHandler ¶
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
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 }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.