SSL set up on mirror

Rahul Sahotay September 20, 2017

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

2 accepted

0 votes
Answer accepted
Rahul Sahotay September 24, 2017

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

Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 25, 2017

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

0 votes
Answer accepted
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 21, 2017

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

Rahul Sahotay September 24, 2017

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events