boulder: github.com/letsencrypt/boulder/wfe Index | Files

package wfe

import "github.com/letsencrypt/boulder/wfe"

Index

Package Files

jose.go wfe.go

type WebFrontEndImpl Uses

type WebFrontEndImpl struct {
    RA  core.RegistrationAuthority
    SA  core.StorageGetter

    // URL configuration parameters
    BaseURL string

    // Issuer certificate (DER) for /acme/issuer-cert
    IssuerCert []byte

    // URL to the current subscriber agreement (should contain some version identifier)
    SubscriberAgreementURL string

    // DirectoryCAAIdentity is used for the /directory response's "meta"
    // element's "caaIdentities" field. It should match the VA's issuerDomain
    // field value.
    DirectoryCAAIdentity string

    // DirectoryWebsite is used for the /directory response's "meta" element's
    // "website" field.
    DirectoryWebsite string

    // CORS settings
    AllowOrigins []string

    // Maximum duration of a request
    RequestTimeout time.Duration
    // contains filtered or unexported fields
}

WebFrontEndImpl provides all the logic for Boulder's web-facing interface, i.e., ACME. Its members configure the paths for various ACME functions, plus a few other data items used in ACME. Its methods are primarily handlers for HTTPS requests for the various ACME functions.

func NewWebFrontEndImpl Uses

func NewWebFrontEndImpl(
    stats metrics.Scope,
    clk clock.Clock,
    keyPolicy goodkey.KeyPolicy,
    remoteNonceService noncepb.NonceServiceClient,
    noncePrefixMap map[string]noncepb.NonceServiceClient,
    logger blog.Logger,
) (WebFrontEndImpl, error)

NewWebFrontEndImpl constructs a web service for Boulder

func (*WebFrontEndImpl) AuthorizationV2 Uses

func (wfe *WebFrontEndImpl) AuthorizationV2(ctx context.Context, logEvent *web.RequestEvent, response http.ResponseWriter, request *http.Request)

AuthorizationV2 is used by clients to submit an update to an authzv2-style authorization.

func (*WebFrontEndImpl) BuildID Uses

func (wfe *WebFrontEndImpl) BuildID(ctx context.Context, logEvent *web.RequestEvent, response http.ResponseWriter, request *http.Request)

BuildID tells the requestor what build we're running.

func (*WebFrontEndImpl) Certificate Uses

func (wfe *WebFrontEndImpl) Certificate(ctx context.Context, logEvent *web.RequestEvent, response http.ResponseWriter, request *http.Request)

Certificate is used by clients to request a copy of their current certificate, or to request a reissuance of the certificate.

func (*WebFrontEndImpl) ChallengeV2 Uses

func (wfe *WebFrontEndImpl) ChallengeV2(
    ctx context.Context,
    logEvent *web.RequestEvent,
    response http.ResponseWriter,
    request *http.Request)

ChallengeV2 handles POST requests to challenge URLs belonging to authzv2-style authorizations. Such requests are clients' responses to the server's challenges.

func (*WebFrontEndImpl) Directory Uses

func (wfe *WebFrontEndImpl) Directory(ctx context.Context, logEvent *web.RequestEvent, response http.ResponseWriter, request *http.Request)

Directory is an HTTP request handler that provides the directory object stored in the WFE's DirectoryEndpoints member with paths prefixed using the `request.Host` of the HTTP request.

func (*WebFrontEndImpl) HandleFunc Uses

func (wfe *WebFrontEndImpl) HandleFunc(mux *http.ServeMux, pattern string, h web.WFEHandlerFunc, methods ...string)

HandleFunc registers a handler at the given path. It's http.HandleFunc(), but with a wrapper around the handler that provides some generic per-request functionality:

* Set a Replay-Nonce header.

* Respond to OPTIONS requests, including CORS preflight requests.

* Set a no cache header

* Respond http.StatusMethodNotAllowed for HTTP methods other than those listed.

* Set CORS headers when responding to CORS "actual" requests.

* Never send a body in response to a HEAD request. Anything written by the handler will be discarded if the method is HEAD. Also, all handlers that accept GET automatically accept HEAD.

func (*WebFrontEndImpl) Handler Uses

func (wfe *WebFrontEndImpl) Handler() http.Handler

Handler returns an http.Handler that uses various functions for various ACME-specified paths.

func (*WebFrontEndImpl) Index Uses

func (wfe *WebFrontEndImpl) Index(ctx context.Context, logEvent *web.RequestEvent, response http.ResponseWriter, request *http.Request)

Index serves a simple identification page. It is not part of the ACME spec.

func (*WebFrontEndImpl) Issuer Uses

func (wfe *WebFrontEndImpl) Issuer(ctx context.Context, logEvent *web.RequestEvent, response http.ResponseWriter, request *http.Request)

Issuer obtains the issuer certificate used by this instance of Boulder.

func (*WebFrontEndImpl) KeyRollover Uses

func (wfe *WebFrontEndImpl) KeyRollover(ctx context.Context, logEvent *web.RequestEvent, response http.ResponseWriter, request *http.Request)

KeyRollover allows a user to change their signing key

func (*WebFrontEndImpl) NewAuthorization Uses

func (wfe *WebFrontEndImpl) NewAuthorization(ctx context.Context, logEvent *web.RequestEvent, response http.ResponseWriter, request *http.Request)

NewAuthorization is used by clients to submit a new ID Authorization

func (*WebFrontEndImpl) NewCertificate Uses

func (wfe *WebFrontEndImpl) NewCertificate(ctx context.Context, logEvent *web.RequestEvent, response http.ResponseWriter, request *http.Request)

NewCertificate is used by clients to request the issuance of a cert for an authorized identifier.

func (*WebFrontEndImpl) NewRegistration Uses

func (wfe *WebFrontEndImpl) NewRegistration(ctx context.Context, logEvent *web.RequestEvent, response http.ResponseWriter, request *http.Request)

NewRegistration is used by clients to submit a new registration/account

func (*WebFrontEndImpl) Options Uses

func (wfe *WebFrontEndImpl) Options(response http.ResponseWriter, request *http.Request, methodsStr string, methodsMap map[string]bool)

Options responds to an HTTP OPTIONS request.

func (*WebFrontEndImpl) Registration Uses

func (wfe *WebFrontEndImpl) Registration(ctx context.Context, logEvent *web.RequestEvent, response http.ResponseWriter, request *http.Request)

Registration is used by a client to submit an update to their registration.

func (*WebFrontEndImpl) RevokeCertificate Uses

func (wfe *WebFrontEndImpl) RevokeCertificate(ctx context.Context, logEvent *web.RequestEvent, response http.ResponseWriter, request *http.Request)

RevokeCertificate is used by clients to request the revocation of a cert.

func (*WebFrontEndImpl) Terms Uses

func (wfe *WebFrontEndImpl) Terms(ctx context.Context, logEvent *web.RequestEvent, response http.ResponseWriter, request *http.Request)

Terms is used by the client to obtain the current Terms of Service / Subscriber Agreement to which the subscriber must agree.

Package wfe imports 37 packages (graph) and is imported by 37 packages. Updated 2019-11-17. Refresh now. Tools for package owners.