Rolling dice on Automation Secret does not copy to clipboard

CMK version: Raw Edition 2.2.0
OS version:
Client: Windows 11 - all browsers experience this behavior
Server: Ubuntu 22.04.1

Error message:
No visible message or output from the page at all. Web console shows the following error:

Uncaught TypeError: Cannot read properties of undefined (reading 'writeText')
    at Module.Hr (wato.ts:268:25)
    at <anonymous>:1:10
Hr @ wato.ts:268
(anonymous) @ VM4125:1

Since the secret is a masked field this means I cannot use secrets, as I cannot obtain the value.

1 Like

I do have the very same problem, with the same Version.
Might be a bug, hopefully it will be fixed soon.
Also I couldnt find the secret file on the server itself.

Should be located here:
var/check_mk/web/automation/automation.secret

You might find it there.

as I understand it you can no longer copy the secret from the GUI - This I fully support. You should use a password manager and not store secrets in plan text.

We don’t mean recalling the plain-text secret after it has been stored in a hashed format, we mean we cannot see or copy the secret when it’s first generated. There’s no point in time where the secret is available to copy out to a password manager.

When you click the “dice” icon it generates a new secret and puts it into the field, and it’s supposed to copy the value to the clipboard once so you can save it in your password manager or utilize it.

It doesn’t actually put it in the clipboard.

Since the field is masked right away, you can’t see the value to manually transcribe it, can’t copy it again because “copy” doesn’t work on a masked field, and you never received the actual value in the clipboard so… It’s completely unknown and unusable. The feature 100% does not work as intended.

1 Like

Afaryz, for awareness: you can manually generate a secret outside of CheckMK, like in your password manager, and then paste that value into the secret field and it will store it correctly.

It still doesn’t mean this feature is working correctly, so I’m not going to call it a solution, but it’s a workaround to at least get up and running until they fix the bug.

1 Like

I’m not sure I follow you.
No the default secret cannot be copied, if this is a feature or not I do not know.

You can generate a new secret.

There is no function to copy the password to the clipboard, where is that feature?

When you create a new secret it is visible in the GU and you can copy it. If not your browser is broken.
Screenshot 2023-07-08 at 18.18.25

That is not correct. The field is masked immediately in up-to-date versions of Chrome, Firefox, Chromium, and Edge, with no installed extensions, on multiple client devices. It’s not specific to a single broken client.

This post is specifically on CheckMK raw, version 2.2.0, so ensure that the version you are testing against.

I’m not sure how you would miss it, but there is literally a giant popup when you click the “dice” icon that says “Copied secret to clipboard.” It’s pretty clear that the functionality is not working.

I checked on 2.2.0p5 and it was working without problem.
Generated secret is correctly copied to clipboard.
Also no error message inside the browser dev tools.

Did you try with Windows 11? I guess, we should. Internally, we do most of the work on Ubuntu 22.04 with Firefox plus Chrome and additional UI testing on Windows 10 with all browsers.

Do you have a Windows 10 machine at hand? Just to rule out some strange server side configuration: Would you mind testing this scenario with it?

My test was Win11 and Edge.

1 Like

It seems this was added in 2.2 Random automation secret is now copied to clipboard on creation
I was not aware of the fact, sorry. We test every build of Checkmk in our CI/CD pipeline and was sure I had re-generated secrets for our automation users, but I most have done that only on 2.1

For us this might complicate things, storing secrets in the clipboard is a nice feature, but not asking the end-user for this might make it more difficult to be compliance.

Here we have a nice tone to each others.