Commit Graph

15 Commits

Author SHA1 Message Date
Jacob Hoffman-Andrews b1be4ccaed Fix latency logging. (#3937)
In the VA, we were rendering a Duration to JSON, which gave an integer
number of nanoseconds rather than a float64 of seconds. Also, in both VA
and WFE we were rendering way more precision than we needed. Millisecond
precision is enough, and since we log latency for every WFE response,
the extra bytes are worth saving.
2018-11-14 10:52:48 -05:00
Joel Sing 9990d14654 Convert the probs functions to be formatters. (#3708)
Many of the probs.XYZ calls are of the form probs.XYZ(fmt.Sprintf(...)).
Convert these functions to take a format string and optional arguments,
following the same pattern used in the errors package. Convert the
various call sites to remove the now redundant fmt.Sprintf calls.
2018-05-11 11:51:16 -07:00
Joel Sing 8ebdfc60b6 Provide formatting logger functions. (#3699)
A very large number of the logger calls are of the form log.Function(fmt.Sprintf(...)).
Rather than sprinkling fmt.Sprintf at every logger call site, provide formatting versions
of the logger functions and call these directly with the format and arguments.

While here remove some unnecessary trailing newlines and calls to String/Error.
2018-05-10 11:06:29 -07:00
Roland Bracewell Shoemaker 9821aeb46f Split internal and public errors out in web.RequestEvent (#3682)
Splits out the old `Errors` slice into a public `Error` string and a `InternalErrors` slice. Also removes a number of occurrences of calling `logEvent.AddError` then immediately calling `wfe.sendError` with either the same internal error which caused the same error to be logged twice or no error which is slightly redundant as `wfe.sendError` calls `logEvent.AddError` internally.

Fixes #3664.
2018-05-03 09:13:33 -04:00
Roland Bracewell Shoemaker c3669f9068 Split endpoint and path in WFE+WFE2 web.RequestEvent (#3683) 2018-05-02 10:20:21 -07:00
Jacob Hoffman-Andrews 9e24cad3bb Add latency logging to WFE and WFE2. (#3617)
Fixes #3609.
2018-04-04 21:02:49 +01:00
Daniel McCarney 866627ee29 Return descriptive error when SCTs policy can't be met. (#3586)
This commit updates CTPolicy & the RA to return a distinct error when
the RA is unable to fetch the required SCTs for a certificate when
processing an issuance. This error type is plumbed up to the WFE/WFE2
where the `web/probs.go` code converts it into a server internal error
with a suitable user facing error.
2018-03-22 13:10:08 -07:00
Jacob Hoffman-Andrews d654675223 Remove BaseURL from WFE config. (#3540)
For a long time now the WFE has generated URLs based on the incoming
request rather than a hardcoded BaseURL. BaseURL is no longer set in the
prod configs.

This also allows factoring out relativeEndpoint into the web package.
2018-03-09 11:04:02 +00:00
Jacob Hoffman-Andrews eb23cb3ffc Remove "Terminated request" / "Successful request" (#3484)
The WFE logs these with every request, but with #3483,
they aren't necessary; everything other than 2xx is a failed request.
2018-02-28 15:16:36 -08:00
Jacob Hoffman-Andrews bf5dc8b929 Log status code in WFE JSON logs. (#3483)
This field was introduced to the logs in #2628 but without the code required
to fill it.
2018-02-27 10:16:45 -05:00
Jacob Hoffman-Andrews c628fc0119 Improve error reporting in WFE and WFE2 (#3452)
* Factor out sendError into web.SendError.
* In web.SendError, ensure that ierr always gets added to the list of errors logged.
2018-02-20 14:30:36 -08:00
Jacob Hoffman-Andrews c0ffa3d5d1 Remove logging of Request/ResponseNonce. (#3421)
These take up a lot of space in the logs, and we almost never reference
them.
2018-02-06 10:17:12 -05:00
Jacob Hoffman-Andrews e60251d8ca Add documentation link to rate limit errors. (#3286)
Resolves #2951
2017-12-19 15:46:18 -08:00
Jacob Hoffman-Andrews 97265c9184 Factor out context.go from wfe and wfe2. (#3086)
* Move probs.go to web.

* Move probs_test.go

* Factor out probs.go from wfe

* Move context.go

* Extract context.go into web package.

* Add a constructor for TopHandler.
2017-09-26 13:54:14 -04:00
Jacob Hoffman-Andrews 4f1f5cd689 Factor out probs.go from wfe and wfe2 (#3085)
This is shared code between both packages. Better to have it in a single shared place.

In the process, remove the unexported signatureValidationError, which was unnecessary; all returned errors from checkAlgorithm get turned into Malformed.
2017-09-18 13:08:18 -07:00