Documentation ¶
Overview ¶
package http solves the ACMEv2 HTTP-01 challenge. The workflow is as follows:
1. client requests a certificate from the remote CA, using the Solver as the HTTP-01 challenge 2. Solver populates the Challenge in the Store and notifies the CA that the challenge is ready 3. remote CA requests the keyauth from the well known path on the server 4. server retrieves the Challenge from the Store, validates the requests and presents the keyauth to the remote CA
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrStoreRateLimited = errors.New("We were rate limited, try again later") ErrStoreNotFound = errors.New("Challenge not found in the store") )
Functions ¶
func NewGinHandlerFunc ¶
NewGinHandlerFunc returns a gin.HandlerFunc that will parse the incoming challenge request from the remote CA, retrieve the challenge data from the Store, and return an appropriate response.
Types ¶
type Challenge ¶
Challenge represents the information required for an ACMEv2 HTTP-01 challenge
func NewChallenge ¶
NewChallenge returns a pointer to a Challenge
type DynamoDBStore ¶
type DynamoDBStore struct {
// contains filtered or unexported fields
}
DynamoDBStore is an implementation of Store using AWS DynamoDB to persist Challenges
func NewDynamoDBStore ¶
func NewDynamoDBStore(c dynamodbiface.DynamoDBAPI, table string) *DynamoDBStore
NewDynamoDBStore returns a pointer to a DynamoDBStore
func (*DynamoDBStore) DeleteChallenge ¶
func (ds *DynamoDBStore) DeleteChallenge(token string) error
DeleteChallenge deletes the relevant row from DynamoDB
func (*DynamoDBStore) GetChallenge ¶
func (ds *DynamoDBStore) GetChallenge(token string) (*Challenge, error)
GetChallenge retrieves the relevant row from DynamoDB and returns it as a pointer to a Challenge
func (*DynamoDBStore) PutChallenge ¶
func (ds *DynamoDBStore) PutChallenge(ch *Challenge) error
PutChallenge serialises a Challenge and puts it in a row in DynamoDB