...

Package notmain

import "github.com/letsencrypt/boulder/cmd/boulder-wfe2"
Overview
Index

Overview ▾

Index ▾

Package files

main.go

type CacheConfig

type CacheConfig struct {
    Size int
    TTL  config.Duration
}

type Config

type Config struct {
    WFE struct {
        DebugAddr string `validate:"required,hostname_port"`

        // ListenAddress is the address:port on which to listen for incoming
        // HTTP requests. Defaults to ":80".
        ListenAddress string `validate:"omitempty,hostname_port"`

        // TLSListenAddress is the address:port on which to listen for incoming
        // HTTPS requests. If none is provided the WFE will not listen for HTTPS
        // requests.
        TLSListenAddress string `validate:"omitempty,hostname_port"`

        // Timeout is the per-request overall timeout. This should be slightly
        // lower than the upstream's timeout when making request to the WFE.
        Timeout config.Duration `validate:"-"`

        ServerCertificatePath string `validate:"required_with=TLSListenAddress"`
        ServerKeyPath         string `validate:"required_with=TLSListenAddress"`

        AllowOrigins []string

        ShutdownStopTimeout config.Duration

        SubscriberAgreementURL string

        TLS cmd.TLSConfig

        RAService *cmd.GRPCClientConfig
        SAService *cmd.GRPCClientConfig

        // GetNonceService is a gRPC config which contains a single SRV name
        // used to lookup nonce-service instances used exclusively for nonce
        // creation. In a multi-DC deployment this should refer to local
        // nonce-service instances only.
        GetNonceService *cmd.GRPCClientConfig

        // RedeemNonceServices contains a map of nonce-service prefixes to
        // gRPC configs we want to use to redeem nonces. In a multi-DC deployment
        // this should contain all nonce-services from all DCs as we want to be
        // able to redeem nonces generated at any DC.
        //
        // DEPRECATED: See RedeemNonceService, below.
        // TODO (#6610) Remove this after all configs have migrated to
        // `RedeemNonceService`.
        RedeemNonceServices map[string]cmd.GRPCClientConfig `validate:"required_without=RedeemNonceService,omitempty,min=1,dive"`

        // RedeemNonceService is a gRPC config which contains a list of SRV
        // names used to lookup nonce-service instances used exclusively for
        // nonce redemption. In a multi-DC deployment this should contain both
        // local and remote nonce-service instances.
        RedeemNonceService *cmd.GRPCClientConfig `validate:"required_without=RedeemNonceServices"`

        // NoncePrefixKey is a secret used for deriving the prefix of each nonce
        // instance. It should contain 256 bits of random data to be suitable as
        // an HMAC-SHA256 key (e.g. the output of `openssl rand -hex 32`). In a
        // multi-DC deployment this value should be the same across all
        // boulder-wfe and nonce-service instances.
        NoncePrefixKey cmd.PasswordConfig `validate:"-"`

        // Chains is a list of lists of certificate filenames. Each inner list is
        // a chain (starting with the issuing intermediate, followed by one or
        // more additional certificates, up to and including a root) which we are
        // willing to serve. Chains that start with a given intermediate will only
        // be offered for certificates which were issued by the key pair represented
        // by that intermediate. The first chain representing any given issuing
        // key pair will be the default for that issuer, served if the client does
        // not request a specific chain.
        Chains [][]string `validate:"required,min=1,dive,min=2,dive,required"`

        Features map[string]bool

        // DirectoryCAAIdentity is used for the /directory response's "meta"
        // element's "caaIdentities" field. It should match the VA's "issuerDomain"
        // configuration value (this value is the one used to enforce CAA)
        DirectoryCAAIdentity string `validate:"required,fqdn"`
        // DirectoryWebsite is used for the /directory response's "meta" element's
        // "website" field.
        DirectoryWebsite string `validate:"required,url"`

        // ACMEv2 requests (outside some registration/revocation messages) use a JWS with
        // a KeyID header containing the full account URL. For new accounts this
        // will be a KeyID based on the HTTP request's Host header and the ACMEv2
        // account path. For legacy ACMEv1 accounts we need to whitelist the account
        // ID prefix that legacy accounts would have been using based on the Host
        // header of the WFE1 instance and the legacy 'reg' path component. This
        // will differ in configuration for production and staging.
        LegacyKeyIDPrefix string `validate:"required,url"`

        // GoodKey is an embedded config stanza for the goodkey library.
        GoodKey goodkey.Config

        // StaleTimeout determines how old should data be to be accessed via Boulder-specific GET-able APIs
        StaleTimeout config.Duration `validate:"-"`

        // AuthorizationLifetimeDays defines how long authorizations will be
        // considered valid for. The WFE uses this to find the creation date of
        // authorizations by subtracing this value from the expiry. It should match
        // the value configured in the RA.
        AuthorizationLifetimeDays int `validate:"required,min=1,max=397"`

        // PendingAuthorizationLifetimeDays defines how long authorizations may be in
        // the pending state before expiry. The WFE uses this to find the creation
        // date of pending authorizations by subtracting this value from the expiry.
        // It should match the value configured in the RA.
        PendingAuthorizationLifetimeDays int `validate:"required,min=1,max=29"`

        AccountCache *CacheConfig

        Limiter struct {
            // Redis contains the configuration necessary to connect to Redis
            // for rate limiting. This field is required to enable rate
            // limiting.
            Redis *bredis.Config `validate:"required_with=Defaults"`

            // Defaults is a path to a YAML file containing default rate limits.
            // See: ratelimits/README.md for details. This field is required to
            // enable rate limiting. If any individual rate limit is not set,
            // that limit will be disabled.
            Defaults string `validate:"required_with=Redis"`

            // Overrides is a path to a YAML file containing overrides for the
            // default rate limits. See: ratelimits/README.md for details. If
            // this field is not set, all requesters will be subject to the
            // default rate limits.
            Overrides string
        }
    }

    Syslog        cmd.SyslogConfig
    OpenTelemetry cmd.OpenTelemetryConfig

    // OpenTelemetryHTTPConfig configures tracing on incoming HTTP requests
    OpenTelemetryHTTPConfig cmd.OpenTelemetryHTTPConfig
}