55 Commits

Author SHA1 Message Date
Alexander A. Klimov
bcbb1aee52 FilterUtility::GetFilterTargets(): don't run filter for specific object(s) for all objects 2023-12-19 15:19:20 +01:00
Yonas Habteab
c1f73fbc1d FilterUtility: Replace some nested raw pointers by our unique_ptr<X>* 2022-11-28 14:50:54 +01:00
Yonas Habteab
1bb2d65a8d FilterUtility: Outsource permission matching from CheckPermission() to a separate method 2022-10-10 12:33:33 +02:00
Yonas Habteab
43ba2da39c Replace std/boost::bind() function with lambda expression 2021-03-10 16:29:40 +01:00
Elias Ohm
c10ff9dd72 try without initialization of frame Locals which are not used for permissions filter and as far as I can see also not for query filters 2019-05-02 09:03:30 +02:00
Elias Ohm
53febdea81 use current frame scope for permission filter function calls 2019-05-02 07:35:19 +02:00
Alexander A. Klimov
ba842403ce Fix circular #include
refs #6985
2019-04-25 08:25:28 +02:00
Michael Friedrich
ab97d606db
Merge pull request #7122 from Icinga/bugfix/evaluatefilter-change-globals
FilterUtility::EvaluateFilter(): ensure not to modify the global namespace
2019-04-16 17:40:20 +02:00
Alexander A. Klimov
bdadb53940 FilterUtility::EvaluateFilter(): ensure not to modify the global namespace 2019-04-16 15:53:44 +02:00
Elias Ohm
1e7cd4afc8 * use dedicated permissions namespace for scriptframe in filterutility to allow proper parallel execution
* fixes issue https://github.com/Icinga/icinga2/issues/6785 where permission checks get wrong result because permissions checks are done within a shared namespaces without using only unique keys
  * mitigates issue https://github.com/Icinga/icinga2/issues/6874 where segmentation faults occur because of concurrent access to non threadsafe parts of namespace (a fix for thread safety of namespaces which would be an alternative approach to get rid of these segfaults is out of scope of this fix as 6785 needs to be fixed anyway and this is the straight-forwards) way to fix that
* do the same for eventqueue (not certain whether events can be processed in parallel but I expect it is the case)
2019-04-12 08:10:57 +02:00
Michael Friedrich
d14a88235d Replace Copyright header with a short version, part I
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Michael Friedrich
dab53448bc icinga.com: Update *.{h,c}pp 2018-10-18 09:27:04 +02:00
Michael Friedrich
34de8104b8 Fix regression with API permission filters and namespaces in v2.10
fixes #6682
2018-10-15 15:47:11 +02:00
Michael Friedrich
1f4f6282c7 Fix crash on API queries with Fedora 28 hardening and GCC 8
The actual fix is to handle nullptr references differently
for an empty filter expression. The other changes include
oob checks not necesarily involved.

