bitbucket-diy-backup Protecting the Admin User

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?

 

1 answer

0 vote

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.

The log-in page uses cookie-based authentication, so if you are using Bitbucket in a browser you can call REST from JavaScript on the page and rely on the authentication that the browser has established.

Hope this helps :)

Ana

Hello Ana,

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 ?

Regards

Jason

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

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&nbsp...

714 views 0 4
Read article

Atlassian User Groups

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!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot