How can I use a encrypted global Bamboo variable for my host product credentials?

Issue #51 resolved
Michael Rüegg created an issue

Hi,

I have dozens of build jobs and I don't want to enter my host password (e.g., my Stash password) for every build job again which would cause a lot of work when I once have to change my password.

I would prefer to use a Bamboo variable instead. In the UI I see a checkbox which will allow me to enter a Bamboo variable. But it is not clear to me where I can create this variable. Does that have to be a global Bamboo variable? Is it possible to use an encrypted variable for this? Otherwise, the variable will be stored in clear text in the Bamboo database I guess.

Comments (4)

  1. Joe Clark

    Hi @mruegg!

    Yes, a global Bamboo variable is what that option allows you to provide. Unfortunately Bamboo does not provide any way to store encrypted variable values.

    If you want to encrypt and store the value of the variable in some other, more secure location, you could implement your own mechanism and then, within your build, execute a script which decrypts the value and sets the Bamboo variable on-the-fly. There is a custom Bamboo task which allows you to read variables in from a file: https://marketplace.atlassian.com/plugins/com.atlassian.bamboo.plugins.bamboo-variable-inject-plugin/server/overview

  2. Michael Rüegg reporter

    Thanks for your feedback, Joseph! I will implement my own solution then as you have advised.

  3. Log in to comment