Commit Graph

216 Commits

Author SHA1 Message Date
Jacob Hoffman-Andrews 510e279208 Simplify gRPC TLS configs. (#2470)
Previously, a given binary would have three TLS config fields (CA cert, cert,
key) for its gRPC server, plus each of its configured gRPC clients. In typical
use, we expect all three of those to be the same across both servers and clients
within a given binary.

This change reuses the TLSConfig type already defined for use with AMQP, adds a
Load() convenience function that turns it into a *tls.Config, and configures it
for use with all of the binaries. This should make configuration easier and more
robust, since it more closely matches usage.

This change preserves temporary backwards-compatibility for the
ocsp-updater->publisher RPCs, since those are the only instances of gRPC
currently enabled in production.
2017-01-06 14:19:18 -08:00
Jacob Hoffman-Andrews 9b8dacab03 Split out separate RPC services for issuing and for signing OCSP (#2452)
This allows finer-grained control of which components can request issuance. The OCSP Updater should not be able to request issuance.

Also, update test/grpc-creds/generate.sh to reissue the certs properly.

Resolves #2417
2017-01-05 15:08:39 -08:00
Jacob Hoffman-Andrews 27a1446010 Move timeouts into client interceptor. (#2387)
Previously we had custom code in each gRPC wrapper to implement timeouts. Moving
the timeout code into the client interceptor allows us to simplify things and
reduce code duplication.
2016-12-05 10:42:26 -05:00
Roland Bracewell Shoemaker 03fdd65bfe Add gRPC server to SA (#2374)
Adds a gRPC server to the SA and SA gRPC Clients to the WFE, RA, CA, Publisher, OCSP updater, orphan finder, admin revoker, and expiration mailer.

Also adds a CA gRPC client to the OCSP Updater which was missed in #2193.

Fixes #2347.
2016-12-02 17:24:46 -08:00
Roland Bracewell Shoemaker a87379bc6e Add gRPC server to RA (#2350)
Fixes #2348.
2016-11-29 15:34:35 -08:00
Roland Bracewell Shoemaker 595204b23f Implement improved signal catching in services that already use it (#2333)
Implements a less RPC focused signal catch/shutdown method. Certain things that probably could also use this (i.e. `ocsp-updater`) haven't been given it as they would require rather substantial changes to allow for a graceful shutdown approach.

Fixes #2298.
2016-11-18 21:05:04 -05:00
Roland Bracewell Shoemaker c5f99453a9 Switch CT submission RPC from CA -> RA (#2304)
With the current gRPC design the CA talks directly to the Publisher when calling SubmitToCT which crosses security bounadries (secure internal segment -> internet facing segment) which is dangerous if (however unlikely) the Publisher is compromised and there is a gRPC exploit that allows memory corruption on the caller end of a RPC which could expose sensitive information or cause arbitrary issuance.

Instead we move the RPC call to the RA which is in a less sensitive network segment. Switching the call site from the CA -> RA is gated on adding the gRPC PublisherService object to the RA config.

Fixes #2202.
2016-11-08 11:39:02 -08:00
Jacob Hoffman-Andrews 32c03f942b Don't start DebugServer until server's ready. (#2271)
This makes availability of DebugServer a better proxy for readiness of the
component.
2016-10-21 16:57:14 -04:00
Jacob Hoffman-Andrews 1958dc9065 Update total issued count asynchronously. (#2246)
Previously the lock on total issued count would exacerbate problems when the
count query was slow, which it often is.

Fixes #1809.
2016-10-20 14:17:34 -07:00
Roland Bracewell Shoemaker 5fabc90a16 Add IDN support (#2215)
Add feature flagged support for issuing for IDNs, fixes #597.

This patch expects that clients have performed valid IDN2008 encoding on any label that includes unicode characters. Invalid encodings (including non-compatible IDN2003 encoding) will be rejected. No script-mixing or script exclusion checks are performed as we assume that if a name is resolvable that it conforms to the registrar's policies on these matters and if it uses non-standard scripts in sub-domains etc that browsers should be the ones choosing how to display those names.

Required a full update of the golang.org/x/net tree to pull in golang.org/x/net/idna, all test suites pass.
2016-10-06 13:05:37 -04:00
Roland Bracewell Shoemaker 7f0b7472e2 Add gRPC support to CA (#2193)
Fixes #2171.
2016-09-21 14:13:43 -07:00
Roland Bracewell Shoemaker 239bf9ae0a Very basic feature flag impl (#1705)
Updates #1699.

Adds a new package, `features`, which exposes methods to set and check if various internal features are enabled. The implementation uses global state to store the features so that services embedded in another service do not each require their own features map in order to check if something is enabled.

Requires a `boulder-tools` image update to include `golang.org/x/tools/cmd/stringer`.
2016-09-20 16:29:01 -07:00
Roland Bracewell Shoemaker e187c92715 Add gRPC client side metrics (#2151)
Fixes #1880.

Updates google.golang.org/grpc and github.com/jmhodges/clock, both test suites pass. A few of the gRPC interfaces changed so this also fixes those breakages.
2016-09-09 15:17:36 -04:00
Roland Bracewell Shoemaker c8f1fb3e2f Remove direct usages of go-statsd-client in favor of using metrics.Scope (#2136)
Fixes #2118, fixes #2082.
2016-09-07 19:35:13 -04:00
Ben Irving b587d4e663 Simplify KeyPolicy code (#2092)
This PR, removes the allowedSigningAlgos configuration struct and hard codes a key policy.

Fixes #1844
2016-07-30 16:15:19 -07:00
Patrick Figel 8cd74bf766 Make (pending)AuthorizationLifetime configurable (#2028)
Introduces the `authorizationLifetimeDays` and `pendingAuthorizationLifetimeDays` configuration options for `RA`.

If the values are missing from configuration, the code defaults back to the current values (300/7 days).

fixes #2024
2016-07-12 15:18:22 -04:00
Ben Irving 298774e1db Remove embedded (anonymous) fields from configs (#2019)
This PR removes the use of all anonymous struct fields that were introduced by myself as per my work on splitting up boulder-config (#1962).

The root of the bug was related to the loading of the json configuration file into the config struct. The config structs contained several embedded (anonymous) fields. An embedded (anonymous) field in a struct actually results in the flattening of the json structure. This caused json.Unmarshal to look not at the nested level, but at the root level of the json object and hence not find the nested field (i.e. AllowedSigningAlgos).

See https://play.golang.org/p/6uVCsEu3Df for a working example.

This fixes the reported bug: #2018
2016-07-07 10:16:41 -07:00
Ben Irving c4f7fb580d Split up boulder-config.json (RA) (#1974)
Part of #1962
2016-06-29 13:43:55 -07:00
Jacob Hoffman-Andrews 55657fad0d RA doesn't need CAASERVFAILExceptions. (#1992)
In #1971 we added the CAASERVFAILExceptions config field and argument to NewDNSResolverImpl. This argument only needs to be passed to the VA, where we do CAA validations. However, I accidentally added code to the RA as well to use this new config field. This changes backs that out.
2016-06-29 11:23:58 -07:00
Jacob Hoffman-Andrews 0c0e94dfaf Add enforcement for CAA SERVFAIL (#1971)
https://github.com/letsencrypt/boulder/pull/1971
2016-06-28 11:00:23 -07:00
Daniel McCarney 9abc212448 Reuse valid authz for subsequent new authz requests (#1921)
Presently clients may request a new AuthZ be created for a domain that they have already proved authorization over. This results in unnecessary bloat in the authorizations table and duplicated effort.

This commit alters the `NewAuthorization` function of the RA such that before going through the work of creating a new AuthZ it checks whether there already exists a valid AuthZ for the domain/regID that expires in more than 24 hours from the current date. If there is, then we short circuit creation and return the existing AuthZ. When this case occurs the `RA.ReusedValidAuthz` counter is incremented to provide visibility.

Since clients requesting a new AuthZ and getting an AuthZ back expect to turn around and post updates to the corresponding challenges we also return early in `UpdateAuthorization` when asked to update an AuthZ that is already valid. When this case occurs the `RA.ReusedValidAuthzChallenge` counter is incremented.

All of the above behaviour is gated by a new RA config flag `reuseValidAuthz`. In the default case (false) the RA does **not** reuse any AuthZ's and instead maintains the historic behaviour; always creating a new AuthZ when requested, irregardless of whether there are already valid AuthZ's that could be reused. In the true case (enabled only in `boulder-config-next.json`) the AuthZ reuse described above is enabled.

Resolves #1854
2016-06-10 16:44:16 -04:00
Ben Irving 438580f206 Remove last of UseNewVARPC (#1914)
`UseNewVARPC` is no longer necessary and is safe to be removed. We default to using the newer VA RPC code.
2016-06-09 10:12:46 -04:00
Daniel McCarney 4c289f2a8f Reload ratelimit policy automatically at runtime (#1894)
Resolves #1810 by automatically updating the RA ratelimit.RateLimitConfig whenever the backing config file is changed. Much like the Policy Authority uses a reloader instance to support updating the Hostname policy on the fly, this PR changes the Registration Authority to use a reloader for the rate limit policy file.

Access to the ra.rlPolicies member is protected with a RWMutex now that there is a potential for the values to be reloaded while a reader is active.

A test is introduced to ensure that writing a new policy YAML to the policy config file results in new values being set in the RA's rlPolicies instance.

https://github.com/letsencrypt/boulder/pull/1894
2016-06-08 12:11:46 -07:00
Ben Irving a713823cd5 Remove most instances of blog.Get() (#1870)
In this PR, logger is passed to the following callers:
  NewWebFrontEndImpl
  NewCertificateAuthorityImpl
  NewValidationAuthorityImpl
  NewAmqpRPCServer
  newUpdater
  NewRegistrationAuthorityServer

This reduces the usage of a global singleton logger and allows tests to consistently use a mock logger.

Fixes #1642

* remove blog.Get() in wfe
* remove blog.Get() from va
* remove Blog.Get() from ca
* remove blog.Get() from oscp updater, ampq rpc server, registration authority server
* removed some pointless logging code
* remove one added newline
* fix format issue
* fix setup function to return *blog.Mock instead of being passed in
* remove useless blog.NewMock() call
2016-06-02 14:26:39 -07:00
Jacob Hoffman-Andrews cf65d7d595 Improve VA and RA initialization (#1867)
- Run both gRPC and AMQP servers simultaneously
- Take explicit constructor parameters and unexport fields that were previously set by users
- Remove transitional DomainCheck code in RA now that GSB is enabled.
- Remove some leftover UpdateValidation dummy methods.
2016-06-02 11:57:37 -07:00
Kane York 0430c08388 Implement gRPC for VA's RPCs (#1738)
Adds appropriate protobufs, and sets up RA / VA to use the gRPC versions of the calls in boulder-config-next.json.

Fixes #1626.
2016-05-31 16:44:48 -07:00
Daniel McCarney 19635b2b6c The rate limiting code previously lived in the `cmd` package without a clear justification for why. This commit moves the rate limiting code to its own `ratelimit` package and updates import paths as required. Notably all references from the `cmd` package's exported `LoadRateLimitPolicies`, `RateLimitPolicy`, and `RateLimitConfig` were moved to use `ratelimit`.This removed the `cmd` import from a couple of callers (nice!).
The rate limiting code previously lived in the `cmd` package without a clear justification for why. This commit moves the rate limiting code to its own `ratelimit` package and updates import paths as required. Notably all references from the `cmd` package's exported `LoadRateLimitPolicies`, `RateLimitPolicy`, and `RateLimitConfig` were moved to use `ratelimit`. This removed the `cmd` import from a couple of callers (nice!).
2016-05-31 17:38:17 -04:00
Roland Bracewell Shoemaker 54573b36ba Remove all stray copyright headers and appends the initial line to LICENSE.txt (#1853) 2016-05-31 12:32:04 -07:00
Roland Bracewell Shoemaker 5abe7e3cdf Move CSR normalization/verification to their own methods (#1826)
* Split CSR testing and name hoisting into own functions, verify CSR in RA & CA

* Move tests around and various other fixes

* 1.5.3 doesn't have the needed stringer

* Move functions to their own lib

* Remove unused imports

* Move MaxCNLength and BadSignatureAlgorithms to csr package

* Always normalizeCSR in VerifyCSR and de-export it

* Update comments
2016-05-26 14:17:41 -07:00
Jacob Hoffman-Andrews 2c39c684cb Fix HostnamePolicyFile (#1785)
CA was referencing RA's config.
Also, the FailOnError function needs a non-nil error to fail.

* Bump Godep version.
2016-05-04 08:12:08 -07:00
Jacob Hoffman-Andrews e5e4fb744a * Delete Policy DB.This is no longer needed now that we have a JSON policy file.* Fix tests.* Revert Dockerfile.* Fix create_db* Simplify user addition.* Fix tests.* Fix tests* Review fixes.https://github.com/letsencrypt/boulder/pull/1773
* Delete Policy DB.

This is no longer needed now that we have a JSON policy file.

* Fix tests.
* Revert Dockerfile.
* Fix create_db
* Simplify user addition.
* Fix tests.
* Fix tests
* Review fixes.

https://github.com/letsencrypt/boulder/pull/1773
2016-04-29 12:12:24 -07:00
Jacob Hoffman-Andrews e6c17e1717 Switch to new vendor style (#1747)
* Switch to new vendor style.

* Fix metrics generate command.

* Fix miekg/dns types_generate.

* Use generated copies of files.

* Update miekg to latest.

Fixes a problem with `go generate`.

* Set GO15VENDOREXPERIMENT.

* Build in letsencrypt/boulder.

* fix travis more.

* Exclude vendor instead of godeps.

* Replace some ...

* Fix unformatted cmd

* Fix errcheck for vendorexp

* Add GO15VENDOREXPERIMENT to Makefile.

* Temp disable errcheck.

* Restore master fetch.

* Restore errcheck.

* Build with 1.6 also.

* Match statsd.*"

* Skip errcheck unles Go1.6.

* Add other ignorepkg.

* Fix errcheck.

* move errcheck

* Remove go1.6 requirement.

* Put godep-restore with errcheck.

* Remove go1.6 dep.

* Revert master fetch revert.

* Remove -r flag from godep save.

* Set GO15VENDOREXPERIMENT in Dockerfile and remove _worskpace.

* Fix Godep version.
2016-04-18 12:51:36 -07:00
Kane York 25b45a45ec Errcheck errors fixed (#1677)
* Fix all errcheck errors
* Add errcheck to test.sh
* Add a new sa.Rollback method to make handling errors in rollbacks easier.
This also causes a behavior change in the VA. If a HTTP connection is
abruptly closed after serving the headers for a non-200 response, the
reported error will be the read failure instead of the non-200.
2016-04-12 16:54:01 -07:00
Jacob Hoffman-Andrews ecc04e8e61 Refactor log package (#1717)
- Remove error signatures from log methods. This means fewer places where errcheck will show ignored errors.
- Pull in latest cfssl to be compatible with errorless log messages.
- Reduce the number of message priorities we support to just those we actually use.
- AuditNotice -> AuditInfo
- Remove InfoObject (only one use, switched to Info)
- Remove EmergencyExit and related functions in favor of panic
- Remove SyslogWriter / AuditLogger separate types in favor of a single interface, Logger, that has all the logging methods on it.
- Merge mock log into logger. This allows us to unexport the internals but still override them in the mock.
- Shorten names to be compatible with Go style: New, Set, Get, Logger, NewMock, etc.
- Use a shorter log format for stdout logs.
- Remove "... Starting" log messages. We have better information in the "Versions" message logged at startup.

Motivation: The AuditLogger / SyslogWriter distinction was confusing and exposed internals only necessary for tests. Some components accepted one type and some accepted the other. This made it hard to consistently use mock loggers in tests. Also, the unnecessarily fat interface for AuditLogger made it hard to meaningfully mock out.
2016-04-08 16:12:20 -07:00
Roland Bracewell Shoemaker 800b5b0cbf Switch to using a wrapped statter that provides PID
* Switch to using a wrapped statter that provides PID

* Fix tests and change some types to interfaces

* Add hostname to suffix + update comment
2016-04-01 15:43:35 -07:00
Kane York 6024176ee0 Add calls to PerformValidation in the RA 2016-03-23 10:39:23 -07:00
Jacob Hoffman-Andrews bc28bfe906 Implement reloadable JSON blacklist.
This eliminates the need the a database to store the hostname policy,
simplifying deployment. We keep the database for now, as part of our
deployability guidelines: we'll deploy, then switch config to the new style.

This also disables the obsolete whitelist checking code, but doesn't yet change
the function signature for policy.New(), to avoid bloating the pull request.
I'll fully remove the whitelist checking code in a future change when I also
remove the policy database code.
2016-03-13 20:00:51 -07:00
Jessica Frazelle 7955e268c7
go lint fixes
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-02-17 11:36:06 -08:00
Hugo Landau f218e314f8 Add good key testing for ECDSA. 2016-01-07 22:48:38 +00:00
Jeff Hodges 116ce96326 add retries and context deadlines to DNSResolver
This provides a means to add retries to DNS look ups, and, with some
future work, end retries early if our request deadline is blown. That
future work is tagged with #1292.

Updates #1258
2016-01-04 14:59:10 -08:00
Jeff Hodges e36895c9c5 bring RTT metrics inside DNSResolver
This moves the RTT metrics calculation inside of the DNSResolver. This
cleans up code in the RA and VA and makes some adding retries to the
DNSResolver less ugly to do.

Note: this will put `Rate` and `RTT` after the name of DNS query
type (`A`, `MX`, etc.). I think that's fine and desirable. We aren't
using this data in alerts or many dashboards, yet, so a flag day is
okay.

Fixes #1124
2015-12-16 17:41:42 -08:00
Jeff Hodges b31165444f move dns code to dns pkg and rename to bdns
Moves the DNS code from core to dns and renames the dns package to bdns
to be clearer.

Fixes #1260 and will be good to have while we add retries and such.
2015-12-14 11:21:43 -08:00
Jeff Hodges c9010744b4 delete old challenge code
Specifically, delete the simpleHttp and dvsni.

Hooray!

Fixes #894
2015-12-10 15:41:40 -08:00
Jacob Hoffman-Andrews b71a850501 Fix DBConfig references. 2015-11-24 16:41:53 -08:00
Jacob Hoffman-Andrews 608a0c9073 Move file reading to DBConfig and out of SA.
Also remove AMQP secret changes: one thing at a time.
2015-11-23 22:09:54 -08:00
Jacob Hoffman-Andrews 5dd212dd47 Add ConfigSecret.
This allows secret values to be stored externally to the config file, so that
config files can be easily shared without revealing secret data.
2015-11-19 22:41:27 -08:00
Jacob Hoffman-Andrews 5fb7be64b0 Make ServiceQueue a separate config param.
Also, make clientName strings into constants.
2015-11-18 17:40:45 -08:00
Jacob Hoffman-Andrews 7dcfcd7864 Add configurable RPC timeouts per backend.
In the process, break out AMQP config into its own struct, one per service.
The AMQPConfig struct is included by composition in the config structs that need
it. If any given service lacks an AMQP config of its own, it gets a default
value from the top-level AMQP config struct, for deployability reasons.

Tightens the RPC code to take a specific AMQP config, not an over-broad
cmd.Config.

Shortens construction of specific RPC clients so they instatiate the generic
client connection themselves, simplifying per-service startup code.

Remove unused SetTimeout method on RPC clients.
2015-11-17 19:51:51 -08:00
Jacob Hoffman-Andrews 2fc0f3143e Improve logging.
Consolidate initialization of stats and logging from each main.go into cmd
package.

Define a new config parameter, `StdoutLevel`, that determines the maximum log
level that will be printed to stdout. It can be set to 6 to inhibit debug
messages, or 0 to print only emergency messages, or -1 to print no messages at
all.

Remove the existing config parameter `Tag`. Instead, choose the tag from the
basename of the currently running process. Previously all Boulder log messages
had the tag "boulder", but now they will be differentiated by process, like
"boulder-wfe".

Shorten the date format used in stdout logging, and add the current binary's
basename.

Consolidate setup function in audit-logger_test.go.

Note: Most CLI binaries now get their stats and logging from the parameters of
Action. However, a few of our binaries don't use our custom AppShell, and
instead use codegangsta/cli directly. For those binaries, we export the new
StatsAndLogging method from cmd.

Fixes https://github.com/letsencrypt/boulder/issues/852
2015-11-11 16:52:42 -08:00
Richard Barnes 174011f6d8 Move validation and defaults out of UnmarshalJSON 2015-11-09 15:30:13 -05:00
Richard Barnes f7a659bcbf Merge branch 'master' into pa-config 2015-11-09 14:42:35 -05:00
EKR b2e7a3354d Fix golint output 2015-11-08 18:21:01 -08:00
Richard Barnes f61183e144 Use a map and set defaults 2015-11-07 12:39:57 -05:00
Richard Barnes 1f8b60979b Merge branch 'master' into pa-config 2015-11-07 15:33:03 +09:00
Jeff Hodges 13cab5c257 add Google Safe Browsing API calls
This allows us to call the Google Safe Browsing calls through the VA.

If the RA config's boolean UseIsSafeDomain is true, the RA will make the RPC
call to the VA during its NewAuthorization.

If the VA config's GoogleSafeBrowsingConfig struct is not nil, the VA
will check the Google Safe Browsing API in
VA.IsSafeDomain. If the GoogleSafeBrowsingConfig struct is nil, it will
always return true.

In order to actually make requests, the VA's GoogleSafeBrowsingConfig
will need to have a directory on disk it can store the local GSB hashes
it will check first and a working Google API key for the GSB API.

Fixes #1058
2015-11-06 16:37:34 -08:00
Richard Barnes fe047a1da8 Change config to flags from strings 2015-11-03 23:17:26 +09:00
Richard Barnes d8c67285cf Enable configuration of supported challenges 2015-10-31 16:55:59 +09:00
Jacob Hoffman-Andrews 194e421931 Add reconnects in AMQP. 2015-10-27 19:54:54 -07:00
Richard Barnes 109f7cf75e Limit the number of contacts per registration 2015-10-09 16:35:19 -04:00
Roland Shoemaker 4a98145992 Review fixes 2015-10-04 21:05:44 -07:00
Roland Shoemaker f0f1e72729 Per binary maxGoroutines 2015-10-02 15:30:21 -07:00
Roland Shoemaker 1c393b06bb Add maximum goroutine limit for RPC servers 2015-10-02 15:21:17 -07:00
Jeff Hodges c24ced260e Merge branch 'master' into cert-limit 2015-10-01 11:11:55 -07:00
Jacob Hoffman-Andrews e97880aaa7 Audit log version info as early as possible.
This means after parsing the config file, setting up stats, and dialing the
syslogger. But it is still before trying to initialize the given server. This
means that we are more likely to get version numbers logged for some common
runtime failures.
2015-09-29 17:16:03 -07:00
Roland Shoemaker 6f41cc9e39 Add issuance rate limiting based on total number of certificates issued in a window
Since the issuance count requires a full table scan a RA process local cache of the
count is kept and expired after 30 minutes.
2015-09-24 12:54:38 -07:00
Roland Shoemaker 346a8c1a01 Merge master 2015-09-10 13:47:19 -07:00
Roland Shoemaker 871a77c4b8 Merge master 2015-09-10 13:00:52 -07:00
Roland Shoemaker 00905ac07a Move RPCMonitor log to the RPCClient and do the collect natively 2015-09-10 12:48:35 -07:00
Jacob Hoffman-Andrews 253d700d06 Merge branch 'master' into challenge-display-uri
Conflicts:
	cmd/boulder-ra/main.go
	ra/registration-authority.go
	ra/registration-authority_test.go
2015-09-10 15:44:21 -04:00
Jacob Hoffman-Andrews 998ffc79cb Do GoodKey checking in WFE. 2015-09-09 20:30:55 -04:00
Jacob Hoffman-Andrews ffcd1c866d Make challenge URI a display-time property.
Challenge URIs should be determined by the WFE at fetch time, rather than stored
alongside the challenge in the DB. This simplifies a lot of the logic, and
allows to to remove a code path in NewAuthorization where we create an
authorization, then immediately save it with modifications to the challenges.

This change also gives challenges their own endpoint, which contains the
challenge id rather than the challenge's offset within its parent authorization.
This is also a first step towards replacing UpdateAuthorization with
UpdateChallenge: https://github.com/letsencrypt/boulder/issues/760.
2015-09-09 16:23:45 -04:00
Jacob Hoffman-Andrews 566a8e4189 Merge pull request #739 from letsencrypt/block-more
Check addresses returned from DNS A queries aren't in the loopback block
2015-09-08 11:30:13 -04:00
Jeff Hodges 6dcba1ae49 allow NULL expires in authz on validation failure
The RA did not have any code to test what occurred when a challenge
failed. This let in the authz schema change in #705.

This change sets the expires column in authz back to NULLable and fixes
the RA tests (including, using clock.Clocks in the RA).

Fixes #744.
2015-09-04 12:14:24 -07:00
Roland Shoemaker e5e947ee09 Better construction 2015-09-03 21:00:51 -07:00
Roland Shoemaker af8299d607 Merge master 2015-09-03 11:36:08 -07:00
Roland Shoemaker 37517052c7 Add checks for addresses in the loopback block and a bool to allow them for testing 2015-09-02 15:25:21 -07:00
Roland Shoemaker 1ad7bea579 Move PA construction out of other authority constructors 2015-08-31 15:33:03 -07:00
Roland Shoemaker 88c2f95179 Cleanup authority creation 2015-08-28 15:03:02 -07:00
Roland Shoemaker be751bd948 Merge master 2015-08-25 16:52:24 -07:00
Roland Shoemaker d6efd496fa Merge master 2015-08-24 12:27:58 -07:00
Roland Shoemaker 7ad8847ba2 Standardize CLI UX 2015-08-23 23:17:14 -07:00
Roland Shoemaker b9913a2b41 Review fixes 2015-08-14 17:14:02 -07:00
Roland Shoemaker 8789f925cc Merge master 2015-08-11 16:39:31 -07:00
Roland Shoemaker 1a2825138d Actually wire everything into the PADB 2015-08-06 16:57:38 -07:00
Roland Shoemaker 5ac7652ef4 Major rewrite 2015-08-04 16:23:49 -07:00
Roland Shoemaker 19c76ac94f Stick with previous method name, add uncommitted comment 2015-08-04 11:27:12 -07:00
Roland Shoemaker c9c05cfb46 Add comments, move reconnection logic out of binaries (except for the WFE which is a weird case) 2015-08-03 23:02:52 -07:00
Roland Shoemaker b4da19fce4 Properly catch RPC server errors 2015-08-03 16:50:31 -07:00
Roland Shoemaker bf0673c35f DNS config refactoring 2015-07-22 15:54:40 -07:00
Roland Shoemaker 31f0674f03 Replace net.LookupMX with core.LookupMX using defined resolver 2015-07-21 22:36:29 -07:00
Jeff Hodges ef54dda46a add debug http server to services
Currently, the debug http server in every service contains just the
net/http/pprof handlers. This allows us to get CPU, blocking, and memory
profiling remotely.

Along the way, remove all the places we use http.DefaultServeMux (which
includes use of http.Handle and http.HandlerFunc) and use a NewServeMux
for each place.

Fixes #457
2015-07-14 01:28:18 -07:00
Roland Shoemaker 9edd2b8e07 Refactor StatsD metrics collection
- Moved HandlerTimer definition from various cmd/ binaries to cmd/shell.go
- Cleaned up HandlerTimer endpoint metrics
- Moved New... counter metrics from WFE to RA and add Updated... and Finalized... ones
- Added error code and problem type counter metrics to WFE
- Added validation type / status counter metrics to VA
- Consistently return the total RTT from LookupCAA, LookupCNAME, and LookupDNSSEC method
- Added DNS RTT timing metrics to VA for the various Loookup... methods
2015-06-21 23:28:10 -07:00
J.C. Jones f95e9eaa83 Support TLS mutual authentication for AMQPS 2015-06-18 16:23:48 -07:00
J.C. Jones 41f5788c77 Correct most `go lint` warnings. (274 -> 5) 2015-06-16 22:18:28 -05:00
Roland Shoemaker 4ecd6d58b6 Merge master 2015-06-06 02:11:46 +01:00
Roland Shoemaker 0bfc50b7e5 Add check for max key size 2015-06-05 19:02:10 +01:00
J.C. Jones c21c6d0bdf Issue #249 - Refactor an interface for the RPC Client and RPC Server
- Added the skeleton of the first RPC wrapper test
- Does not close Issue #249; still need to implement a channel-RPC mechanism
2015-06-04 11:43:48 -07:00
Roland Shoemaker 8ad4358d30 Collect common values in config file 2015-06-03 17:41:27 +01:00
J.C. Jones 8766edaa93 Issue #239 - Add a build ID method to WFE, and print Info on startup for all 2015-05-28 11:13:09 -07:00
J.C. Jones c5415c77c0 Fix: Challenge URIs were incomplete when running in RPC mode. 2015-05-28 08:19:58 -07:00
J.C. Jones af0f8446eb Issue #202, Periodic OCSP Signer Tool
- Move dbMap construction and type converter into individual files in the sa package.
- Add DB configuration for the OCSP tool to the boulder config:
  - left to the user if they want to use different boulder-config.json files
    for different purposes.
- Added updater to Makefile
- Fix trailing ',' in the Boulder config, add more panic logging
- Ignore .pem files produced by the integration test
- Change RPC to use per-instance named reply-to queues.
- Finish OCSP Updater logic
- Rework RPC for OCSP to use a transfer object (due to serialization problems of x509.Certificate)
2015-05-27 22:01:29 -07:00
Richard Barnes c3b312118e Add audit logging
- Auditing for general errors in executables
- Auditing for improper messages received by WFE
- Automatic audit wlogging of software errors
- Audit logging for mis-routed messages
- Audit logging for certificate requests
- Auditing for improper messages received by WFE
- Add audit events table
- Expect more details in TestRegistration in web-front-end_test.go
- Remove "extra" debug details from web-front-end.go per Issue #174
- Improve test coverage of web-front-end.go
- WFE audit updates for revocation support rebase
- Add audit messages to RPC for Improper Messages and Error Conditions
- Also note misrouted messages
2015-05-18 18:23:08 -07:00
J.C. Jones a77152e828 Rework Authority "New" methods to obtain AuditLogger from Singleton
- Also ran `go fmt` against these files I was touching anyway:
    sa/storage-authority.go
    va/validation-authority.go
    wfe/web-front-end.go
2015-05-01 21:50:07 -07:00
J.C. Jones e828c61818 Add singleton semantics to Audit Logger, per Issue #135
- Update tests to use the singleton logger
- Update commands to set the audit logger singleton
- Formatting updates to the tests (go fmt)
2015-05-01 21:48:24 -07:00
Roland Shoemaker e9ac01f0f1 various error catch cleanups 2015-04-14 18:08:35 -07:00
Roland Shoemaker 4967e9486d hook in everywhere, add Noop client in tests 2015-04-12 21:50:07 -07:00
Roland Shoemaker e7f2f4f90c hook cmd.ProfileCmd into all the polylithic clients 2015-04-12 20:26:02 -07:00
J.C. Jones ab538ec332 go fmt updates 2015-04-08 21:03:08 -07:00
Roland Shoemaker 93ccd37c82 consistent infinite for loop style 2015-04-08 20:07:57 -07:00
Roland Shoemaker e8ac96d68d fixes re: @jcjones 2015-04-08 19:17:39 -07:00
Roland Shoemaker 16e0799742 not really client so... just ! 2015-04-03 21:05:28 -07:00
Roland Shoemaker ec477b8986 remove unneeded for loops 2015-04-03 18:02:42 -07:00
Roland Shoemaker fe16dc3ce9 reconnect to amqp channels and rewire clients on amqp server restart/conn dropped 2015-04-03 17:54:11 -07:00
J.C. Jones 33ac212b70 Add logging infrastructure to all authorities and commands 2015-03-24 19:06:11 -07:00
J.C. Jones 6a98f2dd0b Fix comments on PR #48. 2015-03-23 13:04:00 -07:00
Richard Barnes 01db1d2dc1 Migration of RA to individual binary 2015-03-21 18:44:59 -05:00