Commit Graph

553 Commits

Author SHA1 Message Date
Gunnar Beutner f43516a097 Implement the --verbose option for "node wizard"
refs 
2017-09-12 12:52:49 +02:00
Michael Friedrich e424017c15 Refactor the node wizard/setup CLI commands
refs 
2017-09-12 12:52:49 +02:00
Michael Friedrich ce88e89cc0 Fix wrong cert path for CLI commands
refs 
2017-09-12 12:52:49 +02:00
Gunnar Beutner a7fe6467ba Improve log messages for the 'pki save-cert' command
refs 
2017-09-12 12:52:49 +02:00
Michael Friedrich 8040bda2e1 Change directory layout to /var/lib/icinga2/{ca,certs,certificate_requests}
refs 
2017-09-12 12:52:49 +02:00
Gunnar Beutner c02742925e Refactor PkiUtility class
refs 
2017-09-12 12:52:49 +02:00
Michael Friedrich 1e7860f2b1 Implement ApiListener::Get*Dir() functions
refs 
2017-09-12 12:52:49 +02:00
Gunnar Beutner 6a533796e5 Update output format for the new CLI commands
refs 
2017-09-12 12:52:49 +02:00
Gunnar Beutner 774936bfe8 Implement support for pki::UpdateCertificate messages
refs 
2017-09-12 12:52:49 +02:00
Gunnar Beutner 439251532e Implement support for saving client tickets
refs 
2017-09-12 12:52:49 +02:00
Gunnar Beutner cdff792c11 Make the ticket optional in 'icinga2 node wizard'
refs 
2017-09-12 12:52:49 +02:00
Gunnar Beutner 8d05fc99c9 Improve message formatting for the 'icinga2 node wizard' command
refs 
2017-09-12 12:52:49 +02:00
Gunnar Beutner a4684d1bfd Implement support for sending pki::RequestCertificate messages in the cluster
refs 
2017-09-12 12:52:49 +02:00
Gunnar Beutner b08f5477dc Change PKI path from /etc/icinga2/pki to /var/lib/icinga2/pki
refs 
2017-09-12 12:52:49 +02:00
Gunnar Beutner abdd4b307b Implement the 'ca list' and 'ca sign' CLI commands
refs 
2017-09-12 12:52:49 +02:00
Gunnar Beutner 510e2d622a Implement support for ticket-less certificate requests
refs 
2017-09-12 12:52:49 +02:00
Gunnar Beutner 4d943c7f5c Implement additional functions for printing values with LLDB/GDB 2017-08-10 08:26:22 +02:00
Michael I 3e54e34147 Update featurelistcommand.cpp
refs 
2017-07-25 13:35:20 +02:00
mcktr 53908b7080 Fixed missing closing bracket in CLI command pki new-cert. 2017-06-18 15:13:16 +02:00
Gunnar Beutner d05b7c4178 Allow expressions for the type in object/template declarations 2017-05-11 14:21:30 +02:00
Gunnar Beutner 4134f7fe42 Make sure modified attributes are applied before calling the objects' Start method
refs 
2017-05-03 12:02:19 +02:00
Benedikt Heine 9337135249 Give only CLI warnings if feature is already disabled
refs 
refs 

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-02-02 14:17:47 +01:00
Michael Friedrich 763fb64fff Update issue tracker to GitHub
fixes 
2017-01-17 16:50:22 +01:00
Michael Friedrich b7caf0820d Ensure that *.icinga.com is used everywhere
fixes 
fixes 
2017-01-10 17:19:12 +01:00
Michael Friedrich c036bfaa94 Fix wrong help string in node setup CLI command
fixes 
2016-12-06 11:22:24 +01:00
Michael Friedrich dc2992443f Deprecate the client 'bottom up' mode w/ node update-config
This includes deprecation warnings and migration documentation.

