aboutsummaryrefslogtreecommitdiff
path: root/plugin/dnssec (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-10-21Use filepath when manipulating file paths (#2221)Gravatar Manuel Stocker 1-3/+3
Automatically submitted.
2018-10-20plugin/dnssec: Add support for KSK/ZSK split key setups (#2196)Gravatar Manuel Stocker 8-45/+128
* plugin/dnssec: Add support for KSK/ZSK split key setups * plugin/dnssec: Update README to document split ZSK/KSK operation
2018-10-13plugin/dnssec: Add root support (#2195)Gravatar Manuel Stocker 1-0/+5
2018-09-19Ensure Re-register of metrics variables after a reload (#2080)Gravatar Francois Tur 2-6/+1
* - ensure plugins that use prometheus.MustRegister, re-register after reload - removing once.Do on the startup function was simplest way to do it. * - fix underscored names (advice of bot) * - tune existing UT for reload, and add a test verifying failing reload does not prevent correct registering for metrics * - ensure different ports for tests that can run in same time ..
2018-08-31Move cache Keys to 64bit for a better dispersion and lower collision ↵Gravatar Francois Tur 2-5/+5
frequency (#2077) * - change Key for cache to 64bits. * - change Key for cache to 64bits.
2018-08-29Default to scrubbing replies in the server (#2012)Gravatar Miek Gieben 4-41/+14
Every plugin needs to deal with EDNS0 and should call Scrub to make a message fit the client's buffer. Move this functionality into the server and wrapping the ResponseWriter into a ScrubWriter that handles these bits for us. Result: Less code and faster, because multiple chained plugins could all be calling scrub and SizeAndDo - now there is just one place. Most tests in file/* and dnssec/* needed adjusting because in those unit tests you don't see OPT RRs anymore. The DNSSEC signer was also looking at the returned OPT RR to see if it needed to sign - as those are now added by the server (and thus later), this needed to change slightly. Scrub itself still exist (for backward compat reasons), but has been made a noop. Scrub has been renamed to scrub as it should not be used by external plugins. Fixes: #2010 Signed-off-by: Miek Gieben <miek@miek.nl>
2018-07-19Clean up tests logging (#1979)Gravatar Miek Gieben 1-0/+5
* Clean up tests logging This cleans up the travis logs so you can see the failures better. Older tests in tests/ would call log.SetOutput(ioutil.Discard) in a haphazard way. This add log.Discard and put an `init` function in each package's dir (no way to do this globally). The cleanup in tests/ is clear. All plugins also got this init function to have some uniformity and kill any (future) logging there in the tests as well. There is a one-off in pkg/healthcheck because that does log. Signed-off-by: Miek Gieben <miek@miek.nl> * bring back original log_test.go Signed-off-by: Miek Gieben <miek@miek.nl> * suppress logging here as well Signed-off-by: Miek Gieben <miek@miek.nl>
2018-06-02presubmit: Check errorf as well (#1845)Gravatar Miek Gieben 2-6/+6
Uppercase all these test errors as well. And extend the presubmit to check for these in the future. Also do a slightly smarter grep to only get t.<something>. as (because dump regexp) this also grep over non test files.
2018-05-07presubmit: check for uppercase (#1774)Gravatar Miek Gieben 3-12/+12
Another thing we can test automatically, we sorta settled on using an uppercase letter in in t.Log and t.Fatal calls. Let's just check for this.
2018-04-27plugin/dnssec: add per server metrics (#1743)Gravatar Miek Gieben 11-52/+55
* plugin/dnssec: add per server metrics final plugin. Fixes #1696 #1492 #1189 * Move cache cap into handler so we can access the server label * Remove cache-capacity from it entirely
2018-04-22Use logging (#1718)Gravatar Miek Gieben 2-1/+3
* update docs * plugins: use plugin specific logging Hooking up pkg/log also changed NewWithPlugin to just take a string instead of a plugin.Handler as that is more flexible and for instance the Root "plugin" doesn't implement it fully. Same logging from the reload plugin: .:1043 2018/04/22 08:56:37 [INFO] CoreDNS-1.1.1 2018/04/22 08:56:37 [INFO] linux/amd64, go1.10.1, CoreDNS-1.1.1 linux/amd64, go1.10.1, 2018/04/22 08:56:37 [INFO] plugin/reload: Running configuration MD5 = ec4c9c55cd19759ea1c46b8c45742b06 2018/04/22 08:56:54 [INFO] Reloading 2018/04/22 08:56:54 [INFO] plugin/reload: Running configuration MD5 = 9e2bfdd85bdc9cceb740ba9c80f34c1a 2018/04/22 08:56:54 [INFO] Reloading complete * update docs * better doc
2018-04-22all: fix plugin import ordering (#1717)Gravatar Miek Gieben 2-4/+2
Got a bit messed up with stb lib "context" usage.
2018-04-20global: move to context (#1699)Gravatar Miek Gieben 2-2/+4
* global: move to context Move from golang.org/x/net/context to std lib's context. Change done with: for i in $(grep -l '/context' **/*.go); do sed -e 's|golang.org/x/net/context|context|' -i $i; echo $i; done for i in **/*.go; do goimports -w $i; done * drop from dns.pb.go as well
2018-04-19Update all plugins to use plugin/pkg/log (#1694)Gravatar Miek Gieben 1-2/+2
* Update all plugins to use plugin/pkg/log I wish this could have been done with sed. Alas manually changed all callers to use the new plugin/pkg/log package. * Error -> Info * Add docs to debug plugin as well
2018-04-01plugin/metrics: add MustRegister function (#1648)Gravatar Miek Gieben 1-10/+1
This registers the Collectors iff the metrics plugin has been loaded. Safes a bunch of code in each and every plugin's setup code.
2018-03-09logging: Don't use PrintF when not needed (#1599)Gravatar Miek Gieben 1-1/+1
These log print don't have any verbs, so just use plain Print
2018-02-28return an error for multiple use of some plugins (#1559)Gravatar Miek Gieben 3-18/+15
* plugins: Return error for multiple use of some Return plugin.ErrOnce when a plugin that doesn't support it, is called mutliple times. This now adds it for: cache, dnssec, errors, forward, hosts, nsid. And changes it slightly in kubernetes, pprof, reload, root. * more tests
2018-02-08Add OWNERS file (#1486)Gravatar Miek Gieben 1-0/+6
This should have everyone, but the process was quite manual. The rename from middleware -> plugin also meant I had to do some extra digging on who actually submitted the PR. I also double checked the current list of people with commit access. Every plugin now has an OWNERS, except *reverse*. I'll file a bug for that.
2018-01-18plugin/dnssec: fix blacklies for NXDOMAIN (#1399)Gravatar Miek Gieben 3-4/+102
* plugin/dnssec: filter bitmap also for NXDOMAIN responses We change nxdomain to nodata, so at the point when we receive the reply it can be nxdomain or nodata. In both cases we should filter the nsec bitmap. Change the code and add explicit tests for this. * More tests
2018-01-18plugin/dnssec: check validityperiod of RRSIGs (#1385)Gravatar Miek Gieben 2-0/+58
* plugin/dnssec: check validityperiod of RRSIGs Somehow we missed implementing this. If a sig a retrieved from the cache, but not valid anymore, regenerate it instead of server invalid signatures. Fixes #1378 * drop from cache after 3/4 validity * six days means 6 days
2018-01-11Update README.md (#1374)Gravatar cricketliu 1-3/+3
Fixing a couple of small textual problems.
2018-01-04Manual pages (#1346)Gravatar Miek Gieben 1-1/+9
* Add manual pages Generate manual pages from the README and extend README with Name and Description sections. The generation requires 'ronn' which may not be available. Just check in all generated manual pages.
2018-01-03plugin/dnssec: implement shotgun from CloudFlare (#1305)Gravatar Miek Gieben 8-33/+108
* plugin/dnssec: implement shotgun from CloudFlare Put a whole bunch of types in the NSEC bitmap and remove the one that's being asked for. Add more records for queries to the apex, SOA, DNSKEY, MX.
2017-12-27metrics: correctly register all metrics (#1335)Gravatar Miek Gieben 2-12/+24
After initial startup, see if prometheus is loaded and if so, register our metrics with it. Stop doing the init() func and just use the sync.Once so we don't double registrer our metrics.
2017-12-13plugins/dnssec: Fix hostnames in README (#1310)Gravatar Frederic Hemberger 1-1/+1
2017-12-01plugin/dnssec: Drop inserting DS records on delegation (#1266)Gravatar Miek Gieben 2-11/+17
See #1211 for disuccsion; current code is probably the wrong thing to do; rethink if we need/want this. Comment out the code for now.
2017-10-31readme: more tests (#1184)Gravatar Miek Gieben 2-15/+17
* readme: more tests Add dnssec and file plugin to the test readme. This requires creating a bunch of files with the right content. Doing so already unconvered an unconditional type assertion in DNSSEC. This PR will include the fix for that as well. Also extended the snippets in the file plugin README, so that they are whole Corefile - showing more value and checking all corefile snippets. Create outliner right now is the kubernetes plugin, because even setting the right env vars will result in: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory": Which we can't create for a test. * lint
2017-10-20plugin/dnssec; insert and sign DS records (#1153)Gravatar Miek Gieben 6-33/+57
* plugin/dnssec; insert and sign DS records Sign a delegation as well and insert DS records. Fixes #698 * better
2017-10-10doc update (#1140)Gravatar Miek Gieben 1-10/+8
* doc update Go through all README and fix mistakes, extend example and let more corefile snippets be test for validity. * Cant use spefic addr in test
2017-10-08plugin/dnssec: fix NSEC-records (#1138)Gravatar Isolus 2-1/+22
* add NSEC-records if entry exists but the requested type is missing * added test for dnssec fix
2017-09-21pkg: add dnstest (#1098)Gravatar Miek Gieben 1-3/+3
Add a full test server impl in this new package + tests. Move dnsrecorder into this package as well and finish up the commented out tests that were left in the old dnsrecorder package. Update all callers and tests.
2017-09-14Remove the word middleware (#1067)Gravatar Miek Gieben 14-0/+1230
* Rename middleware to plugin first pass; mostly used 'sed', few spots where I manually changed text. This still builds a coredns binary. * fmt error * Rename AddMiddleware to AddPlugin * Readd AddMiddleware to remain backwards compat