]>
git.ipfire.org Git - thirdparty/knot-resolver.git/log
Aleš Mrázek [Tue, 24 Sep 2024 08:40:45 +0000 (10:40 +0200)]
python: datamodel: added permissions_default to global validation context
It is used to change the check of dirs/files permissions against the default constant user:group or the current user the process is running as.
Aleš Mrázek [Tue, 24 Sep 2024 08:08:37 +0000 (10:08 +0200)]
python: manager: check the current user against the default constant when the server starts
Aleš Mrázek [Mon, 23 Sep 2024 15:57:26 +0000 (17:57 +0200)]
datamodel: types: files: improvements
- compare intended uid with current working uid
- check permissions for current user and group
- use os.getuid() and pwd.getpwuid() instead of os.getlogin() #919
Aleš Mrázek [Mon, 30 Sep 2024 09:34:29 +0000 (11:34 +0200)]
Merge branch 'python-constants-module' into 'master'
python/knot_resolver: meson configured constants
See merge request knot/knot-resolver!1613
Aleš Mrázek [Tue, 24 Sep 2024 11:49:24 +0000 (13:49 +0200)]
.gitlab-ci.yml: IMAGE_TAG update
Jakub Ružička [Mon, 23 Sep 2024 14:09:33 +0000 (16:09 +0200)]
CI: use standard docker for pkg:arch
Arch LXC images currently don't work :(
Standard docker can't test systemd but it's better than nothing.
Jakub Ružička [Mon, 23 Sep 2024 14:59:52 +0000 (16:59 +0200)]
tests/packaging: skip systemd tests without systemd
Jakub Ružička [Thu, 19 Sep 2024 14:05:44 +0000 (16:05 +0200)]
distro/pkg: update packaging for single python module
Jakub Ružička [Tue, 24 Sep 2024 09:10:23 +0000 (11:10 +0200)]
pyproject.toml: exclude meson templates
Make sure constants.py.in and meson.build are excluded from
knot_resolver python module.
Aleš Mrázek [Thu, 19 Sep 2024 13:43:30 +0000 (15:43 +0200)]
python: meson constants.py template moved to knot_resolver module
Aleš Mrázek [Tue, 17 Sep 2024 22:33:17 +0000 (00:33 +0200)]
scripts/poe-tasks: created gen-constantspy script
New script to build constants.py module using Meson. Also check that the module is the current one.
Aleš Mrázek [Tue, 17 Sep 2024 22:05:11 +0000 (00:05 +0200)]
scripts/poe-tasks: _env.sh improvements and formatting
Aleš Mrázek [Mon, 16 Sep 2024 16:28:49 +0000 (18:28 +0200)]
scripts/poe-tasks: ./configure not required for some tasks
Aleš Mrázek [Mon, 16 Sep 2024 15:56:27 +0000 (17:56 +0200)]
meson.build: use non-standard prefix for run_dir
Aleš Mrázek [Mon, 16 Sep 2024 15:53:12 +0000 (17:53 +0200)]
scripts/poe-tasks: doc-schema added
The script that generates the configuration JSON schema with the correct values.
Aleš Mrázek [Mon, 16 Sep 2024 10:59:36 +0000 (12:59 +0200)]
python: use CACHE_DIR and RUN_DIR constants
Aleš Mrázek [Sun, 15 Sep 2024 19:45:36 +0000 (21:45 +0200)]
python: removed env vars from python code
Aleš Mrázek [Fri, 13 Sep 2024 09:59:13 +0000 (11:59 +0200)]
scripts/poe-tasks: improvements
Aleš Mrázek [Thu, 12 Sep 2024 20:45:16 +0000 (22:45 +0200)]
doc/_static/config.schema.json: update
Aleš Mrázek [Thu, 12 Sep 2024 13:15:41 +0000 (15:15 +0200)]
ci/images/manager/DockerFile removed
Docker images are handled in a separate repository (knot-resolver-ci), so this file is no longer needed.
Aleš Mrázek [Tue, 10 Sep 2024 14:00:26 +0000 (16:00 +0200)]
scripts/poe-tasks: use id cmd instead of $USER env var in _env.sh
Aleš Mrázek [Tue, 10 Sep 2024 10:02:32 +0000 (12:02 +0200)]
ci: manager: configure meson before every test
Aleš Mrázek [Tue, 10 Sep 2024 09:18:11 +0000 (11:18 +0200)]
python/knot_resolver: constants fixes
Aleš Mrázek [Tue, 10 Sep 2024 09:07:09 +0000 (11:07 +0200)]
python/knot_resolver: use constants.py configured by Meson
Aleš Mrázek [Mon, 9 Sep 2024 21:44:28 +0000 (23:44 +0200)]
scripts/poe-tasks: text and naming improvements
Vladimír Čunát [Mon, 30 Sep 2024 08:07:22 +0000 (10:07 +0200)]
Merge !1618: daemon udp connect: use connected udp communication
Vladimír Čunát [Mon, 30 Sep 2024 07:50:52 +0000 (09:50 +0200)]
meson, NEWS: bump minimal libuv version
Frantisek Tobias [Mon, 30 Sep 2024 06:01:49 +0000 (08:01 +0200)]
daemon udp connect: use connected udp communication
Vladimír Čunát [Wed, 25 Sep 2024 08:49:39 +0000 (10:49 +0200)]
Merge !1617: daemon/session2: avoid incorrectly generated errors
Vladimír Čunát [Wed, 25 Sep 2024 08:39:43 +0000 (10:39 +0200)]
daemon/session2: avoid incorrectly generated errors
The _try_ functions additionally return positive values on success,
and the code around didn't deal with that.
So far there's no evidence that this caused any issues beyond debug-logs:
[prlayr] ... iteration of group ... ended with status 'Unknown error ...
Vladimír Čunát [Wed, 25 Sep 2024 08:38:48 +0000 (10:38 +0200)]
Merge !1609: local-data: generate CNAMEs from DNAMEs
Vladimír Čunát [Wed, 25 Sep 2024 08:27:16 +0000 (10:27 +0200)]
local-data: generate CNAMEs from DNAMEs
As with some other aspects, these DNAMEs do not work exactly as
in a real zone, e.g. they don't cause occlusion.
Vladimír Čunát [Mon, 16 Sep 2024 15:19:24 +0000 (17:19 +0200)]
Merge !1615: nits (see commits)
Vladimír Čunát [Mon, 16 Sep 2024 15:10:29 +0000 (17:10 +0200)]
doc/user/gettingstarted-install.rst: don't advertise launchpad here
We have it, but it probably adds more confusion than use to mention it here.
Vladimír Čunát [Mon, 16 Sep 2024 15:10:29 +0000 (17:10 +0200)]
python datamodel: tweak cache TTL validation
I'm not aware of a use case for the limits to be equal,
but it's at least a sane combination.
Vladimír Čunát [Mon, 16 Sep 2024 15:10:25 +0000 (17:10 +0200)]
CI: allow_failure in pkg:arch
So far we don't know how to fix this.
Vladimír Čunát [Mon, 16 Sep 2024 14:40:00 +0000 (16:40 +0200)]
Merge !1606: doc/dev: add layered-protocols.rst
Vladimír Čunát [Mon, 2 Sep 2024 11:00:36 +0000 (13:00 +0200)]
doc/dev/layered-protocols.rst: tweak the intro titles
Oto Šťáva [Fri, 30 Aug 2024 13:34:00 +0000 (15:34 +0200)]
doc/dev: add layered-protocols.rst
This is a `pandoc` conversion with just a couple tiny manual modifications.
Vladimír Čunát [Mon, 16 Sep 2024 13:43:13 +0000 (15:43 +0200)]
Merge !1614: daemon/session2: more Coverity in *wrap_after()
Vladimír Čunát [Fri, 13 Sep 2024 08:24:31 +0000 (10:24 +0200)]
daemon/session2: more Coverity in *wrap_after()
Let's assert that we don't run over the edge.
If I look right, so far we don't use this in a way
that this could happen, and I can't see how it would make sense.
Vladimír Čunát [Thu, 12 Sep 2024 13:58:50 +0000 (15:58 +0200)]
Merge !1612: coverity fixes
Vladimír Čunát [Thu, 12 Sep 2024 12:54:16 +0000 (14:54 +0200)]
lib/generic/array: extend the return type of array_push*()
In case of no error, the index is returned,
but `int` isn't a great choice for returning array indices.
(though I doubt that we can get anywhere near 2^31 elements in practice)
Detected by Coverity.
Vladimír Čunát [Thu, 12 Sep 2024 12:54:16 +0000 (14:54 +0200)]
daemon/session2: try to avoid triggering Coverity
Strictly speaking, the .ip member is on 16 bytes long,
so it doesn't suffice in case it's an IPv6.
Practically it doesn't matter, as there's the union containing all this.
Either way, I think it's cleaner to copy to the whole union.
Also we don't support it in this case,
but theoretically e.g. an AF_UNIX could happen,
so let's be defensive and guard by kr_require().
Vladimír Čunát [Thu, 12 Sep 2024 12:54:16 +0000 (14:54 +0200)]
daemon/session2: fix error handling in *wrap_after()
We need to check the "< 0" condition *before*
incrementing or decrementing the returned layer_ix.
Detected by Coverity :-)
Vladimír Čunát [Wed, 11 Sep 2024 12:34:29 +0000 (14:34 +0200)]
Merge !1512: datamodel: additional headers for json-schema
Aleš Mrázek [Sat, 7 Sep 2024 00:32:32 +0000 (02:32 +0200)]
datamodel: workers-max: constant default to have a consistent JSON schema
Aleš Mrázek [Sat, 7 Sep 2024 00:09:40 +0000 (02:09 +0200)]
doc: create static JSON schema
- poe check: check for difference in JSON schema
- scripts/meson/make-doc.sh: do not create JSON schema
Aleš Mrázek [Thu, 14 Mar 2024 14:49:31 +0000 (15:49 +0100)]
tests: JSON schema packaging tests
Aleš Mrázek [Thu, 7 Mar 2024 12:52:58 +0000 (13:52 +0100)]
datamodel: additional headers for json-schema
Aleš Mrázek [Mon, 9 Sep 2024 12:03:51 +0000 (14:03 +0200)]
Merge branch 'manager-python-modules' into 'master'
manager: python modules reorganization
See merge request knot/knot-resolver!1598
Jakub Ružička [Mon, 9 Sep 2024 10:24:37 +0000 (12:24 +0200)]
distro/pkg: update for new python modules layout
Old knot_resolver module is now knot_resolver_build_options.
Old knot_resolver_manager module is now just knot_resolver.
Aleš Mrázek [Thu, 5 Sep 2024 13:13:54 +0000 (15:13 +0200)]
python/knot_resolver/manager: added metrics module
- statistics.py: removed
- metrics: prometheus support is in separate module
Aleš Mrázek [Wed, 4 Sep 2024 19:58:07 +0000 (21:58 +0200)]
python/knot_resolver: compat module moved under utils
Aleš Mrázek [Fri, 30 Aug 2024 08:03:41 +0000 (10:03 +0200)]
python: manager: modules restructuring
- new KresManager exception
- imports formatting
Aleš Mrázek [Thu, 29 Aug 2024 13:32:29 +0000 (15:32 +0200)]
scripts/poe-tasks/check: added isort check
Aleš Mrázek [Thu, 29 Aug 2024 13:31:23 +0000 (15:31 +0200)]
python/knot_resolver: imports formatting
Aleš Mrázek [Thu, 29 Aug 2024 13:07:28 +0000 (15:07 +0200)]
python/knot_resolver: removed unnecessary use of typing_extensions lib
Since we support python 3.8 and higher, there is no need for backwards support for most of the features we use in the standard typing library.
Aleš Mrázek [Thu, 29 Aug 2024 11:30:27 +0000 (13:30 +0200)]
python/knot_resolver: KresBaseException added
Aleš Mrázek [Wed, 28 Aug 2024 09:13:41 +0000 (11:13 +0200)]
python/knot_resolver: set __version__
Aleš Mrázek [Wed, 28 Aug 2024 09:04:00 +0000 (11:04 +0200)]
python/knot_resolver: version arguments for manager and client
Aleš Mrázek [Wed, 28 Aug 2024 09:01:34 +0000 (11:01 +0200)]
python/knot_resolver: constants reorganization
Aleš Mrázek [Tue, 27 Aug 2024 13:26:58 +0000 (15:26 +0200)]
scripts/poe-tasks: clean added
Aleš Mrázek [Mon, 26 Aug 2024 16:37:22 +0000 (18:37 +0200)]
python: knot_resolver_build_options module added
Aleš Mrázek [Mon, 26 Aug 2024 16:20:21 +0000 (18:20 +0200)]
python: knot_resolver_manager module renamed to knot_resolver
Aleš Mrázek [Mon, 19 Aug 2024 04:55:56 +0000 (06:55 +0200)]
python: datamodel module moved out of manager module
Aleš Mrázek [Fri, 16 Aug 2024 10:07:30 +0000 (12:07 +0200)]
python: client: commands: text improvements and fixes WIP
Aleš Mrázek [Fri, 16 Aug 2024 09:06:23 +0000 (11:06 +0200)]
python: client: minor modules and code refactoring
Aleš Mrázek [Thu, 15 Aug 2024 13:01:24 +0000 (15:01 +0200)]
manager: removed nice syntax error on old Python versions
Aleš Mrázek [Tue, 6 Aug 2024 13:16:54 +0000 (15:16 +0200)]
manager: reorganizing python modules
Aleš Mrázek [Tue, 6 Aug 2024 09:07:53 +0000 (11:07 +0200)]
manager: moved everything out of the directory
Vladimír Čunát [Fri, 6 Sep 2024 13:58:12 +0000 (15:58 +0200)]
Merge !1594: modules/workarounds: fix module initialization
menakite [Fri, 16 Aug 2024 04:12:33 +0000 (06:12 +0200)]
modules/workarounds: fix module initialisation.
Rename config to init, which is called when a module is loaded.
It seems it's been broken for a while.
Vladimír Čunát [Fri, 6 Sep 2024 11:08:49 +0000 (13:08 +0200)]
Merge !1610: tests/integration/deckard: update to latest master
Vladimír Čunát [Mon, 2 Sep 2024 15:12:28 +0000 (17:12 +0200)]
tests/integration/deckard: update to latest master
adds libjemalloc-detector
Vladimír Čunát [Fri, 6 Sep 2024 10:37:15 +0000 (12:37 +0200)]
Merge !1590: resolver,validator: provide more EDE codes
menakite [Sun, 1 Sep 2024 18:56:44 +0000 (20:56 +0200)]
validator: fix after
fac462e163a2614e24d2c604a9b120b949796a72 .
See:
https://gitlab.nic.cz/knot/knot-resolver/-/merge_requests/1590#note_304380
Vladimír Čunát [Sun, 1 Sep 2024 09:20:15 +0000 (11:20 +0200)]
NEWS: mention the EDE improvements
menakite [Sat, 17 Aug 2024 01:10:25 +0000 (03:10 +0200)]
modules/dns64: change EDE from "Forged Answer" to "Synthesized".
menakite [Thu, 15 Aug 2024 20:01:23 +0000 (22:01 +0200)]
cache: set EDE when synthesizing answer from aggressive cache
menakite [Tue, 13 Aug 2024 16:52:45 +0000 (18:52 +0200)]
validator: set EDE code if SEP does not match or DNSKEY is revoked.
If the tag and algorithm of DS and DNSKEY do not correspond, or in case
the DNSKEY is revoked, set EDE code "DNSKEY Missing".
If both match, but the algorithm is not supported, set EDE code
"Unsupported DNSKEY Algorithm".
In case RRSIGs for DNSKEY exist, but can't be validated due to a key
error, set EDE code "RRSIGs Missing".
menakite [Sun, 11 Aug 2024 03:44:21 +0000 (05:44 +0200)]
resolver,validator: provide more EDE codes.
dnssec:
* Provide a way to retrieve whether a DNSKEY has the Zone Key bit set,
and add bindings for Lua modules (kr_dnssec_key_zonekey_flag), like
kr_dnssec_key_sep_flag.
* In kr_ds_algo_support() provide a way to retrieve what is wrong with
the keys.
* Check if a RRSIG RR has the signature expired already before
inception time.
validator:
* Set EDE "Unsupported NSEC3 Iterations Value" when downgrading.
* Set EDE "Signature Expired before Valid" when checking RRSIGs.
* Set EDE "No Zone Key Bit Set" when a DNSKEY with the Zone Key Bit
set to 0 is discarded.
* Instead of the generic "Other Error" with extra text
"unsupported digest/key", set appropriate EDEs
"Unsupported DNSKEY Algorithm" and "Unsupported DS Digest Type".
resolver:
* Set EDE "No Reachable Authority" when it is decided that all
authoritative servers are unreachable or misbehaving.
Some parts adjusted by vcunat, in particular construction of EDE messages.
Vladimír Čunát [Sun, 1 Sep 2024 09:01:22 +0000 (11:01 +0200)]
lib/utils: generalize kr_strcatdup() for mempools
It's trivial really, and I'd like to use it now.
Vladimír Čunát [Fri, 6 Sep 2024 08:09:33 +0000 (10:09 +0200)]
Merge !1602: daemon: remove -f/--forks
Closes #631
Oto Šťáva [Wed, 28 Aug 2024 13:49:00 +0000 (15:49 +0200)]
daemon: remove -f/--forks
Closes #631
Aleš Mrázek [Wed, 4 Sep 2024 13:52:51 +0000 (15:52 +0200)]
Merge branch 'iss905' into 'master'
datamodel: file permission checks
See merge request knot/knot-resolver!1595
Frantisek Tobias [Wed, 4 Sep 2024 11:51:56 +0000 (13:51 +0200)]
datamodel: types: fix object iteration compatibility for Python < 3.11
Aleš Mrázek [Mon, 2 Sep 2024 19:18:05 +0000 (21:18 +0200)]
datamodel: use permission types in config
Aleš Mrázek [Mon, 2 Sep 2024 19:16:31 +0000 (21:16 +0200)]
datamodel: types: files: WritableFilePath added
Aleš Mrázek [Mon, 2 Sep 2024 15:51:25 +0000 (17:51 +0200)]
datamodel: types: files: enum for permission mode added
Frantisek Tobias [Wed, 21 Aug 2024 09:44:14 +0000 (11:44 +0200)]
datamodel: file permission checks: format files
Aleš Mrázek [Tue, 20 Aug 2024 10:04:19 +0000 (12:04 +0200)]
scripts/poe-tasks/configure: add user and group
Frantisek Tobias [Tue, 20 Aug 2024 08:09:03 +0000 (10:09 +0200)]
datamodel: file permission checks: remove left over code, fix linter
formatting ignored for now since the code that is to be formated will likely be moved elsewhere
Frantisek Tobias [Tue, 20 Aug 2024 07:32:38 +0000 (09:32 +0200)]
datamodel: file permission checks: #814 created function to check that kresd_user() can access the files and directories
Frantisek Tobias [Thu, 15 Aug 2024 11:41:44 +0000 (13:41 +0200)]
datamodel: file permission checks: Created new types to check if files can be opened
Vladimír Čunát [Mon, 2 Sep 2024 14:34:20 +0000 (16:34 +0200)]
Merge !1601: daemon/tls: log pins and certificates in case of no match
Fixes #813
Vladimír Čunát [Wed, 28 Aug 2024 11:28:05 +0000 (13:28 +0200)]
daemon/tls: bump gnutls version requirement
It simplifies a bit. No need to support ancient versions.
Vladimír Čunát [Wed, 28 Aug 2024 11:28:02 +0000 (13:28 +0200)]
daemon/tls: drop a DEBUG section
The new pin logging is better than this. No need to recompile with -DDEBUG (rare).
Vladimír Čunát [Wed, 28 Aug 2024 10:48:40 +0000 (12:48 +0200)]
daemon/tls: fix a bug that caused empty base64 pins
Vladimír Čunát [Wed, 28 Aug 2024 10:23:15 +0000 (12:23 +0200)]
NEWS for the pin-sha256 changes