As part of the setting up backups for bitbucket server using the atlassian-bitbucket-diy-backup (https://bitbucket.org/atlassianlabs/atlassian-bitbucket-diy-backup) it requires that you provide a system administrator account to the script. This account is used to put bitbucket in downtime.
I see a security issue with this as it means that the username and password for an system administrator is stored in plain text on disk on the server.
Of course one can protect the file by giving it appropriate ownership and permissions. But is there not a better way?
Hi Jason! There are also other options, like for example you can create a token associated to the admin and then use this token for the backup. This token will still not be encrypted within the script, but it provides more security as it can not be used to access the instance. You can find this information at
On the Authentication part:
Any authentication that works against Bitbucket will work against the REST API. The preferred authentication methods are HTTP Basic (when using SSL) and OAuth. Other supported methods include: HTTP Cookies and Trusted Applications.
You can find OAuth code samples in several programming languages at bitbucket.org/atlassian_tutorial/atlassian-oauth-examples.
Hope this helps :)
Thank you for the reply, but sadly I am still confused.
You mention using a token associated to the admin account. I cannot find any evidence in the bitbucket interface of how to create this token. The link to the Bitbucket Rest API is not very enlightening. It seems that all the examples use username and password based authentication.
I took a look at using the other recommended method: Oauth. Sadly this didnt go anywhere because the oauth based authentication requires a application link url. (see step 2 at oauth) and I am not using an application, just the atlassian provided backup bash script.
This script does not have a url associated with it.
Could you please point me in the correct direction ?
Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot