Werk #14943: Agent updater: allow automation user to login with password

Component Agent bakery
Title Agent updater: allow automation user to login with password
Date Jan 2, 2024
Checkmk Edition Checkmk Enterprise (CEE)
Checkmk Version 2.3.0b1
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed

Up to now, when using the agent updater CLI, you would have to use the --password (or -P) parameter to specify the password for a human user and the --secret (or -S) parameter to specify the secret for an automation user.

This starts to be confusing with the interactive mode: in that case the program assumes that you are using a human user and will fail if the credentials that you enter are valid credentials for an automation user. On top of that, the error message is completely misleading.

With this commit, we are changing the behavior of the agent updater so that an automation user credentials will work even if the secret is specified with the --password (or -P) param.

This way the end user don't have to care about which param name is the right one to use: they can just specify the password, or the secret, with the --password param and it will work. This also allows the interactive mode to work with an automation user.

This change is backward compatible, meaning that everything that used to work up until now, will keep working even after this.

To the list of all Werks