fixes 
2016-11-23 15:33:28 +01:00
Konstantin Kelemen a2a6ee82d7 Fix some spelling mistakes
fixes 

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-09-29 08:27:38 +02:00
Gunnar Beutner fa1fa23c55 Fix crash in NodeUtility::CollectNodes
fixes 
2016-09-19 06:34:37 +02:00
Gunnar Beutner a2e70955e1 Fix command line parser for "icinga2 --version"
fixes 
2016-09-04 17:01:46 +02:00
Gunnar Beutner 5304b08c2d Improve error handling for invalid CLI commands
fixes 
2016-09-01 07:41:23 +02:00
Gunnar Beutner 06cb3cf875 Another build fix for Windows
refs 
2016-08-31 13:43:50 +02:00
Gunnar Beutner 68dceaab06 Replace boost::exception_ptr with std::exception_ptr
refs 
2016-08-30 20:46:23 +02:00
Gunnar Beutner 69bb90403d Add missing default import AST node for the application object
refs 
2016-08-28 11:00:27 +02:00
Gunnar Beutner e8b0797ec4 Use 'auto' keyword for iterator declarations (part 2)
refs 
2016-08-27 19:56:12 +02:00
Gunnar Beutner b5b09216c6 Use lambda functions for INITIALIZE_ONCE
fixes 
2016-08-27 09:48:36 +02:00
Gunnar Beutner 5058c5d75b Use 'auto' for iterator declarations
fixes 
2016-08-27 08:37:19 +02:00
Gunnar Beutner 1236495dd3 Implement the --file and --syntax-only options for "icinga2 console"
fixes 
fixes 
2016-08-25 19:14:54 +02:00
Gunnar Beutner 30762e5330 Set versions for all internal libraries
fixes 
2016-08-25 17:56:18 +02:00
Gunnar Beutner 8ed21fcdad Fix compiler warning in dbg_eval
refs 
2016-08-25 06:46:24 +02:00
Gunnar Beutner 288413f046 Replace BOOST_FOREACH with range-based for loops
fixes 
2016-08-25 06:46:17 +02:00
Gunnar Beutner 429d11daa8 Fix compiler warnings
fixes 
2016-08-24 20:33:34 +02:00
Gunnar Beutner ae1ab5f865 Implement unit tests for state changes
fixes 
2016-08-24 19:45:52 +02:00
Rune Darrud d1dc1188e1 Remove obsolete reference to serial.txt
fixes 

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2016-08-17 16:19:24 +02:00
Gunnar Beutner ec87b9e795 Use hash-based serial numbers for new certificates
fixes 
2016-08-16 15:03:01 +02:00
Michael Friedrich 186fcb3724 Fix log message for WriteCert()
refs 
2016-08-14 09:28:55 +02:00
Michael Friedrich a83d81a71d Fix that pki sign-csr is not logging the certificate file location
fixes 
2016-08-14 09:22:18 +02:00
Gunnar Beutner 76ed38fbfe Implement support for inspecting variables with LLDB/GDB
fixes 
2016-08-12 11:00:19 +02:00
Gunnar Beutner f3bb628d6e Improve logging for the WorkQueue class
fixes 
2016-08-09 12:39:07 +02:00
Gunnar Beutner 26821d1a79 Don't add empty lines to libedit's history
refs 
2016-08-08 08:01:52 +02:00
Gunnar Beutner 46f8c7eb59 Remove temporary icinga2.debug file in case the config validation fails
fixes 
2016-08-05 09:15:17 +02:00
Markus Frosch d0183edc51 Fix build with OpenSSL 1.1
error: cannot convert ‘const boost::shared_ptr<x509_st>’ to ‘X509* {aka
x509_st*}’ for argument ‘1’ to ‘ASN1_TIME* X509_get_notBefore(X509*)’

refs 
2016-08-01 09:54:51 +02:00
Gunnar Beutner aaa4878017 Don't write empty lines to the history file
refs 
2016-07-29 13:55:07 +02:00
Gunnar Beutner a02d7d7502 Implement history support for 'icinga2 console'
fixes 
2016-07-29 13:45:16 +02:00
Michael Friedrich 915ebe17cd ConfigCompiler should not log included files by default
fixes 
2016-07-05 15:43:48 +02:00
Michael Friedrich 8b742e841f Ensure that obsolete comment/downtime objects are deleted after activating objects
Config validation shouldn't be able to purge the files, only on
restart.

fixes 
2016-06-06 13:07:49 +02:00
Gunnar Beutner 0bc139af93 Improve timing behavior for UpdateObjectAuthority calls
refs 
2016-05-11 13:04:39 +02:00
Gunnar Beutner fc1168ed3e Only activate HARunOnce objects once there's a cluster connection
fixes 
2016-05-11 12:50:40 +02:00
Michael Friedrich 2faf121ff4 Remove commentsand downtimes with reference to deleted checkable objects
Silence the warning message and change the log level to notice as well.

