aws_identity_cert

package
v1.15.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Issuer

type Issuer struct {
	// contains filtered or unexported fields
}

func New

func New(params Params) (*Issuer, error)

New will create a certificate issuer for AWS IAM identity certificates.

func (*Issuer) RequestHandler

func (i *Issuer) RequestHandler(w http.ResponseWriter,
	r *http.Request) *x509.Certificate

RequestHandler implements a REST interface that will respond with a signed X.509 Certificate for a request with a pre-signed URL from the AWS Security Token Service (STS). This pre-signed URL is used to verify the identity of the caller. The request must contain the following headers: Claimed-Arn: the full AWS Role ARN Presigned-Method: the method type specified in the pre-signing response Presigned-URL: the URL specified in the pre-signing response The body of the request must contain a PEM-encoded Public Key DER. On success, the response body will contain a signed, PEM-encoded X.509 Certificate and the Certificate template is returned.

type Params

type Params struct {
	// Required parameters.
	CertificateGenerator func(template *x509.Certificate,
		publicKey interface{}) ([]byte, error)
	// Optional parameters.
	AccountIdValidator func(accountId string) bool
	FailureWriter      func(w http.ResponseWriter, r *http.Request,
		errorString string, code int)
	HttpClient *http.Client
	Logger     log.DebugLogger
}

Jump to

Keyboard shortcuts

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