How to use auto login for dashboards in checkmk

fyi…

2 Likes

It is 2021; using simple username and password in an url is terrible idea.

ok… are you a checkmk user? did you use checkmk dashboards? if yes, how do you use it?

if you have a better solution, tell me :wink:

if not, i don’t understand your comment…

ok… yes, yes, like any other.

Better solution would be an reverse proxy to hide the username and password IMHO

Nice point @checknl . How about a little howto?

2 Likes

I am not quite sure, why the forum software suggested this thread to me, but…

The blog by @dns_es dns_es is actually a longer and more detailed version, of how we explain this in our official user guide: Users, roles and permissions - Authorization and user configuration

Though I do understand @checknl’s interjection about not putting the password and username in the url. Though I would always say, that it depends very very much on where and how this is used. I would know a lot of situations, where I would be totally fine with this solution.

There is one more thing though, that might lessen the concern here. You can use the so-called Nagios macros in the URL to mask the username and password in the URL. There is a file in your Checkmk site called

~/nagios/resource.cfg

You can simply add lines there and use these macros in your URL then. Of course, you will then have the password in plaintext in that file, but hopefully not a lot of people have access to this on your Checkmk server, right?

Add this to the resource.cfg:

$kioskuserpassword$=mykioskuserpassword

Then use this macro in the URL:


https://mycmkserver/mysite/check_mk/login.py?_origtarget=/mysite/check_mk/dashboard.py?name=mydashboard&_username=mykioskuser&_password=%kioskuserpassword%&_login=1
2 Likes

Thanks for the flowers :wink:

Your hints are very welcome thank you. I will give it a try and if it works i´ll update the blog post.

of course, yes :wink:

kind regards,
Dennis