Commit Graph

4 Commits

Author SHA1 Message Date
Phil Pennock
fc6df0fbbc Redact URLs before logging or returning in error (#2643)
* Redact URLs before logging or returning in error

This does not affect strings which failed to parse, and in such a scenario
there's a mix of "which evil" to accept; we can't sanely find what should be
redacted in those cases, so we leave them alone for debugging.

The JWT library returns some errors for Operator URLs, but it rejects URLs
which contain userinfo, so there can't be passwords in those and they're safe.

Fixes #2597

* Test the URL redaction auxiliary functions

* End-to-end tests for secrets in debug/trace

Create internal/testhelper and move DummyLogger there, so it can be used from
the test/ sub-dir too.

Let DummyLogger optionally accumulate all log messages, not just retain the
last-seen message.

Confirm no passwords logged by TestLeafNodeBasicAuthFailover.

Change TestNoPasswordsFromConnectTrace to check all trace messages, not just the
most recent.

Validate existing trace redaction in TestRouteToSelf.

* Test for password in solicited route reconnect debug
2021-10-27 12:44:59 -04:00
Waldemar Quevedo
a766b52c47 Allow matching DNs regardless of order
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2020-11-23 12:16:49 -08:00
Waldemar Quevedo
886ecf7f89 Add support for subjects with multi value RDN
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2020-11-20 22:13:52 -08:00
Waldemar Quevedo
57f2c74d62 Better support for distinguishedNameMatch in TLS Auth
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2020-09-03 00:52:50 -07:00