For some reason one of my variables is isn’t printing properly. When it is printed in a PowerShell script, all it outputs is a bunch of asterisks.
One of my variables “applicationName” is being partially censores when output. For instance, when the value is “www.branch-test.com”, it will output “www.********-test.com”. Other variables aren’t sensored. I’ve created a different variable with “123” and that one is printed OK.
I’ve made sure that none of the variables are marked as sensitive
Thanks for getting in touch! Any information regarding variables is stored in the Snapshot which is made at the time of release creation. The first step would be to either create a new release or update the variable Snapshot.
(To update the Snapshot See “Check the Variable Snapshot for the Release” below)
Sometimes the values that were previously printed as sensitive will stay sensitive until the variable has been deleted. If updating the Snapshot as mentioned above does not work, you could delete the
applicationName variable that you have shown. You can then re-add the variable as a non-sensitive variable.
If you would like a bit of further reading about sensitive variables I have linked to the documentation below:
Let me know if that helps.
Ok that makes sense, I didn’t know you could check the variables used in a specific release. I’ve checked the variables and the ones being masked out aren’t set to be sensitive. It looks like it’s only part of the project name that is being masked out. In my case, the project name is “test-branch-wordpress-project.com”, which is shown on the top of the page, but in the deployment task log it is shown as “test-********-wordpress-project.com”. As a matter of fact, it looks like the word “branch” is being masked out consistently throughout the screen. The applicationName variable is shown partially, with the “branch” part being masked out. I’m really confused as to why Octopus would do such a thing.
Please see attached the variables used in teh 184.108.40.206 release, as well as the deployment output from that same release.
Thanks for getting back! When Octopus detects a sensitive variable, it attempts to mask all reference of the variable’s value throughout the deployment and it becomes a part of the snapshot. This is done as a precautionary method, if you were to mark a password as sensitive but have it mentioned elsewhere, Octopus will automatically mask the other reference for you.
Is it possible that the
ftpUserName variable with the value of
branch was made sensitive in the most recent release? Even if it’s no longer a sensitive variable, until a new release is created or the snapshot is updated, the masking will still apply for any reference of
branch throughout the deployment. Is it also possible that one of the
ftpPassword variables has branch as the password, this will cause the same behavior, masking all reference we see during the deployment.
Let me know if that helps, or if you have further questions about this.
That makes a lot of sense. Because this was a test account the ftpUserName was actually set to branch, which explains why it was masked out across the output.
Is this behaviour the same in the latest Octopus version?
It sure is, we do this as a precaution. For example, if you make a password sensitive and reference it somewhere else while forgetting to do this Octopus will automatically mask it for you.