Mask Variable Values

When starting a task in the background, i like that I can see the function name and variable values in the dashboard. but in some cases it would be good to mark the variables as secure so they will be masked. For example if I am uploading over FTP, i want to be able to give access to the hangfire dashboard to our support team so they can monitor uploads but I dont really want them to be able to see the FTP account info.


// Job ID: #37714
using Job_Scheduler_Hangfire_IIS;

Unified_Packager.FTPTransfer(“host.host.com”, “username”, password, “path_to_file”)

// Job ID: #37714
using Job_Scheduler_Hangfire_IIS;

Unified_Packager.FTPTransfer(“host.host.com”, *****, *****, “path_to_file”)

The easiest way (without modifying Hangfire sources) is to pass password value encrypted.
If the credentials are always the same (or there’s a limited set of them), it would be better to not pass them at all, but store them encrypted in the configuration file instead.

If you still want to mask them, you’ll need to add logic somewhere here, for example, checking if the parameter has a specific custom attribute.

Note that even if you mask sensitive values in the dashboard, everyone with database access would still be able to read them.