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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

23,209 views 26 12
Join discussion

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