fixes 
2016-05-03 11:30:02 +02:00
Gunnar Beutner c54de4b615 Implement SNI support for the CLI commands
fixes 
2016-04-21 15:44:51 +02:00
Gunnar Beutner 112f024810 Build fix for GCC
refs 
2016-03-29 14:52:48 +02:00
Gunnar Beutner 0e18acbf9d Don't use semi-colons in auto-generated config files
fixes 
2016-03-23 09:29:27 +01:00
Gunnar Beutner 4066ab730a Fix error handling for FeatureUtility::GetFeatures
fixes 
2016-03-14 08:45:12 +01:00
Michael Friedrich 4746b214d6 Fix: Common name in node wizard isn't case sensitive
fixes 
2016-03-11 14:22:24 +01:00
Michael Friedrich 894aaaecb1 Ensure that config files are readable by the daemon
refs 
refs 
2016-02-24 14:24:08 +01:00
Michael Friedrich 47c5425137 Fix permissions for temporary files
fixes 
fixes 
2016-02-24 11:00:44 +01:00
Michael Friedrich 272d9541be Fix wrong log message in 'node setup' cli command
fixes 
2016-02-23 16:55:45 +01:00
Michael Friedrich 4cb5b97e52 Fix unique creation of temp files
fixes 
2016-02-23 12:30:59 +01:00
Gunnar Beutner 74d1d68893 Fix: "node setup" tries to chown() files before they're created
fixes 
2016-02-23 08:42:05 +01:00
Jean Flach 58a31e8166 Use ConfigWriter class in repositoryutility.cpp
refs 
2016-02-09 15:59:19 +01:00
Jean Flach fa1d633484 Rephrase some log messages
refs 
2016-02-09 15:59:19 +01:00
Jean Flach 4d87c96d06 Refactor String-Escape in repositoryutility
fixes 
2016-02-09 09:38:12 +01:00
Gunnar Beutner fa7d0448f9 Decode cluster messages in the WorkQueue threads
refs 
2016-01-27 16:52:01 +01:00
Michael Friedrich ddc1b251a6 Fix: Escaped sequences not properly generated with 'node update-config'
fixes 
2016-01-21 18:14:53 +01:00
Gunnar Beutner 599929b0f6 Update copyright headers for 2016 2016-01-12 08:29:59 +01:00
Michael Friedrich 79899d726a Change log level for authoritative zone config includes
LogWarning will make users wonder about a problem each time
Icinga 2 starts.

refs 
2015-12-18 11:53:56 +01:00
Michael Friedrich af3458dfec Fix that "repository add" writes invalid "type" attribute
fixes 
2015-12-17 10:20:41 +01:00
Michael Friedrich 8b6d3350b8 Fix failed reload via systemd
fixes 
2015-12-16 15:57:59 +01:00
Michael Friedrich 8055f05d5e Fix cluster config sync for (non-)authoritative configs
Details: https://dev.icinga.org/issues/10819#note-39

refs 
2015-12-12 12:16:00 +01:00
Gunnar Beutner eb4f68f28d Remove the local zone name question in node wizard
fixes 
2015-11-30 08:25:37 +01:00
Jean Flach 6a83703549 Update default port behaviour in node wizard
fixes 
2015-11-27 16:44:57 +01:00
Jean Flach 356d11b40d Fix return value in PkiUtility
refs 
2015-11-26 11:19:53 +01:00
Jean Flach b297e8cfa7 Update node wizard
The wizard now displays basic information on the to-be-imported master
certificate and asks the user for confirmation.

fixes 
2015-11-26 10:09:13 +01:00
Gunnar Beutner 7f9337eee8 Use the NodeName constant in 'api setup'
fixes 
2015-11-26 08:11:02 +01:00
Gunnar Beutner 4169bf013b Hide the --master_zone option in --help because it's not currently implemented
fixes 
2015-11-25 19:00:07 +01:00
Gunnar Beutner b76fee5b98 Use the ZoneName and NodeName constants for 'node setup' and 'node wizard'
refs 
2015-11-25 17:43:12 +01:00
Jean Flach 7029bb3aea Fix master zone name
fixes 
2015-11-24 14:32:07 +01:00
Gunnar Beutner a805936f8f Fix: CLI command 'repository add' doesn't work
fixes 
2015-11-20 15:53:24 +01:00
Gunnar Beutner 3505ca3c16 Fix race condition in the ConfigItem class
fixes 
2015-11-19 19:38:49 +01:00
Michael Friedrich 530c7c7fcc Fix pki new-ca not checking for existing ca files
fixes 
2015-11-19 17:06:41 +01:00
Gunnar Beutner 2d2e7ecdb2 Improve location information for exceptions
fixes 
2015-11-10 17:05:40 +01:00
Gunnar Beutner 679983dd9a Rename $quit to $continue
refs 
2015-11-09 11:08:35 +01:00
Michael Friedrich b7f923dd01 'api setup' must not override existing certificate and api-users.conf file
fixes 
2015-11-08 14:19:06 +01:00
Michael Friedrich 1c8531fc0d Fix: 'api setup' should create a user even when api feature is already enabled
fixes 
2015-11-08 14:06:36 +01:00
Gunnar Beutner 9830ea6ea7 Remove duplicate text in an error message
refs 
2015-11-07 10:31:09 +01:00
Gunnar Beutner dcfc171c61 Improve messages for the debugger
refs 
2015-11-07 10:22:55 +01:00
Gunnar Beutner a6c411c6cb Fix: Autocompletion doesn't work in the debugger
fixes 
2015-11-07 10:17:55 +01:00
Gunnar Beutner 7621870278 Implement a debugger for Icinga scripts
fixes 
2015-11-05 14:29:45 +01:00
Gunnar Beutner 701961b73b Fix the 'type' attribute for the Object class
refs 
2015-11-05 10:29:02 +01:00
Michael Friedrich 5d46f661ea Implement 'console' cli command using the API
fixes 
2015-11-04 16:01:06 +01:00
Gunnar Beutner e3efe208bb Fix spelling mistake in 'node wizard' 2015-10-29 08:14:56 +01:00
Gunnar Beutner 15addb4e7c Use the correct zone name for parent_zone when running 'icinga2 node update-config'
fixes 
2015-10-29 08:14:55 +01:00
Gunnar Beutner dd77863910 Implement Array::ToString and Dictionary::ToString
fixes 
2015-10-26 11:05:24 +01:00
Mhd Sulhan 977d94839b CLI: Hide "Command options" if command is null
Before this commit, if icinga2 command executed without any argument,
the program will print empty "Command options".

