It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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 votes
Ana Retamal Atlassian Team Jul 18, 2017

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 Sign up to answer
Community showcase
Published in Bitbucket

Atlassian supported Jenkins integration for Bitbucket Server

We’ve been building a plugin to integrate Bitbucket Server and Jenkins CI, and I’m excited to announce that our alpha is ready to download and install. It lets you seamlessly configure a Jenkins job ...

1,099 views 3 17
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you