]>
git.ipfire.org Git - thirdparty/knot-resolver.git/log
Karel Slany [Thu, 7 Jul 2016 13:34:34 +0000 (15:34 +0200)]
Using LRU cache to store DNS cookies.
Karel Slany [Mon, 4 Jul 2016 11:53:35 +0000 (13:53 +0200)]
Removed global cookie control structure.
The control structure is part of the resolver context.
Karel Slany [Fri, 1 Jul 2016 11:14:37 +0000 (13:14 +0200)]
Minor fixes.
Karel Slany [Fri, 1 Jul 2016 10:23:18 +0000 (12:23 +0200)]
Reduced amount of cookie control structures.
Karel Slany [Fri, 1 Jul 2016 08:58:12 +0000 (10:58 +0200)]
Using libknot lookup table to store and access cookie algorithms.
Karel Slany [Wed, 29 Jun 2016 10:54:05 +0000 (12:54 +0200)]
Removed some copy-and-paste code.
Karel Slany [Wed, 29 Jun 2016 08:59:53 +0000 (10:59 +0200)]
lib/resolve: always store EDNS data into request if present
Karel Slany [Wed, 29 Jun 2016 07:57:44 +0000 (09:57 +0200)]
Listed cookiectl rst file in module documentation.
Karel Slany [Mon, 27 Jun 2016 13:48:18 +0000 (15:48 +0200)]
Basic cookiectl module documentation.
Karel Slany [Mon, 27 Jun 2016 13:04:56 +0000 (15:04 +0200)]
Documentation fixes.
Karel Slany [Fri, 24 Jun 2016 12:13:29 +0000 (14:13 +0200)]
HMAC-SHA256-64 uses libnettle.
Karel Slany [Fri, 24 Jun 2016 10:04:47 +0000 (12:04 +0200)]
Added header file that has been removed from libknot.
Karel Slany [Fri, 24 Jun 2016 09:40:45 +0000 (11:40 +0200)]
Modification to meet latest libknot changes.
Karel Slany [Wed, 22 Jun 2016 09:20:12 +0000 (11:20 +0200)]
Cookie algorithms based on FNV-64 have been moved into libknot.
Karel Slany [Tue, 21 Jun 2016 15:37:54 +0000 (17:37 +0200)]
Using new cookies API from libknot.
Karel Slany [Mon, 20 Jun 2016 16:32:26 +0000 (18:32 +0200)]
Resolver responds to server cookie queries.
Karel Slany [Fri, 17 Jun 2016 14:09:57 +0000 (16:09 +0200)]
Reflecting latest changes in cookie handling in libknot API.
Karel Slany [Thu, 16 Jun 2016 12:27:39 +0000 (14:27 +0200)]
Experimental code for adding cookies into responses.
Karel Slany [Wed, 15 Jun 2016 15:26:26 +0000 (17:26 +0200)]
Generating FORMERR and BADCOOKIE response codes when processing cookies.
Karel Slany [Wed, 15 Jun 2016 07:26:57 +0000 (09:26 +0200)]
Server cookie algorithm configuration via interactive interface.
Karel Slany [Tue, 14 Jun 2016 15:07:42 +0000 (17:07 +0200)]
Checking cookies in inbound requests.
Karel Slany [Mon, 13 Jun 2016 17:05:15 +0000 (19:05 +0200)]
Started working on 'server' cookie code.
Karel Slany [Mon, 13 Jun 2016 12:29:50 +0000 (14:29 +0200)]
Moved cookie hash functions into separate unit.
Karel Slany [Wed, 8 Jun 2016 15:03:14 +0000 (17:03 +0200)]
Using modified cache interface without transactions.
Karel Slany [Mon, 6 Jun 2016 14:12:28 +0000 (16:12 +0200)]
Presence of libcrypto controls compilation od DNS cookies functionality.
Karel Slany [Mon, 6 Jun 2016 13:32:54 +0000 (15:32 +0200)]
Client cookie hash function can be specified using interactive interface.
Karel Slany [Mon, 6 Jun 2016 12:29:56 +0000 (14:29 +0200)]
Added HMAC-SHA256-64 hash function.
Karel Slany [Fri, 3 Jun 2016 12:30:19 +0000 (14:30 +0200)]
Conditional compilation of DNS cookie code.
Use ENABLE_cookies=yes variable to compile functionality.
Karel Slany [Thu, 2 Jun 2016 14:37:55 +0000 (16:37 +0200)]
Cookies cache TTL can be configured.
Karel Slany [Thu, 2 Jun 2016 12:54:59 +0000 (14:54 +0200)]
Renamed cookie related modules. Some code refactoring.
Karel Slany [Tue, 31 May 2016 15:02:55 +0000 (17:02 +0200)]
Using common cache for cookies.
Cookies are not stored in separate cache.
Karel Slany [Tue, 31 May 2016 14:25:16 +0000 (16:25 +0200)]
Added missing test whether new query was created in cookie layer.
Karel Slany [Tue, 31 May 2016 13:02:11 +0000 (15:02 +0200)]
Querying again when BADCOOKIE received.
The cookies layer injects a new query into the plan when a DADCOOKIE
response is detected. After failing the second attempt a TCP fallback is
signalised.
Karel Slany [Tue, 31 May 2016 12:51:41 +0000 (14:51 +0200)]
Moved cookies before iterate layer.
Karel Slany [Fri, 27 May 2016 13:38:21 +0000 (15:38 +0200)]
Fall back to TCP when receiving a valid BADCOOKIE response.
Karel Slany [Fri, 27 May 2016 13:17:01 +0000 (15:17 +0200)]
Cookie cache uses TTL to limit the cookie life span.
Karel Slany [Fri, 27 May 2016 12:52:11 +0000 (14:52 +0200)]
Cookies can be removed from cache.
Karel Slany [Fri, 27 May 2016 10:26:50 +0000 (12:26 +0200)]
Added support for TTL in cookies cache.
Karel Slany [Thu, 26 May 2016 19:29:26 +0000 (21:29 +0200)]
Checking reply source address against client cookie.
Karel Slany [Thu, 26 May 2016 19:21:05 +0000 (21:21 +0200)]
Turned some function parameters contant.
Karel Slany [Thu, 26 May 2016 19:18:29 +0000 (21:18 +0200)]
Fixed inserting response source into query context.
The source address was always put into a subsequent query.
Karel Slany [Wed, 25 May 2016 11:16:49 +0000 (13:16 +0200)]
Response origin address is stored in the query context.
This simplifies the response source identification on the cookie module.
Karel Slany [Wed, 25 May 2016 11:14:30 +0000 (13:14 +0200)]
Resolution fails when receiving invalid cookies.
According to section 5.3 of the cookie draft the resolution should fail
if invalid cookie received.
Karel Slany [Tue, 24 May 2016 14:43:10 +0000 (16:43 +0200)]
Support for basic cookies configuration.
Karel Slany [Tue, 24 May 2016 14:41:13 +0000 (16:41 +0200)]
Added basic support for client secret rotation.
Karel Slany [Tue, 24 May 2016 10:06:13 +0000 (12:06 +0200)]
Force fall-back to TCP when bad cookie received.
Karel Slany [Tue, 24 May 2016 09:24:18 +0000 (11:24 +0200)]
Send cookies only in queries.
Karel Slany [Mon, 23 May 2016 13:38:40 +0000 (15:38 +0200)]
Use only those cookies that match the current client secret.
Karel Slany [Mon, 23 May 2016 12:44:28 +0000 (14:44 +0200)]
Support for cookie options caching.
Karel Slany [Fri, 20 May 2016 19:34:36 +0000 (21:34 +0200)]
Checking received cookies against addresses in nsrep.
Karel Slany [Fri, 20 May 2016 12:29:03 +0000 (14:29 +0200)]
Added FNV-64 code.
Karel Slany [Thu, 19 May 2016 14:55:41 +0000 (16:55 +0200)]
Preparations for using nsrep mechanism to guess response origin.
Karel Slany [Thu, 19 May 2016 13:02:26 +0000 (15:02 +0200)]
Temporarily fixed packet corruption when adding cookie data.
Karel Slany [Wed, 11 May 2016 08:05:25 +0000 (10:05 +0200)]
Added code trying to obtain client IP address from libuv UDP handle.
Karel Slany [Tue, 10 May 2016 14:49:37 +0000 (16:49 +0200)]
Using actual remote server address to re-generate cookie.
Karel Slany [Tue, 10 May 2016 13:26:50 +0000 (15:26 +0200)]
Obtaining server IP address when generating query.
Karel Slany [Mon, 9 May 2016 14:35:16 +0000 (16:35 +0200)]
Resolver is able to insert dummy client cookies into generated requests.
Karel Slany [Fri, 6 May 2016 13:16:26 +0000 (15:16 +0200)]
Trying to insert cookies into request form layer.
Currently without success.
Karel Slany [Wed, 4 May 2016 13:36:12 +0000 (15:36 +0200)]
Introduced empty cookies module.
Marek Vavrusa [Wed, 10 Aug 2016 03:30:59 +0000 (20:30 -0700)]
lib/generic: fixed typo in lru code
this caused a bug in pseudo-lru table that negated
stickiness of values to table slots
Marek Vavrusa [Tue, 9 Aug 2016 20:52:11 +0000 (13:52 -0700)]
scripts: bumped used libknot version to 2.3.0
Marek Vavrusa [Tue, 9 Aug 2016 21:27:24 +0000 (14:27 -0700)]
daemon/lua: support new libknot 2.3 soversion
Marek Vavrusa [Tue, 9 Aug 2016 20:28:05 +0000 (22:28 +0200)]
Merge branch 'fix-segfault-in-early-quit' into 'master'
Fix segmentation fault in early shutdown from `quit()` in config
kresd was segfaulting if configuration file contained `quit()`
See merge request !42
Ondřej Surý [Tue, 9 Aug 2016 09:03:16 +0000 (11:03 +0200)]
Fix segmentation fault in early shutdown from `quit()` in config
Marek Vavrusa [Mon, 8 Aug 2016 16:30:52 +0000 (18:30 +0200)]
Merge branch 'tls-listen' into 'master'
DNS over TLS and TCP out-of-order processing
Refresh !18
I merged few bits from @dkg branch, but there are two notable things missing:
- watch for on-disk chang of credentials - not sure if this is really needed, I would suggest a separate MR, where we can discuss benefits of doing so.
- ephemeral key generation from `net.tls_servicename` - this is fine, but instead of setting `tls_servicename`, let's make it an explicit generator e.g. net.generate_certificate("name") instead of setting `tls_servicename` in the `struct network`. Again I would suggest a separate MR.
To test the TLS listen, you can use a dns-over-tls branch from Knot DNS:
```
./daemon/kresd --tls=127.0.0.1\#5353
net.tls("cert", "key")
```
```
$ ./src/kdig +tls -p 5353 www.cmu.edu @127.0.0.1
;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 9741
;; Flags: qr rd ra; QUERY: 1; ANSWER: 2; AUTHORITY: 0; ADDITIONAL: 0
;; QUESTION SECTION:
;; www.cmu.edu. IN A
;; ANSWER SECTION:
www.cmu.edu. 86400 IN CNAME www-cmu-prod-vip.andrew.cmu.edu.
www-cmu-prod-vip.andrew.cmu.edu. 21600 IN A 128.2.42.52
;; Received 107 B
;; Time 2016-08-05 11:52:25 CEST
;; From 127.0.0.1@5353(TCP) in 2146.1 ms
;; TLS session info: (TLS1.2)-(ECDHE-RSA-SECP256R1)-(AES-256-GCM)
```
See merge request !41
Marek Vavrusa [Fri, 5 Aug 2016 22:13:30 +0000 (00:13 +0200)]
Merge branch 'unbuffer-kr_log_info' into 'master'
Ensure that kr_log_info() gets sent promptly to stdout
If stdout is buffered, kr_log_info() might take ages to show up in the
output stream. Since this stream could be interleaved with stderr
(e.g. kr_log_error()), it would be good to be able to see the messages
in the order in which they are generated.
See merge request !40
Daniel Kahn Gillmor [Tue, 2 Aug 2016 19:58:52 +0000 (15:58 -0400)]
Ensure that kr_log_info() gets sent promptly to stdout
If stdout is buffered, kr_log_info() might take ages to show up in the
output stream. Since this stream could be interleaved with stderr
(e.g. kr_log_error()), it would be good to be able to see the messages
in the order in which they are generated.
Marek Vavrusa [Fri, 5 Aug 2016 17:48:25 +0000 (10:48 -0700)]
daemon/tls: cleanup, documented tls functions
Ondřej Surý [Fri, 5 Aug 2016 10:09:30 +0000 (12:09 +0200)]
Make the travis builds verbose
Ondřej Surý [Fri, 5 Aug 2016 10:05:49 +0000 (12:05 +0200)]
gnutls_certificate_get_x509_crt requires gnutls 3.4.0
Daniel Kahn Gillmor [Wed, 3 Aug 2016 01:41:17 +0000 (21:41 -0400)]
Log key-pinning strings for TLS keys
RFC 7858 explicitly defines an out-of-band key pinning profile as one
authentication mechanism. It uses the same format for representing
the pin as HPKP does (RFC 7469).
By logging this pin directly upon first use of the X.509 credentials,
we make it a little bit easier for an admin to publish part of a
pinset.
For ideal operation (including preparation for key rollover), a backup
public key should also be provided, but this is not defined
functionally here.
Ondřej Surý [Fri, 5 Aug 2016 09:12:49 +0000 (11:12 +0200)]
daemon/main.c, daemon/bindings.c, daemon/tls.c, daemon/worker.h: cleanup
Ondřej Surý [Fri, 5 Aug 2016 09:08:36 +0000 (11:08 +0200)]
Move tls_credentials to struct network
Daniel Kahn Gillmor [Sun, 17 Jul 2016 13:02:29 +0000 (15:02 +0200)]
provide a way for systemd-supervised services to listen on TLS via socket activation
Daniel Kahn Gillmor [Thu, 28 Jul 2016 22:35:10 +0000 (18:35 -0400)]
initialize GnuTLS logging cleanly, once at daemon/worker start.
We also propagate kresd's verbosity into the TLS logging level
Ondřej Surý [Fri, 5 Aug 2016 08:46:47 +0000 (10:46 +0200)]
Remove the extra indirection in tls_certificate_free
Ondřej Surý [Fri, 5 Aug 2016 08:29:25 +0000 (10:29 +0200)]
Move struct tls_credentials_t from daemon/worker.h to daemon/tls.h
Marek Vavrusa [Fri, 5 Aug 2016 01:17:33 +0000 (18:17 -0700)]
daemon/tls: cleanup
Ondřej Surý [Wed, 3 Aug 2016 15:02:10 +0000 (17:02 +0200)]
Fix the memory leak by returning kr_error(ECONNRESET) on end of stream
Ondřej Surý [Wed, 3 Aug 2016 11:45:15 +0000 (13:45 +0200)]
Add reference counting to gnutls credentials, so they don't get destroyed while used
Ondřej Surý [Tue, 2 Aug 2016 13:01:32 +0000 (15:01 +0200)]
Initialize global TLS credentials in the worker_ctx and initialize GnuTLS logging at global level
Ondřej Surý [Tue, 2 Aug 2016 11:13:18 +0000 (13:13 +0200)]
Miscelaneous fixes in coding style
Ondřej Surý [Wed, 20 Jul 2016 12:28:50 +0000 (14:28 +0200)]
Revert default EDNS0 buffer size to 4096
Marek Vavrusa [Wed, 20 Jul 2016 04:36:20 +0000 (21:36 -0700)]
daemon: lower minimum allowed edns bufsize to 512
there are cases where switches or middle-boxes
block DNS/UDP answers >512 octets completely,
this gives user an option to mitigate that.
however, there are authoritatives serving
large answers that don't support TCP, so it's
a compromise as always
Daniel Kahn Gillmor [Sun, 17 Jul 2016 12:37:30 +0000 (14:37 +0200)]
listen using TLS on specific sockets
kresd has --tls/-t by analogy with --addr/-a where the daemon opens
the socket itself.
This changeset adds equivalent functionality for inherited sockets:
--tlsfd/-T by analogy with --fd/-Sa
Daniel Kahn Gillmor [Sun, 17 Jul 2016 12:35:47 +0000 (14:35 +0200)]
fix kresd internal help docs, describe --tls in kresd(8)
Ondřej Surý [Sat, 16 Jul 2016 15:59:05 +0000 (17:59 +0200)]
Handle more processing from tls_process to worker_process_tcp
Marek Vavrusa [Mon, 11 Jul 2016 19:11:34 +0000 (12:11 -0700)]
daemon/tls: fixed improper use of callback, leaks
the TLS sessions now bypass the usuall event loop asynchronous iops
this is because the whole operation is synchronous right now, and
implementing asynchronous send operations would require TLS session to
restart write events on the event loop and making sure the "on complete"
callback is called eventually
Marek Vavrusa [Sun, 10 Jul 2016 18:47:25 +0000 (11:47 -0700)]
daemon/tls: process all records on input
this is a workaround probably, but we need to
process all records in received buffer otherwise
it loses the rest of the data
Daniel Kahn Gillmor [Sun, 3 Apr 2016 13:13:24 +0000 (10:13 -0300)]
WIP: first pass at TLS implementation
Jan Vcelak [Sun, 3 Apr 2016 14:25:24 +0000 (16:25 +0200)]
daemon/network: global TLS certificate and key configuration
Marek Vavrusa [Fri, 8 Jul 2016 03:22:51 +0000 (20:22 -0700)]
daemon: ported DNS/TLS preparation code to 1.1
Daniel Kahn Gillmor [Sun, 3 Apr 2016 13:08:24 +0000 (10:08 -0300)]
Actively link to gnutls
Jan Vcelak [Sun, 3 Apr 2016 15:42:41 +0000 (17:42 +0200)]
TLS: update documentation
Ondřej Surý [Thu, 4 Aug 2016 07:22:04 +0000 (09:22 +0200)]
sd_listen_fds_with_names() requires libsystemd >= 227
Ondřej Surý [Fri, 29 Jul 2016 06:49:40 +0000 (08:49 +0200)]
Merge branch 'systemctl-help' into 'master'
add Documentation= reference to knot-resolver.service
This makes "systemctl help knot-resolver" bring up the appropriate man
page.
See merge request !39
Daniel Kahn Gillmor [Sun, 17 Jul 2016 09:41:38 +0000 (11:41 +0200)]
add Documentation= reference to knot-resolver.service
This makes "systemctl help knot-resolver" bring up the appropriate man
page.
Marek Vavrusa [Thu, 28 Jul 2016 17:04:10 +0000 (19:04 +0200)]
Merge branch 'control-socket-activation' into 'master'
Control socket activation
This branch provides reasonable configs for full systemd socket activation for kresd.
See merge request !36
Daniel Kahn Gillmor [Sun, 17 Jul 2016 11:35:06 +0000 (13:35 +0200)]
update documentation to explain systemd socket-activation configuration
Daniel Kahn Gillmor [Sun, 17 Jul 2016 09:41:38 +0000 (11:41 +0200)]
systemd rules for closely-supervised knot-resolver service
This is a fully-socket-activated knot-resolver service that can run as
a non-priivleged user named knot-resolver.