Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icinga DB: Config no_user_modify and Support Redis username authentication #10102

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

oxzi
Copy link
Member

@oxzi oxzi commented Jul 30, 2024

Icinga DB: Config no_user_modify

Each configuration field of an IcingaDB Object was marked with no_user_modify as modifications via the API would not result in an actual change. While the Object would be updated, the internal Redis connection would not be restarted, resulting in an unexpected behavior.

The missing db_index was added to the documentation.

Icinga DB: Support Redis username authentication

The Redis ACL system was introduced with Redis 6.0. It introduced users with precisely granular permissions. This change allows Icinga 2 to use the Icinga DB feature against a Redis with an ACL user.

This was reflected in the documentation, next to the already implemented, but undocumented Redis database.

Closes #9536.

@oxzi oxzi added the area/icingadb New backend label Jul 30, 2024
@oxzi oxzi requested a review from julianbrost July 30, 2024 15:00
@cla-bot cla-bot bot added the cla/signed label Jul 30, 2024
@icinga-probot icinga-probot bot added the enhancement New feature or request label Jul 30, 2024
oxzi added a commit that referenced this pull request Jul 31, 2024
As seen in the recent GHA run for #10102, CentOS is now dysfunctional.

> Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=container error was
> 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"

> $ host mirrorlist.centos.org
> Host mirrorlist.centos.org not found: 3(NXDOMAIN)

Since CentOS Linux 7 has reached its end of life at June 30 together
with RHEL7's end of maintenance, there will be no further updates.

https://blog.centos.org/2023/04/end-dates-are-coming-for-centos-stream-8-and-centos-linux-7/
@oxzi oxzi mentioned this pull request Jul 31, 2024
oxzi added a commit that referenced this pull request Jul 31, 2024
As seen in the recent GHA run for #10102, the two Windows Actions have
failed. The output log contains:

> DEBUG:   27+  >>>> ctest.exe -C "${env:CMAKE_BUILD_TYPE}" -T test -O $env:ICINGA2_BUILDPATH/Test.xml
> --output-on-failure --log_level=all
> CMake Error: Unknown argument: --log_level=all
> CMake Error: Run 'ctest --help' for all supported options.

After consulting ctest(1), older versions included, I have never found a
mention of the "--log_level" flag. Since the useful
"--output-on-failure" flag is already set, which will "[o]utput anything
outputted by the test program if the test should fail", I do not see any
further reason for more logging information.

This flag was introduced in 7665143,
but I have not found any reasoning for the flag in particular.
oxzi added a commit that referenced this pull request Jul 31, 2024
As seen in the recent GHA run for #10102, the two Windows Actions have
failed. The output log contains:

> DEBUG:   27+  >>>> ctest.exe -C "${env:CMAKE_BUILD_TYPE}" -T test -O $env:ICINGA2_BUILDPATH/Test.xml
> --output-on-failure --log_level=all
> CMake Error: Unknown argument: --log_level=all
> CMake Error: Run 'ctest --help' for all supported options.

After consulting ctest(1), older versions included, I have never found a
mention of the "--log_level" flag. Since the useful
"--output-on-failure" flag is already set, which will "[o]utput anything
outputted by the test program if the test should fail", I do not see any
further reason for more logging information.

This flag was introduced in 7665143,
but I have not found any reasoning for the flag in particular.
@oxzi
Copy link
Member Author

oxzi commented Jul 31, 2024

Rebased after the last two CI fixes were merged.

Al2Klimov pushed a commit that referenced this pull request Aug 6, 2024
As seen in the recent GHA run for #10102, the two Windows Actions have
failed. The output log contains:

> DEBUG:   27+  >>>> ctest.exe -C "${env:CMAKE_BUILD_TYPE}" -T test -O $env:ICINGA2_BUILDPATH/Test.xml
> --output-on-failure --log_level=all
> CMake Error: Unknown argument: --log_level=all
> CMake Error: Run 'ctest --help' for all supported options.

After consulting ctest(1), older versions included, I have never found a
mention of the "--log_level" flag. Since the useful
"--output-on-failure" flag is already set, which will "[o]utput anything
outputted by the test program if the test should fail", I do not see any
further reason for more logging information.

This flag was introduced in 7665143,
but I have not found any reasoning for the flag in particular.
Al2Klimov pushed a commit that referenced this pull request Aug 6, 2024
As seen in the recent GHA run for #10102, the two Windows Actions have
failed. The output log contains:

> DEBUG:   27+  >>>> ctest.exe -C "${env:CMAKE_BUILD_TYPE}" -T test -O $env:ICINGA2_BUILDPATH/Test.xml
> --output-on-failure --log_level=all
> CMake Error: Unknown argument: --log_level=all
> CMake Error: Run 'ctest --help' for all supported options.

After consulting ctest(1), older versions included, I have never found a
mention of the "--log_level" flag. Since the useful
"--output-on-failure" flag is already set, which will "[o]utput anything
outputted by the test program if the test should fail", I do not see any
further reason for more logging information.

This flag was introduced in 7665143,
but I have not found any reasoning for the flag in particular.
@oxzi oxzi requested a review from Al2Klimov August 26, 2024 10:34
Al2Klimov
Al2Klimov previously approved these changes Aug 26, 2024
lib/icingadb/icingadb.cpp Outdated Show resolved Hide resolved
@oxzi oxzi requested a review from yhabteab September 19, 2024 14:30
@oxzi oxzi changed the title Icinga DB: Support Redis username authentication Icinga DB: Config no_user_modify, Extract ValidateCertPath, and Support Redis username authentication Sep 19, 2024
lib/icingadb/redisconnection.hpp Outdated Show resolved Hide resolved
lib/icingadb/icingadb.cpp Outdated Show resolved Hide resolved
yhabteab
yhabteab previously approved these changes Sep 24, 2024
@yhabteab yhabteab added this to the 2.15.0 milestone Sep 24, 2024
lib/icingadb/icingadb.ti Show resolved Hide resolved
lib/icingadb/icingadb.cpp Outdated Show resolved Hide resolved
lib/icingadb/icingadb.cpp Outdated Show resolved Hide resolved
@oxzi oxzi changed the title Icinga DB: Config no_user_modify, Extract ValidateCertPath, and Support Redis username authentication Icinga DB: Config no_user_modify and Support Redis username authentication Oct 4, 2024
@Al2Klimov Al2Klimov self-requested a review October 23, 2024 11:04
lib/icingadb/icingadb.cpp Outdated Show resolved Hide resolved
Each configuration field of an IcingaDB Object was marked with
no_user_modify as modifications via the API would not result in an
actual change. While the Object would be updated, the internal Redis
connection would not be restarted, resulting in an unexpected behavior.

The missing db_index was added to the documentation.
The Redis ACL system was introduced with Redis 6.0. It introduced users
with precisely granular permissions. This change allows Icinga 2 to use
the Icinga DB feature against a Redis with an ACL user.

This was reflected in the documentation, next to the already
implemented, but undocumented Redis database.

Closes #9536.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/icingadb New backend cla/signed enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redis username support for icingadb feature
4 participants