Tagging and hidding of sensitive information in Ansible variables in the host details page

Are there plans to enhance the hosts page under the Ansible > Variables to be able to mark variables as sensitive and not allowing the current value to be displayed?

This is already implemented under Configure > Ansible > Variables. If a variable is marked ‘Hidden Value’ there, I think that the hosts page should note this and not allow the value to be viewed, even if the variable is overridden at the host level.

There is an open PR in foreman_ansible to hide the value of sensitive variables. However, it’s only about the hiding them in the UI if I remember correctly. See foreman_ansible: PR 717 “Fixes #37418 - Fixes an issue that caused hidden Ansible variables to be shown in plain text on the Host-Details page”

cc @thorbend

1 Like

Also already had that case, and as I see it just hiding it in the UI mostly is enough,
of course having it more secured is an extra, though mostly hiding it in daily work and while screensharing is a real benefit.

Looked at the PR too now, and didn’t even think about the being able to limit access then to only people, who have edit access, which is great to have :slight_smile:

1 Like

Hi @frostygresh, thanks for raising this.

As @maximilian mentioned, there’s already an open PR addressing the issue. However, it looks like it hasn’t been updated in quite some time, so I’ll take the initiative and open a new PR to get this fixed.

Update: This is the PR Fixes #37418 - Mask hidden Ansible variable values in UI by nofaralfasi · Pull Request #777 · theforeman/foreman_ansible · GitHub

3 Likes