While at it, clean the whitespaces.

fixes 

Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
2015-10-26 08:05:09 +01:00
Gunnar Beutner 12015e0eca Clean up the 'api setup' command a bit more
refs 
2015-10-26 07:03:41 +01:00
Gunnar Beutner b72ba2b63a Fix incorrect return value for ApiSetupUtility::SetupMaster
refs 
2015-10-25 19:57:57 +01:00
Gunnar Beutner f31837a6ba Clean up the 'api setup' command
refs 
2015-10-22 16:03:26 +02:00
Gunnar Beutner 3c6f0e31d9 Make sure the timer thread is gone when calling fork()
refs 
2015-10-20 23:02:11 +02:00
Jean Flach 6b92c6028b Reword nodeutility output
The old comment had a few minor problems:
* Two spaces after 'named'
* No space between // and the begining of the message
* Incorrect capitalization

And one major:
* Incorrectly calling a zone a node

But all of this is subject to change through the use of the configwriter
anyways.

fixes 
2015-10-20 12:56:26 +02:00
Gunnar Beutner d01f09f3ef Hide internal attributes in the API
fixes 
2015-10-20 08:25:10 +02:00
Gunnar Beutner 2484016c54 Fix crash in RepositoryUtility::AddObject
fixes 
2015-10-13 09:15:06 +02:00
Gunnar Beutner 425a1a0166 Implement API permissions
fixes 
2015-09-28 14:30:46 +02:00
Michael Friedrich 84536da221 Implement global modified attributes for the IcingaApplication class
fixes 
2015-09-23 15:02:53 +02:00
Michael Friedrich f7b5aa33ce Fix a couple of wrong white spaces 2015-09-18 13:04:09 +02:00
Gunnar Beutner 6fa58a520c Implement config object sync
Adds object version.

refs 
2015-09-17 14:20:43 +02:00
Michael Friedrich da83bae660 Rename config/modules to config/packages
fixes 
2015-09-01 20:09:04 +02:00
Michael Friedrich ce99dce3cb Remove unused variable
fixes 
refs 
2015-08-28 17:40:18 +02:00
Jean Flach f1a1dfb26e Update use of String::Trim()
fixes 
2015-08-27 18:06:20 +02:00
Gunnar Beutner 2109944580 Fix: Console auto-completion should take into account parent classes' prototypes
fixes 
2015-08-26 09:02:31 +02:00
Gunnar Beutner 1f63bcb1b3 Remove unused argument 'async'
refs 
2015-08-26 06:57:24 +02:00
Michael Friedrich 7eca257784 Fix return value of Utility::MkDir/MkDirP
None as there are exceptions thrown.

