how to run atlas-debug command over https (secure mode)

Subhajit Bhuiya June 9, 2018

atlas debug command run in non secure mode with http (non secure). I want to run it in secure mode with https protocol (secure). How can I do that?

2 answers

0 votes
Marty Henderson February 1, 2024

Actually his can be done, although you will get warnings in your browser. And it'll not persist between cleaning the plugins target directory. So be mindful.

This is heavily derived from here: https://confluence.atlassian.com/adminjiraserver/running-jira-applications-over-ssl-or-https-938847764.html#RunningJiraapplicationsoverSSLorHTTPS-commandline and we basically ignore the getting a CA to sign the cert.

1. Generate a key: 

keytool -genkey -alias jira -keyalg RSA -keystore <path-to-keystore>/jira.jks

 

2. Modify the server.xml for tomcat. There will be at least two of these, depending on tomcat installations.

./target/container/tomcat8x/apache-tomcat-8.5.65/conf/server.xml

./target/container/tomcat8x/cargo-jira-home/conf/server.xml

You want to amend this one ./target/container/tomcat8x/apache-tomcat-8.5.65/conf/server.xml

3. Add this in: 

<Connector relaxedPathChars="[]|" 
relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" port="8080" protocol="HTTP/1.1" redirectPort="8443" useBodyEncodingForURI="true"/>

<Connector relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;" port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxHttpHeaderSize="8192" SSLEnabled="true"
maxThreads="150" minSpareThreads="25"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
sslEnabledProtocols="TLSv1.2,TLSv1.3"
clientAuth="false" useBodyEncodingForURI="true"
keyAlias="jira" keystoreFile="<path-to-keystore>/jira.jks" keystorePass="<your password for the keystore>" keystoreType="JKS"/>

This is what gets copied to the cargo server.xml.

3. Add this to jiras web.xml, right at the end, just before the closing web-app tag.

<security-constraint>
 <web-resource-collection>
  <web-resource-name>all-except-attachments</web-resource-name>
  <url-pattern>*.jsp</url-pattern>
  <url-pattern>*.jspa</url-pattern>
  <url-pattern>/browse/*</url-pattern>
  <url-pattern>/issues/*</url-pattern>
 </web-resource-collection>
 <user-data-constraint>
  <transport-guarantee>CONFIDENTIAL</transport-guarantee>
 </user-data-constraint>
</security-constraint>

 

4. Start up with mvn jira:debug and you should be set.

 

 

 

 

0 votes
Mark Markov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 9, 2018

Hello @Subhajit Bhuiya

Do you mean atlas-debug command? If you do, you cant.

atlas-debug runs local jira for development deeds there is no need to do such things as secure. Never needed, never will be done.

If you need to start jira server in debug mode, you can follow instructions on this question
https://community.atlassian.com/t5/Answers-Developer-Questions/starting-jira-in-debug-mode/qaq-p/506005

fi1on January 27, 2020

 there is no need to do such things as secure

Good luck debugging problems that occur only when SSL is enabled. Thanks again atlassian

Like # people like this

Suggest an answer

Log in or Sign up to answer