semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

Hide sensitive data in Survey Variable when user types into that field

Open UNiXMIT opened this issue 1 year ago • 2 comments

In my survey variables I enter my credentials that are used to authenticate with SSO in my playbooks so that the AWS connection succeeds. Is it possible to mark a survey variable as sensitive so that passwords are masked by ***** when entering the data/password? Like there is an option to use 'required="required"' can there also be an option to add 'type="password"' i.e. image

image

FYI I applied 'type="password"' using the browser developer tools.

Thanks

UNiXMIT avatar Mar 22 '23 10:03 UNiXMIT

As a workaround I am injecting the following Javascript into the page:

let observer = new MutationObserver(mutations => {
	for (const elem of document.querySelectorAll("label")) {
	  if (elem.textContent.includes("SSO Password")) {
	    elem.nextSibling.type = 'password';
	  }
	}
});
observer.observe(document, {childList: true, subtree: true});

It might also be useful to add other input types on fields like email etc.

Thanks and keep up the great work.

UNiXMIT avatar Mar 22 '23 10:03 UNiXMIT

I've been able to improve the workaround with the same javascript but making nginx add the script header in the html to load the javascript file. No need for a browser extension now.

UNiXMIT avatar Feb 07 '24 10:02 UNiXMIT