589 Commits

Author SHA1 Message Date
Gunnar Beutner
2bbb5366fd Merge pull request #5620 from Icinga/fix/api-staging-3668
WIP: Ensure that the REST API config package/stage creation is atomic
2017-10-24 12:51:09 +02:00
Gunnar Beutner
f2d437e96c Implement support for migrating certificates to /var/lib/icinga2/certs
This commit includes documentation too.

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-10-20 14:06:02 +02:00
Jean Flach
aad96d6b09 Improve error message for unknow functions
refs #5686
2017-10-18 11:25:38 +02:00
Michael Friedrich
77ecdbd85c Merge pull request #5581 from Icinga/fix/api-crash-race-condition
Fix possible race condition in ApiListener locking
2017-10-12 13:40:59 +02:00
Michael Friedrich
a521f49803 Fix debug builds on Apple Clang 9.0.0 (macOS High Sierra) 2017-10-02 13:49:42 +02:00
Gunnar Beutner
92727d13c7 Fix a build warning
refs #5443
2017-09-25 12:15:59 +02:00
Michael Friedrich
953d840cc1 Fix certificate paths for installers
refs #5450
2017-09-22 15:00:45 +02:00
Michael Friedrich
601c10b997 Remove bottom-up CLI commands
refs #4799
2017-09-22 14:04:43 +02:00
Jean Flach
79166a31d4 Revert "Add Log Warning in case active-stage is empty"
This reverts commit 287f72b0a0ee76e1ef5052969677c5bbc672d65b.
2017-09-21 13:54:29 +02:00
Jean Flach
287f72b0a0 Add Log Warning in case active-stage is empty
Maybe Critical instead? Throwing an exception seems unnecessary.

refs #3668
2017-09-20 17:57:14 +02:00
Jean Flach
ef5013b903 Use locks in api config staging
refs #3668
2017-09-20 16:45:09 +02:00
ryanohnemus
1cb39994a5 API: Add optional reload parameter to config stage upload
You can now specify a boolean `reload` attribute that
will allow you to skip the icinga2 reload after config
validation. By default this is set to true.

The response text has been updated to show if icinga2
will reload or if it was requested to be skipped.

fixes #4769
2017-09-20 14:16:55 +02:00
Michael Friedrich
7bdeeeadcf Silence log level for configuration file updates
This only helps with debugging the configuration sync, but seems
to be highlighted quite often in default configurations (where
the timestamp is equal).

refs #5566
2017-09-20 13:30:02 +02:00
Noah Hilverling
94fe1b2292 HttpServerConnection: Implement CORS support
fixes #4326
2017-09-20 13:18:29 +02:00
Michael Friedrich
9948bee51c Fix API crash with race condition on locks
This was split from #5416 and #5419.

More patches from #5419 are pending.

refs #5419
refs #5418
refs #5416

refs #5408
refs #5148
refs #5007
refs #4968
refs #4910
2017-09-18 15:25:29 +02:00
Gunnar Beutner
80421e4619 Build fix for OpenSSL < 1.0.2
refs #5450
2017-09-12 13:09:16 +02:00
Michael Friedrich
578dcbe861 Add some more verbose logging details
refs #5450
2017-09-12 12:52:50 +02:00
Michael Friedrich
501ade374c Remove debug logging, fix ticket path, enhance logging
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
88e57f7fd4 Implement support for cleaning up certificate requests
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
2fec16952d Remove unused code
refs #5450
2017-09-12 12:52:49 +02:00
Michael Friedrich
181b91b759 Enhance logging for certificate requests
Examples:
https://github.com/Icinga/icinga2/issues/5450#issuecomment-327479874

This also adds code comments where applicable.

refs #5450
2017-09-12 12:52:49 +02:00
Michael Friedrich
ce88e89cc0 Fix wrong cert path for CLI commands
refs #5450
2017-09-12 12:52:49 +02:00
Michael Friedrich
8040bda2e1 Change directory layout to /var/lib/icinga2/{ca,certs,certificate_requests}
refs #5450
2017-09-12 12:52:49 +02:00
Michael Friedrich
88b4a54e6b Fix ticket hash calculation for indirectly connected clients
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
c02742925e Refactor PkiUtility class
refs #5450
2017-09-12 12:52:49 +02:00
Michael Friedrich
1e7860f2b1 Implement ApiListener::Get*Dir() functions
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
6a533796e5 Update output format for the new CLI commands
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
774936bfe8 Implement support for pki::UpdateCertificate messages
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
623208d617 Implement support for forwarding certificate requests
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
03f5ccd252 Implement support for cleaning up expired API callbacks
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
cc43dc734b Refuse to sign certificate if it already has the correct chain and doesn’t expire soon
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
440f848c7c Improve error handling for JSON-RPC calls
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
a8cc0a601b Add missing _unlink() calls for Windows
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
cb49ac1264 Delete ticket file once we have a signed certificate
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
4cfbf6eb17 Disconnect all clients when we update our own certificate
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
439251532e Implement support for saving client tickets
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
192502f9e5 Implement support for reloading SSL certificates without a restart
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
0ec07bce51 Implement support for updating client certificates
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
a4684d1bfd Implement support for sending pki::RequestCertificate messages in the cluster
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
510e2d622a Implement support for ticket-less certificate requests
refs #5450
2017-09-12 12:52:49 +02:00
Michael Friedrich
344b047ea0 Move Base64 class into libbase
refs #5538
2017-09-12 12:52:49 +02:00
Michael Friedrich
9e17ff874b Logs: Change config sync update to highlight an information, not an error
fixes #5484
2017-09-12 12:52:49 +02:00
Gunnar Beutner
b316de8aea Implement additional logging for the JsonRpc class 2017-09-12 12:52:49 +02:00
Jean Flach
de51966f52 Don't sent scheme and hostname in request 2017-09-06 16:01:02 +02:00
Michael Friedrich
873a553a4f Enhance client connect/sync logging and include bytes/zone in logs
refs #5513
2017-08-21 11:31:24 +02:00
Stefar77
6b66e332fb API: Fix requested attrs/joins/meta type errors in object query response
fixes #5377

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-08-11 16:23:29 +02:00
Jean Flach
39c24e9ec9 Add check_nscp_api plugin for NSClient++ API checks
refs #4721
2017-06-13 21:17:16 +02:00
Gunnar Beutner
1fd2695e02 Fix compiler warnings
refs #5287
2017-05-29 09:13:19 +02:00
Michael Friedrich
d0dcb8a658 ApiListener: Handle zero JSON-RPC WQs gracefully for stats
refs #5266
refs #5133
2017-05-26 17:02:36 +02:00
Michael Friedrich
d366a63510 Add API & Cluster stats to /v1/status & icinga check performance metrics
refs #5133
2017-05-24 16:21:05 +02:00