fixes 
2015-08-24 15:11:49 +02:00
Gunnar Beutner 5a72eaa768 Make sure the serial number field is always initialized
fixes 
2015-08-18 15:05:53 +02:00
Gunnar Beutner d8cab2f0e8 Add 'override' keyword to methods
refs 
2015-08-18 12:45:30 +02:00
Michael Friedrich 0f5287c2b1 Add module attribute for ConfigObject and set its origin
fixes 
2015-08-17 16:08:57 +02:00
Gunnar Beutner 071d2f18fb Rename DynamicObject/DynamicType to ConfigObject/ConfigType
fixes 
2015-08-15 20:40:41 +02:00
Gunnar Beutner e2290d5012 Implement support for unregistering objects
refs 
2015-08-15 20:07:11 +02:00
Gunnar Beutner d7d16d3f36 Fix crash in ScriptFrame::~ScriptFrame in debug builds
fixes 
2015-08-11 07:12:49 +02:00
Gunnar Beutner 38d2464ab2 Remove color codes in the console prompt
fixes 
2015-08-11 07:05:55 +02:00
Gunnar Beutner aa00f4183a Get rid of code duplication in ConfigWriter/ConsoleCommand
refs 
2015-08-11 06:47:08 +02:00
Michael Friedrich fc1049fb68 Fix node wizard ignoring local zone name
fixes 
2015-08-03 16:23:59 +02:00
Michael Friedrich 0a1dad0a8f Fix broken cluster config sync w/ latest api changes
Apart from dropping the requirement of adding 'include_zones "etc", "zones.d"'
on upgrade to 2.4, we've forgotten to register the local zone directory into
the new ZoneFragment tree.

This fix adds a new function to register the local zones.d directory.
After that the config sync works again.

fixes 
2015-07-26 17:57:34 +02:00
Michael Friedrich fca7a33aac Implement config file management for the API
refs 

fixes 
fixes 
fixes 

fixes 
2015-07-23 17:57:24 +02:00
Gunnar Beutner ccd63b9d15 Implement the include_zones directive
refs 
2015-07-21 09:32:17 +02:00
Michael Friedrich 84d83a4453 'node wizard/setup' should always generate new certificates
Unless an existing certificate is found. The configuration
(api feature, user) is always generated including a backup.

fixes 
2015-07-08 15:32:47 +02:00
Michael Friedrich f123c8218d Split ApiSetupUtility::SetupMaster() into multiple functions
refs 
2015-07-08 15:32:11 +02:00
Jean-Marcel Flach a98d2f585d Implement URL parser
fixes 
2015-07-07 15:33:19 +02:00
Michael Friedrich f4aeb1999c Cli: Don't add empty host/port endpoint attributes in node wizard
refs 
refs 
2015-07-03 12:58:54 +02:00
Michael Friedrich 2eaae1f733 Update documentation for ApiUser object & node wizard
fixes 
2015-06-25 18:03:00 +02:00
Michael Friedrich ee035ae001 Fix unity build
refs 
2015-06-25 17:20:23 +02:00
Michael Friedrich 3e3588b9fb Cli: Still ask for CN in 'node wizard'
refs 
2015-06-25 13:28:16 +02:00
Michael Friedrich ec3f1c6320 Cli: 'node setup' on the master uses 'api setup' if api feature is disabled
refs 
2015-06-25 11:00:25 +02:00
Michael Friedrich 5249e4af11 Cli: 'node wizard' on the master uses 'api setup' if api feature is disabled
refs 
2015-06-25 11:00:12 +02:00
Michael Friedrich 0d977b9d48 Allow to pass cn to ApiSetupUtility::SetupMaster()
refs 
2015-06-25 10:40:50 +02:00
Michael Friedrich 663f09e475 Only run 'api setup' if the feature was not enabled
It is safe to assume that the user either did run
'node wizard' or 'node setup' in >= 2.3.x before, or
manually enabled the api feature and deployed the
certificates (otherwise Icinga2 wouldn't start either).

In that case we'll skip the api setup to ensure that we
don't override any existing configuration at all.

refs 
2015-06-25 10:21:18 +02:00
Michael Friedrich 6f43162efa Add feature enable/disable helpers
refs 
2015-06-25 10:14:19 +02:00
Michael Friedrich 7b0b04ba8f Implement 'api setup' cli command & add ApiUser config
refs 
2015-06-25 10:08:34 +02:00
Michael Friedrich 99a0c7b157 Fix wrong preprocessor macros 2015-06-24 14:13:54 +02:00
Benedikt Heine 7cd0077ab5 node setup: indent accept_config and accept_commands
fixes 

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2015-06-19 09:07:51 +02:00
Jean Flach f907a7f617 Fix Port wrong default port in Node Wizard
fixes 
2015-04-30 12:52:35 +02:00
Michael Friedrich ab8dbd71e2 Rewrite some of the wizard questions
refs 
2015-04-27 11:10:49 +02:00
Michael Friedrich 9b8eea3579 CLI: Be less verbose in 'node update-config'
fixes 
2015-04-20 14:58:08 +02:00