4072 Commits

Author SHA1 Message Date
Jean Flach
a742e64e4d Fix reload handling
Make sure we have written the new PID before letting it take over.
2018-03-14 10:43:59 +01:00
Gunnar Beutner
9b0fccfd80
Merge pull request #6153 from Icinga/fix/api-no-packages
Improve error handling for empty packages in /v1/config/packages
2018-03-13 09:23:01 +01:00
Michael Insel
592d1c7d7e Replace std::vector:push_back with initializer list
This replaces a few std::vector::push_back calls with initializer lists.
2018-03-12 20:35:49 +01:00
Michael Friedrich
429f518b49 Improve error handling for empty packages in /v1/config/packages
- If there is no package main directory, assume "empty packages".
- Catch exceptions thrown through GlobRecursive() and present a better http 500
to the user.

The packages directory tree is automatically created with the first
package creation, either from the user, or by the `_api` package.

fixes #6129
2018-03-07 13:35:09 +01:00
Gunnar Beutner
9cd5298d8b Ensure that SetCorked() works properly 2018-03-06 09:03:35 +01:00
Gunnar Beutner
b172a67867 Fix incorrect argument type for JsonRpc::SendMessage 2018-03-06 08:58:19 +01:00
Gunnar Beutner
9b72a6c2f3
Merge pull request #6135 from Icinga/fix/limit-api-package-size
Limit JSON RPC message size
2018-03-05 13:24:09 +01:00
Jean Flach
1bdd14b428 Limit anonymous connections to 25 2018-03-05 13:22:43 +01:00
Noah Hilverling
54ff60cd8c Limit JSON-RPC message size 2018-03-05 10:29:05 +01:00
Noah Hilverling
d0a97ddf64 Add counter for current concurrent checks to Icinga check
fixes #4939
2018-03-01 15:01:55 +01:00
Gunnar Beutner
d23c03bfa5
Merge pull request #6134 from gunnarbeutner/fix/incorrect-content-length-limits
Fix incorrect HTTP content length limits
2018-02-28 14:16:15 +01:00
Gunnar Beutner
a3bf8cd26e
Merge pull request #6133 from Icinga/fix/cork-socket
Limit the number of HTTP/JSON-RPC requests we read in parallel
2018-02-28 12:48:06 +01:00
Gunnar Beutner
45c2803f3e Fix incorrect HTTP content length limits 2018-02-28 12:28:02 +01:00
Gunnar Beutner
a9fb714578
Merge pull request #6116 from Icinga/fix/windows-service-restart
Fix Windows reload
2018-02-28 12:23:53 +01:00
Gunnar Beutner
c1837ea90b
Merge pull request #6131 from Icinga/feature/log-master-ticket-invalid
Log which ticket was invalid on the master
2018-02-28 12:22:34 +01:00
Gunnar Beutner
6848af50ff Add SetCorked() calls to the JsonRpcConnection class 2018-02-28 11:42:05 +01:00
Jean Flach
d0cf7c654e Use cork in tlsstream and HTTP connection 2018-02-28 11:40:58 +01:00
Jean Flach
7d103aaf1b Add cork 2018-02-28 11:40:58 +01:00
Gunnar Beutner
a4a73fa67c Fix null ptr dereference in HttpServerConnection::ProcessMessageAsync 2018-02-28 11:07:19 +01:00
Gunnar Beutner
6d01808adf Fix incorrect return value 2018-02-28 10:50:33 +01:00
Michael Friedrich
ad31e0d118 Log which ticket was invalid on the master
This helps debugging a lot, especially to reproduce the issue
why the ticket is invalid.
2018-02-28 10:18:29 +01:00
Jean Flach
01c7f20170 Require systemd headers
Only mandatory if using systemd
2018-02-27 15:54:58 +01:00
Gunnar Beutner
98bcca5e17
Merge pull request #6050 from gunnarbeutner/feature/remove-boost-split
Replace boost::algorithm::split calls with String::Split
2018-02-26 08:37:46 +01:00
Gunnar Beutner
5dd0bc8f97 Use std::vector<std::string> for command-line arguments 2018-02-26 08:36:11 +01:00
Michael
a0aa781417 Implement ability to make global zones configurable
This adds the ability to make global zones configurable during the node
wizard/setup. The implementation will add the given global zones to the default
included global zones.
2018-02-26 08:36:11 +01:00
Gunnar Beutner
ef488a3ebc Replace boost::algorithm::split calls with String::Split 2018-02-26 08:27:18 +01:00
Jean Flach
691e3cfd57 Fix Windows reload 2018-02-23 17:01:46 +01:00
Jean Flach
ef5e7e8510 Fix incorrect size of request limits
refs #6103
2018-02-23 14:29:18 +01:00
Jean Flach
6bb2ed4258 Merge branch 'feature/security-features' 2018-02-21 16:19:54 +01:00
Jean Flach
184580f705
Merge pull request #6103 from Icinga/fix/http-security-fixes
HTTP Security fixes
2018-02-21 15:04:02 +01:00
Jean Flach
85f45d9b94 Minor codestyle and doc changes 2018-02-21 14:52:44 +01:00
Jean Flach
eda9bce8cb
Merge pull request #6104 from Icinga/fix/nullptr-deref
Fix nullptr dereferences
2018-02-21 13:56:09 +01:00
Jean Flach
a71ab1e126 Rename macro RequireNotNull to REQUIRE_NOT_NULL 2018-02-21 13:47:46 +01:00
Noah Hilverling
64ffe4f840 Fix nullptr posibility in ProcessEvent 2018-02-21 13:47:46 +01:00
Noah Hilverling
948333225d Fix nullptr deref in cluster events 2018-02-21 13:47:46 +01:00
Noah Hilverling
6bebdf8a87 Add marco RequireNotNull
This is used to fix a number of possible nullptr dereferences
2018-02-21 13:47:46 +01:00
Jean Flach
c8c193a9d8 Remove need for RunAsUser/Group
They are now read form the sysconfig file which is owned by root
2018-02-20 14:16:43 +01:00
Jean Flach
6ae376b7fd Add cli tool to send signals as Icinga user
fixes #5991
2018-02-20 14:16:43 +01:00
Noah Hilverling
2823ebb831 Limit HTTP body size 2018-02-20 13:32:04 +01:00
Noah Hilverling
817415f6a5 Fix requests not being closed correctly 2018-02-20 13:32:04 +01:00
Jean Flach
8ffa4f04a7 Add timeout for TLS handshakes 2018-02-20 13:32:04 +01:00
Jean Flach
ee5954726d Authenticate API user before parsing body 2018-02-20 13:32:04 +01:00
Jean Flach
73b85bcccb Only read body from authenticated connections
This means we are not allowing unauthenticated requests anymore
2018-02-20 13:32:04 +01:00
Jean Flach
81c4004894 Fix nullptr deref 2018-02-20 13:32:04 +01:00
Gunnar Beutner
a9f2a8de19 Add HTTP Header size limits 2018-02-20 13:32:04 +01:00
Gunnar Beutner
2789d1a859 Add validation for HTTP connection sizes 2018-02-20 13:32:04 +01:00
Jean Flach
54384528ed Fix crash in api user command 2018-02-20 09:45:55 +01:00
Gunnar Beutner
8a8d42b154 Remove redundant 'this->' 2018-02-19 08:08:16 +01:00
Jean Flach
0a0795f09d Code style 2018-02-16 11:47:13 +01:00
Gunnar Beutner
6e3347b5bf Remove debug output in ApiUserCommand::Run 2018-02-16 11:46:43 +01:00