Commit Graph

509 Commits

Author SHA1 Message Date
Jean Flach 2e5aedd28a Fix crash when using incorrectly formatted password hash 2018-02-23 13:07:55 +01:00
Jean Flach 6387f5442e Move new password functions into tlsutility 2018-02-23 13:06:22 +01:00
Jean Flach 6504606e23 Hash API password and comparison
fixes #4920
2018-02-23 11:23:19 +01:00
Jean Flach adc054097d Build/Merge fixes 2018-02-23 10:27:55 +01:00
Jean Flach c5b92defec Minor codestyle and doc changes 2018-02-23 10:09:28 +01:00
Noah Hilverling 4b77afedcd Limit HTTP body size 2018-02-23 10:09:28 +01:00
Noah Hilverling 3fe818b44b Fix requests not being closed correctly 2018-02-23 10:09:28 +01:00
Jean Flach 70c81734c5 Add timeout for TLS handshakes 2018-02-23 10:09:26 +01:00
Jean Flach aa1ccd7ada Authenticate API user before parsing body 2018-02-23 10:08:24 +01:00
Jean Flach a46dc64e6a Only read body from authenticated connections
This means we are not allowing unauthenticated requests anymore
2018-02-23 09:52:54 +01:00
Jean Flach e1c46cedd1 Fix nullptr deref 2018-02-23 08:34:10 +01:00
Gunnar Beutner f5f8b90ec8 Add HTTP Header size limits 2018-02-23 08:31:28 +01:00
Gunnar Beutner 0339a2b827 Add validation for HTTP connection sizes 2018-02-23 08:31:28 +01:00
Noah Hilverling 71c420d501 Fix nullptr deref in cluster events 2018-02-22 14:55:44 +01:00
Noah Hilverling 157358c24f Fix HTTP response parsing for HTTP 1.1
refs #5987
2018-01-17 15:02:33 +01:00
Gunnar Beutner 680939a289 Fix incorrect socket handling for the HTTP client 2018-01-17 15:02:33 +01:00
Michael Friedrich c3fe1a6323 Revert "Fix incorrect socket handling for the HTTP client"
This reverts commit 59da943548.

refs #5760
2018-01-16 10:44:31 +01:00
Gunnar Beutner 59da943548 Fix incorrect socket handling for the HTTP client 2017-12-12 11:18:09 +01:00
Michael Friedrich 5b231147fe Silence UpdateRepository message errors
Mixed setups with 2.8 and 2.7 will log this error every time
a new message is received. While this is truly an error,
it just fills the log to infinity. Should be used for debug only.

fixes #5776

refs #5804
2017-11-28 11:27:39 +01:00
Gunnar Beutner a18fbcb27a Fix missing variable name which can lead to segfaults
refs #5808
refs #5807

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-11-28 11:14:32 +01:00
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 287f72b0a0.
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