2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-28 12:37:55 +00:00

28742 Commits

Author SHA1 Message Date
Thomas Markwalder
51d769f227 [#3921] Fixed syslog:facility parsing
Changes to be committed:
    new file:   changelog_unreleased/3921-restrictions-on-log-directory-break-syslog-logging
    modified:   src/lib/process/log_parser.cc
    modified:   src/lib/process/tests/log_parser_unittests.cc
2025-06-03 15:10:33 +00:00
Thomas Markwalder
6d6bdcf00d [#3858] Addressed review comments
minor nits:

modified:   src/bin/dhcp4/tests/hooks_unittest.cc
modified:   src/hooks/dhcp/ping_check/ping_check_mgr.cc
modified:   src/hooks/dhcp/ping_check/tests/ping_check_mgr_unittests.cc
2025-06-03 14:48:45 +00:00
Thomas Markwalder
57ab9013da [#3858] Skip ping-check if active or reserved
/src/bin/dhcp4/dhcp4_srv.cc
    Dhcpv4Srv::processLocalizedQuery4() - pass in current host to callout

/src/bin/dhcp4/tests/hooks_unittest.cc
    Update UTs to check for host argument

/src/hooks/dhcp/ping_check/ping_check_callouts.cc
    lease4_offer() - pass host argument to PingCheckMgr::shouldPing()

/src/hooks/dhcp/ping_check/ping_check_mgr.*
    PingCheckMgr::shouldPing() - added host parameter and altered
    logic to skip ping if lease is active or reserved

/src/hooks/dhcp/ping_check/tests/ping_check_mgr_unittests.cc
    Updated UTs
2025-06-03 14:48:45 +00:00
Thomas Markwalder
7b40097ff3 [#3659] Addressed review comments
Fixed minor comments, updated error text in two UTs.

new file:   changelog_unreleased/3659-enable-lease-caching-as-default
modified:   src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc
modified:   src/lib/dhcpsrv/tests/cfg_subnets6_unittest.cc
modified:   src/lib/testutils/test_to_element.cc
modified:   src/lib/testutils/test_to_element.h
2025-06-03 11:27:32 +00:00
Thomas Markwalder
667dbc96b0 Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Tomek Mrugalski <tomek@isc.org>
2025-06-03 11:27:32 +00:00
Thomas Markwalder
3343fba98b [#3659] Fixed unit tests
modified:   src/bin/dhcp4/tests/get_config_unittest.cc
modified:   src/bin/dhcp4/tests/http_control_socket_unittest.cc
modified:   src/bin/dhcp6/tests/get_config_unittest.cc
modified:   src/bin/dhcp6/tests/hooks_unittest.cc
modified:   src/bin/dhcp6/tests/http_control_socket_unittest.cc
2025-06-03 11:27:32 +00:00
Thomas Markwalder
db99241863 [#3659] Default cache-threshold to 0.25
/doc/sphinx/arm/dhcp4-srv.rst
/doc/sphinx/arm/dhcp4-srv.rst
    Updated Lease Caching section

/src/hooks/dhcp/subnet_cmds/tests/subnet4_cmds_unittest.cc
/src/hooks/dhcp/subnet_cmds/tests/subnet6_cmds_unittest.cc
/src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc
/src/lib/dhcpsrv/tests/cfg_subnets6_unittest.cc
/src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
/src/lib/dhcpsrv/tests/network_unittest.cc
/src/lib/dhcpsrv/tests/shared_network_parser_unittest.cc

/src/lib/dhcpsrv/parsers/base_network_parser.cc
    BaseNetworkParser::parseCacheParams() - altered parsing to
    permit threshold of 0.0

/src/lib/dhcpsrv/parsers/simple_parser4.cc
/src/lib/dhcpsrv/parsers/simple_parser6.cc
    Set global default for threshold to 0.25

/src/lib/testutils/test_to_element.*
    assertEqWithDiff() - new variant that ASSERT when not equivalent
2025-06-03 11:27:32 +00:00
Razvan Becheriu
a30d2fe077 [#3916] add warning on CA startup as being deprecated 2025-05-30 21:27:43 +03:00
Andrei Pavel
51ac2ebc2a
[#3734] Remove unused variable after HAVE_PGSQL_SSL removal 2025-05-30 11:09:12 +03:00
Andrei Pavel
ce808ef348
[#3734] Remove dotlibs from Meson which was only about compatiblity with Autotools 2025-05-30 10:57:39 +03:00
Andrei Pavel
cb5c467e72
[#3734] Switch tools/find-uninstalled-headers.py to Meson 2025-05-30 10:57:39 +03:00
Andrei Pavel
cd2e58b898
[#3734] Remove unnecessary path_replacer.sh 2025-05-30 10:57:39 +03:00
Andrei Pavel
c46442bc16
[#3734] Remove unnecessary HAVE_PGSQL_SSL macro 2025-05-30 10:57:39 +03:00
Andrei Pavel
0629db330c
[#3734] Meson changes facilitated by the removal of autotools 2025-05-30 10:57:39 +03:00
Andrei Pavel
3a922204f0
[#3734] Remove autotools 2025-05-30 10:57:39 +03:00
Razvan Becheriu
290419eb36 [#3875] fixed args order in flex option hook lib logs 2025-05-30 07:21:30 +00:00
Razvan Becheriu
89bca2d2bf [#3819] fix docs 2025-05-30 10:04:04 +03:00
Razvan Becheriu
186d0a1643 [#3643] log MT settings at info level - not experimental 2025-05-30 09:26:37 +03:00
Thomas Markwalder
bad7240b90 [#3906] Fix root-file handling
Added changelog delta
src/lib/util/filesystem.cc
    PathChecker::validatePath() - catch root-file

src/lib/util/tests/filesystem_unittests.cc
    TEST_F(PathCheckerTest, validatePathEnforcePath)
    TEST_F(PathCheckerTest, validatePathEnforcePathFalse) -
    added test cases
2025-05-23 15:51:11 -04:00
Thomas Markwalder
ee89af66cc [#3902] More typos
modified:   doc/sphinx/arm/agent.rst
modified:   doc/sphinx/arm/ddns.rst
modified:   doc/sphinx/arm/dhcp4-srv.rst
modified:   doc/sphinx/arm/dhcp6-srv.rst
modified:   doc/sphinx/arm/security.rst
modified:   src/bin/agent/ca_messages.mes
modified:   src/lib/d2srv/d2_messages.mes
modified:   src/lib/util/filesystem.cc
modified:   src/lib/util/filesystem.h
2025-05-23 14:36:30 -04:00
Thomas Markwalder
19dfb6f30a [#3902] Recompiled messages
modified:   src/bin/agent/ca_messages.cc
modified:   src/bin/agent/ca_messages.h
modified:   src/bin/dhcp4/dhcp4_messages.cc
modified:   src/bin/dhcp4/dhcp4_messages.h
modified:   src/bin/dhcp6/dhcp6_messages.cc
modified:   src/bin/dhcp6/dhcp6_messages.h
modified:   src/lib/d2srv/d2_messages.cc
modified:   src/lib/d2srv/d2_messages.h
2025-05-23 11:27:22 -04:00
Thomas Markwalder
9adef66837 [#3902] servers disable security on -X
modified:   doc/sphinx/arm/agent.rst
modified:   doc/sphinx/arm/ddns.rst
modified:   doc/sphinx/arm/dhcp4-srv.rst
modified:   doc/sphinx/arm/dhcp6-srv.rst
modified:   doc/sphinx/arm/security.rst
modified:   src/bin/agent/ca_messages.mes
modified:   src/bin/agent/ca_process.cc
modified:   src/bin/d2/d2_process.cc
modified:   src/bin/dhcp4/dhcp4_messages.mes
modified:   src/bin/dhcp4/main.cc
modified:   src/bin/dhcp6/dhcp6_messages.mes
modified:   src/bin/dhcp6/main.cc
modified:   src/lib/config/unix_command_config.cc
modified:   src/lib/config/unix_command_config.h
modified:   src/lib/d2srv/d2_messages.mes
modified:   src/lib/dhcpsrv/cfgmgr.cc
modified:   src/lib/dhcpsrv/cfgmgr.h
modified:   src/lib/dhcpsrv/legal_log_mgr.cc
modified:   src/lib/dhcpsrv/legal_log_mgr.h
modified:   src/lib/hooks/hooks_parser.cc
modified:   src/lib/hooks/hooks_parser.h
modified:   src/lib/hooks/tests/hooks_manager_unittest.cc
modified:   src/lib/process/d_controller.cc
modified:   src/lib/process/log_parser.cc
modified:   src/lib/process/log_parser.h
modified:   src/lib/util/filesystem.cc
modified:   src/lib/util/filesystem.h
modified:   src/lib/util/tests/filesystem_unittests.cc
2025-05-23 11:20:20 -04:00
Razvan Becheriu
2b9b79e7a5 [#3831] fixed forensic log path in docs 2025-05-22 12:23:06 +00:00
Andrei Pavel
727d286db7
[#3831] Remove "path" from default configs 2025-05-22 14:58:21 +03:00
Wlodek Wencel
81e0857008 Release Changes 2.7.9 2025-05-20 15:48:15 +00:00
Andrei Pavel
2b9264d1b4 [#3892] Bump up library version numbers 2025-05-20 13:01:39 +00:00
Andrei Pavel
917b20ca47
[#3833] Remove unused LEGAL_LOG_DIR macros 2025-05-20 13:33:02 +03:00
Razvan Becheriu
5e21953fb9 [#3833] addressed review comments 2025-05-20 07:48:32 +03:00
Razvan Becheriu
0d2ff4ff5e [#3833] remove references to /tmp/ 2025-05-20 00:04:12 +03:00
Thomas Markwalder
8a3683dc9b [#3831] Removed /tmp example conf and .pre
Changes to be committed:
    modified:   kea4/dhcpv4-over-dhcpv6.json
    modified:   netconf/simple-dhcp4.json
    modified:   netconf/simple-dhcp6.json
    modified:   ../../src/bin/keactrl/kea-ctrl-agent.conf.pre
    modified:   ../../src/bin/keactrl/kea-dhcp-ddns.conf.pre
    modified:   ../../src/bin/keactrl/kea-dhcp4.conf.pre
    modified:   ../../src/bin/keactrl/kea-dhcp6.conf.pre
    modified:   ../../src/bin/keactrl/kea-netconf.conf.pre
2025-05-19 08:44:57 -04:00
Razvan Becheriu
5cf1a06cef [#3831] fix fuzz and permissions mask 2025-05-19 12:12:55 +00:00
Thomas Markwalder
6dd20109cc [#3831] Agent uses restricted socket paths
modified:   ../../../doc/examples/agent/comments.json
modified:   ../../../doc/examples/agent/simple.json
modified:   ca_cfg_mgr.cc
modified:   ca_command_mgr.cc
modified:   simple_parser.cc
modified:   tests/ca_cfg_mgr_unittests.cc
modified:   tests/ca_command_mgr_unittests.cc
modified:   tests/ca_controller_unittests.cc
modified:   tests/get_config_unittest.cc
modified:   tests/parser_unittests.cc
modified:   tests/testdata/get_config.json
2025-05-19 12:12:55 +00:00
Thomas Markwalder
17ebfa908c [#3831] Add UT for env override
modified:   Makefile.am
modified:   meson.build
modified:   unix_command_config_unittests.cc
2025-05-19 12:12:55 +00:00
Thomas Markwalder
cc07755a2d [#3831] More UT fixes
modified:   doc/examples/ddns/all-keys-netconf.json
modified:   doc/examples/ddns/all-keys.json
modified:   doc/examples/ddns/comments.json
modified:   doc/examples/ddns/sample1.json
modified:   doc/examples/ddns/template.json
modified:   src/bin/d2/tests/d2_cfg_mgr_unittests.cc
modified:   src/bin/d2/tests/d2_command_unittest.cc
modified:   src/bin/d2/tests/get_config_unittest.cc
modified:   src/bin/d2/tests/testdata/get_config.json
2025-05-19 12:12:55 +00:00
Thomas Markwalder
3a5f553bd8 [#3831] Fix UTs
modified:   src/bin/dhcp4/tests/config_parser_unittest.cc
modified:   src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
modified:   src/bin/dhcp4/tests/dhcp4_test_utils.h
modified:   src/bin/dhcp4/tests/get_config_unittest.cc
modified:   src/bin/dhcp6/tests/dhcp6_test_utils.h
modified:   src/bin/dhcp6/tests/get_config_unittest.cc
2025-05-19 12:12:55 +00:00
Thomas Markwalder
16acf248d0 [#3831] Initial impl of restricted ctl sockets
Working, have some UTs that still need to be fixed

/doc/examples/kea4/advanced.json
/doc/examples/kea4/all-keys-netconf.json
/doc/examples/kea4/all-keys-netconf.json
/doc/examples/kea4/all-keys.json
/doc/examples/kea4/comments.json
/doc/examples/kea4/config-backend.json
/doc/examples/kea4/ha-load-balancing-server1-mt-with-tls.json
/doc/examples/kea4/ha-load-balancing-server2-mt.json
/doc/examples/kea6/advanced.json
/doc/examples/kea6/all-keys-netconf.json
/doc/examples/kea6/all-keys.json
/doc/examples/kea6/comments.json
/doc/examples/kea6/config-backend.json
/doc/examples/kea6/ha-hot-standby-server1-with-tls.json
/doc/examples/kea6/ha-hot-standby-server2.json
    removed /tmp path from socket-name

/src/bin/dhcp4/tests/config_parser_unittest.cc
/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
/src/bin/dhcp4/tests/dhcp4_test_utils.cc
/src/bin/dhcp4/tests/dhcp4_test_utils.h
/src/bin/dhcp6/tests/config_parser_unittest.cc
/src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc
/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
/src/bin/dhcp6/tests/dhcp6_test_utils.cc
/src/bin/dhcp6/tests/dhcp6_test_utils.h
    updated tests

/src/lib/config/Makefile.am
/src/lib/config/meson.build
    defined CONTROL_SOCKET_DIR

/src/lib/config/tests/unix_command_config_unittests.cc
/src/lib/config/tests/unix_command_mgr_unittests.cc
    updated tests

/src/lib/config/unix_command_config.*
    UnixCommandConfig - added PathChecker singleton and methods
    to set and validate socket path/permissions

/src/lib/util/filesystem.*
    Added getPermsissions() and hasPermsission()

/src/lib/util/tests/filesystem_unittests.cc
    new permissions tests
2025-05-19 12:12:55 +00:00
Francis Dupont
86f826d238 [#3831] Applied kea-ctrl-agent.conf.pre update 2025-05-16 23:08:03 +02:00
Francis Dupont
e07ad3d1a5 [#3831] Finished UTs 2025-05-16 23:08:03 +02:00
Francis Dupont
f82e83c826 [#3831] Checkpoint: did dhcp4 UTs 2025-05-16 23:08:02 +02:00
Francis Dupont
78c0cd0de3 [#3831] Checkpoint: fixes, still UTs to add 2025-05-16 23:08:02 +02:00
Francis Dupont
da3fc824be [#3831] Fixed KEA_DHCP_DATA_DIR already set 2025-05-16 23:08:02 +02:00
Francis Dupont
e8d9560f43 [#3831] Checkpoint: fixes 2025-05-16 23:08:02 +02:00
Francis Dupont
01dc6e538c [#3831] Checkpoint: code done, UTs to be updated 2025-05-16 23:08:02 +02:00
Francis Dupont
0e25831cf8 [#3831] Restricted cache-write 2025-05-16 12:13:31 +02:00
Razvan Becheriu
fdc2b1c5f9
[#3831] update CA default config and fix dhcp examples 2025-05-16 12:20:44 +03:00
Francis Dupont
97c2226aa9
[#3831] Spelling 2025-05-16 12:20:44 +03:00
Thomas Markwalder
dcd07a42aa
[#3831] Fixed UT build and minor nits
modified:   doc/sphinx/arm/dhcp6-srv.rst
modified:   doc/sphinx/arm/logging.rst
modified:   src/bin/d2/tests/d2_process_tests.sh.in
modified:   src/bin/dhcp4/tests/dhcp4_process_tests.sh.in
modified:   src/bin/dhcp6/json_config_parser.cc
modified:   src/bin/dhcp6/tests/dhcp6_process_tests.sh.in
modified:   src/hooks/dhcp/forensic_log/libloadtests/load_unload_unittests.cc
modified:   src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
modified:   src/lib/hooks/hooks_parser.cc
modified:   src/lib/process/log_parser.cc
modified:   src/lib/process/log_parser.h
modified:   src/lib/testutils/env_var_wrapper.h
modified:   src/lib/util/filesystem.cc
2025-05-16 12:20:44 +03:00
Thomas Markwalder
36972ffcb7
[#3831] Added path validation, updated tests
/src/hooks/dhcp/forensic_log/libloadtests/load_unload_unittests.cc
    Updated tests

/src/hooks/dhcp/forensic_log/rotating_file.cc
    RotatingFile::apply{) - fetch default from singleton

/src/hooks/dhcp/forensic_log/tests/legal_log_mgr_unittests.cc
    TEST_F(LegalLogMgrTest, pathValidation)
    TEST_F(LegalLogMgrTest, pathEnvVarOverride) - new tests

/src/lib/dhcpsrv/legal_log_mgr.*
    LegalLogMgr::parseFile() - validate path

Updated the ARM.
2025-05-16 12:20:43 +03:00
Thomas Markwalder
5eee7d180e
[#3831] Initial pieces for legal log restriction
/src/lib/dhcpsrv/Makefile.am
   Changed LEGAL_LOG_DIR to use log vs lib

/src/lib/dhcpsrv/legal_log_mgr.*
    LegalLogMgr - added PathChecker singleton and funcs

/src/lib/dhcpsrv/meson.build
   Defined LEGAL_LOG_DIR

/src/lib/util/filesystem.*
    PathChecker::validateDirectory() - new func

/src/lib/util/tests/filesystem_unittests.cc
    TEST(PathChecker, validateDirectoryEnforcePath)
    TEST(PathChecker, validateDirectoryEnforcePathFalse) - new tests
2025-05-16 12:20:43 +03:00
Thomas Markwalder
0a61f4a9ee
[#3831] leaseX-write restricted to supported path
modified:   hooks-lease-cmds.rst
modified:   ../../../src/hooks/dhcp/lease_cmds/lease_cmds.cc
modified:   ../../../src/hooks/dhcp/lease_cmds/libloadtests/lease_cmds4_unittest.cc
modified:   ../../../src/hooks/dhcp/lease_cmds/libloadtests/lease_cmds6_unittest.cc
2025-05-16 12:20:43 +03:00