fixes #6533
2018-09-06 09:56:04 +02:00
Gunnar Beutner
94e6be1a65 Remove unused includes 2018-01-22 09:52:29 +01:00
Gunnar Beutner
becfa85094 Apply clang-tidy fix 'modernize-use-emplace' 2018-01-04 12:24:57 +01:00
Gunnar Beutner
e3ad0be769 Apply clang-tidy fix 'modernize-use-auto' 2018-01-04 12:24:57 +01:00
Gunnar Beutner
abe3f8a959 Build fix for Debian wheezy 2018-01-03 10:32:33 +01:00
Michael Insel
158ae2188e Change copyright header for 2018 2018-01-02 12:08:55 +01:00
Jean Flach
2636e6a77a Whitespace fix
What does this change?
* Remove use of spaces for formatting
These could be found by using `grep -r -l -P '^\t+ +[^*]'
* Removal of training whitespaces
* A few lines longer than 120 chars
2017-12-20 14:53:52 +01:00
Gunnar Beutner
ab8386cf5c Use std::unique_ptr for Expression objects 2017-12-15 10:44:54 +01:00
Gunnar Beutner
1ad83886ac Replace a few more NULLs with nullptr 2017-12-14 15:37:20 +01:00
Gunnar Beutner
96e214221d Remove unused variables 2017-12-14 08:50:09 +01:00
Gunnar Beutner
325e4a2fb9 Use nullptr instead of <Type>::Ptr() 2017-11-30 17:47:09 +01:00
Gunnar Beutner
3c60fbf75d Use std::vector::emplace_back instead of std::vector::push_back 2017-11-30 17:47:09 +01:00
Gunnar Beutner
9ce950b0f1 Replace boost::ref/boost::cref with std::ref/std::cref 2017-11-30 17:47:09 +01:00
Gunnar Beutner
858873b940 Replace boost::bind/boost::function with std::bind/std::function 2017-11-27 15:15:11 +01:00
Michael Friedrich
905f208332 Log a warning for missing API permissions
fixes #4945
2017-02-08 17:05:53 +01:00
Michael Friedrich
b7caf0820d Ensure that *.icinga.com is used everywhere
fixes #13897
fixes #13277
2017-01-10 17:19:12 +01:00
Gunnar Beutner
288413f046 Replace BOOST_FOREACH with range-based for loops
fixes #12538
2016-08-25 06:46:17 +02:00
Gunnar Beutner
b7a1b58069 Improve performance for type lookups
fixes #12448
2016-08-16 11:02:33 +02:00
Gunnar Beutner
afc1b9bdc5 Move type variables into the 'Types' namespace
refs #12408
2016-08-12 17:05:19 +02:00
Gunnar Beutner
28dee2b79b Improve filter support for /v1/templates
refs #11941
2016-06-16 08:38:15 +02:00
Gunnar Beutner
9e29a3f8a0 Fix default behavior when none of the specified objects pass the user's permission filter
fixes #11926
2016-06-13 10:14:10 +02:00
Gunnar Beutner
de1b70cf44 Fix incorrect variable names for joined fields in filter expressions
fixes #11779
2016-05-12 10:24:15 +02:00
Gunnar Beutner
599929b0f6 Update copyright headers for 2016 2016-01-12 08:29:59 +01:00
Gunnar Beutner
2c135d82c1 Fix incorrect variable names for joined objects in filters
fixes #10558
2015-11-07 10:28:34 +01:00
Gunnar Beutner
b89a7dbdb6 Rename 'object' to 'obj' in filters
refs #9077
2015-11-07 10:01:07 +01:00
Gunnar Beutner
64376dafeb Make the main object available as 'object' in filter expressions
refs #9077
2015-11-07 09:59:00 +01:00
Michael Friedrich
286538c17e Implement api event streams
Documentation is not yet complete.

refs #9078
2015-10-21 15:34:26 +02:00
Gunnar Beutner
21a2986635 Avoid evaluating unnecessary filters
refs #10360
2015-10-14 16:52:01 +02:00
Gunnar Beutner
f3fdcb0f6b Fix: /v1/objects/<type> returns an HTTP error when there are no objects of that type
fixes #10253
2015-09-30 13:26:19 +02:00
Gunnar Beutner
8a2c7a055d Remove debug code
refs #9077
2015-09-29 06:48:16 +02:00
Gunnar Beutner
425a1a0166 Implement API permissions
fixes #9088
2015-09-28 14:30:46 +02:00
Jean-Marcel Flach
5ef4204d06 Improve API error handling and fix some whitespace
fixes #10194
2015-09-25 13:57:28 +02:00
Gunnar Beutner
1a6b41787a Implement joins for status queries
fixes #10060
2015-09-22 09:45:23 +02:00
Gunnar Beutner
9d9a7ca73d Fix filtering by name
fixes #10027
2015-08-28 10:52:59 +02:00
Gunnar Beutner
06f02f8b10 Implement reflection support for the API
fixes #9076
2015-08-26 10:58:59 +02:00
Gunnar Beutner
1f63bcb1b3 Remove unused argument 'async'
refs #9972
2015-08-26 06:57:24 +02:00
Gunnar Beutner
147f69a8f6 Implement support for filter_vars
fixes #9940
2015-08-18 06:47:07 +02:00