SSL set up on mirror

Greetings Everyone:

we are using BB version 4.14 and planning to set Smart mirroring for same we have to start it with https instead of http.

Went thru several Atlassian document but didn't help here(https://confluence.atlassian.com/bitbucketserver/bitbucket-server-config-properties-776640155.html)

Following steps has been followed to achive this

1. Created a .keystore file in home of atlbitbucket

2./usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45-28.b13.el6_6.x86_64/jre/bin/keytool -genkey -alias tomcat -keyalg RSA -sigalg SHA256withRSA -keystore {BITBUCKET_HOME}/shared/config/ssl-keystore

3. Adding following to bitbucket.properties file

server.port=8443
server.ssl.enabled=true
server.ssl.key-store=/path/to/keystore/bitbucket.jks
server.ssl.key-store-password=<password value>
server.ssl.key-password=<password value>

 

Is there anything I'm missing here ?

 

 

2 answers

1 accepted

0 vote

Hi Rahul,

The instructions you're looking at are for Bitbucket version 5 and newer - in version 4 you need to make changes in server.xml rather than bitbucket.properties.

You can refer to these instructions for details.

Cheers,

Christian

Premier Support Engineer

Atlassian

Thanks Christian for redirecting me to correct page.

I have followed below steps but still m seeing self signed certificate.

1. Generating Keytool 
/opt/atlassian/bitbucket/4.14.5/jre/bin/keytool -genkeypair -alias BBROOT -keyalg RSA -keysize 2048 -sigalg SHA256withRSA -keystore keystore -dname "cn=mymirrorserver.comm.solutions.com, ou=BBMIRROR, o=Private mirror Inc.."  -ext san=dns:cmymirrorserver,dns:mymirrorserver.comm.solutions.com,dns:mymirrorserver.comm.solutions.com -keypass changeit -storepass changeit

2. Generating CSR file
/opt/atlassian/bitbucket/4.14.5/jre/bin/keytool -certreq -alias BBROOT -keyalg RSA -file certreq.csr -keystore keystore -ext san=dns:mymirrorserver.comm.solutions.com,dns:mymirrorserver.comm.solutions.com

3. Getting CRT file from  third party site and importing it on server
/opt/atlassian/bitbucket/4.14.5/jre/bin/keytool -import -trustcacerts -file /home/atlbitbucket/certs/certreq.crt -alias BBROOT -keystore /opt/atlassian/bitbucket/4.14.5/jre/lib/security/cacerts

 

And included following in ```server.xml``` (My JAVA home is /opt/atlassian/bitbucket/4.14.5/jre)

<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
/>

 

After doing all this restarting services but still seeing error:There are issues with the site's certificate chain (net::ERR_CERT_AUTHORITY_INVALID).

Is there anything I'm missing

Thanks Christian for redirecting me to correct page.

I have followed below steps but still m seeing self signed certificate.

1. Generating Keytool 
/opt/atlassian/bitbucket/4.14.5/jre/bin/keytool -genkeypair -alias BBROOT -keyalg RSA -keysize 2048 -sigalg SHA256withRSA -keystore keystore -dname "cn=mymirrorserver.comm.solutions.com, ou=BBMIRROR, o=Private mirror Inc.."  -ext san=dns:cmymirrorserver,dns:mymirrorserver.comm.solutions.com,dns:mymirrorserver.comm.solutions.com -keypass changeit -storepass changeit

2. Generating CSR file
/opt/atlassian/bitbucket/4.14.5/jre/bin/keytool -certreq -alias BBROOT -keyalg RSA -file certreq.csr -keystore keystore -ext san=dns:mymirrorserver.comm.solutions.com,dns:mymirrorserver.comm.solutions.com

3. Getting CRT file from  third party site and importing it on server
/opt/atlassian/bitbucket/4.14.5/jre/bin/keytool -import -trustcacerts -file /home/atlbitbucket/certs/certreq.crt -alias BBROOT -keystore /opt/atlassian/bitbucket/4.14.5/jre/lib/security/cacerts

 

And included following in ```server.xml``` (My JAVA home is /opt/atlassian/bitbucket/4.14.5/jre)

<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
/>


After doing all this restarting services but still seeing error:There are issues with the site's certificate chain (net::ERR_CERT_AUTHORITY_INVALID).

Is there anything I'm missing

Hi Rahul,

I take it you're getting this error displayed in the browser? In that case it suggests that the certificate wasn't signed by a trusted authority or that you're missing the certificate authority's certificate in the keystore.

Cheers,

Christian

Premier Support Engineer

Atlassian

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
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...

1,768 views 1 5
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