ENVIRONMENT:
We have installed the base OS, CentOS 7. Our CA is on-premise, and we are the admins. We have generated a PEM Key Pair for use on the server and with JIRA. The full generated certificate includes the KEY, the Signed CERT, and the CHAIN. We break these apart into KEY.PEM, CERT.PEM, and CHAIN.PEM. Each are installed on the server for their respective use for various uses on the server, not just JIRA. The goal is to use the existing generated certificates with JIRA as well
After installing JIRA, we followed the instructions to create the JKS Keystore. This is done in JKS format.
ASSUME THE FOLLOWING:
ATTEMPTS:
Here is the only way we can get it to work:
CONCLUSION: The only way we can get this work is to use the CSR method. Without going into more detail than I already have (if you made it this far), this is not preferred. The Certs are created and installed on the Server long before JIRA (or any application) is installed on the server, and we'd like to keep this process if possible. I'm sure this is just a matter of figuring the proper way to convert the Cert into a format that the JKS will accept, but it's a little bit out of our expertise now. Anyone have any ideas on what we can do to use the original KEY.PEM, CERT.PEM, CHAIN.PEM with JIRA?
A common solution is to not have jira handle the ssl encryption itself, but front it with nginx or apache, which handles the ssl, and then proxies to jira. This may give you more options for how to handle the certs in nginx, which can use the pem and key files.
It also has the side benefit of offloading the ssl work to a different process, which has some performance benefits.
To enforce, you can firewall the ports so that only localhost connections can connect to the jira port.
@Andrew Laden Thank you for the response. We had considered that, and saw that as a possible option as well. While that is a technical possibility and something we may end up doing, I need to revise my original question a bit. We are trying to figure out how to do this directly on the JIRA server itself. I will still accept your answer as a solution as technically it is a solution.
The original goal is to use our Internal CA issued certs without having go through the CSR method - and do this on the server itself. We have full control of the CA, so if there's a format that the certs need to be issued in, etc, we can accommodate that.
In the end, the answer simply may be "it's not possible" or "that's not the recommended", but just wanted to reach out to the community to see if anyone else has been able to do this with existing issued certs without having to go through the CSR method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well I hate leaving this open, So I Dug a little. You don't want to create a new key, you want to use an existing key. ie, you want to import an existing key into a jks keystore.
Try the procedure on this page(s)
https://jee-appy.blogspot.com/2017/02/ssl-certificate-setup-tomcat.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Andrew Laden Thank you.
Looking over those they are very similar to some steps I've already taken. Step 3 above under Attempts. Instead of starting from everything broken apart we generated a P12 right from the CA. It imported fine, but after I updated the Connector for JIRA the page would never load (if memory serves me). The two outcomes we had were the page never loaded, or it loaded with a self-signed cert. My original attempts at importing a P12 did follow the guides of taking the KEY, CERT, and CHAIN and combining them, but it was unsuccessful. Figured starting right from a combined P12 would be better anyway.
I used the info form the 2nd link in my previous Attempts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Interesting about the self signed cert in attempt 2. Either you are looking at the wrong file or you are using wrong alias. (I see in the "how we got it to work" section where you updated what keystore jira should use, but not in the original attempts)
Try starting from scratch with a new keystore, using the directions from the first link.
Make sure you use the full commands, in particular changing aliases when you import your certs. Ie if you generated an new keystore initially with an alias of "tomcat", then you may have a problem if you imported cert is imported using the same alias. So don't create an empty keystore first. Start by importing your CA's chain to create it. (as in the example)
In your server.xml, did you set the parameters below
keystoreFile="<Full path to your keystore>" keystorePass="changeit" keyAlias="<Alias of the imported cert>"
I'm a little confused by your statement " The HTTPS connector type was changed from JKS to PKCS12," Where was that changed?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Andrew Laden Definitely not the wrong keystore or alias. Some of the stuff I have quadruple checked. All of that is under the "Assume the following" section. All of that has been quadruple checked by multiple techs involved including myself. But I thought the exact same thing when I went through that.
Here's additional consideration which I was trying to get across in my original post. Everything works for the CSR method. The only thing that is changed throughout the entire process is the import of the certs. Everything else is identical, including the connector configuration and aliases used. Tried to keep the changes to a bare minimum so as to not introduce other problem variables.
The keystore creation is mostly pulled from Atlassian's documentation, the CLI method not the Protecle method.
As far as the connector type, I meant to say the KEYSTORE type, not Connector type. Per Atlassians documentation they specify the Keystore Type as JKS in the Connector configuration. That is what I have changed from JKS to PKCS12 when I was using a P12 certificate. It was a last ditch effort to see if it mattered, but it didn't. None of the online forums I found indicated it needed to be done, but I was just trying different things.
I will definitely go back through the links you provided. Will have to do at a later date though as I need to finish this server now. I'm just going to use the CSR method since it works (though not preferred), then I'm going to lab this out and try anything that you and anyone else recommends.
Here's what my Connector Configuration looks like, and note that this DOES work for the CSR method:
<Connector port=
"8443"
protocol=
"org.apache.coyote.http11.Http11NioProtocol"
relaxedPathChars=
"[]|"
relaxedQueryChars=
"[]|{}^\`"<>"
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=
"/var/atlassian/application-data/jira/jira.jks"
keystorePass=
"changeit"
keystoreType=
"JKS"
/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Andrew Laden Definitely not the wrong keystore or alias. Some of the stuff I have quadruple checked. All of that is under the "Assume the following" section. All of that has been quadruple checked by multiple techs involved including myself. But I thought the exact same thing when I went through that.
Here's additional consideration which I was trying to get across in my original post. Everything works for the CSR method. The only thing that is changed throughout the entire process is the import of the certs. Everything else is identical, including the connector configuration and aliases used. Tried to keep the changes to a bare minimum so as to not introduce other problem variables.
The keystore creation is mostly pulled from Atlassian's documentation, the CLI method not the Protecle method.
As far as the connector type, I meant to say the KEYSTORE type, not Connector type. Per Atlassians documentation they specify the Keystore Type as JKS in the Connector configuration. That is what I have changed from JKS to PKCS12 when I was using a P12 certificate. It was a last ditch effort to see if it mattered, but it didn't. None of the online forums I found indicated it needed to be done, but I was just trying different things.
I will definitely go back through the links you provided. Will have to do at a later date though as I need to finish this server now. I'm just going to use the CSR method since it works (though not preferred), then I'm going to lab this out and try anything that you and anyone else recommends.
Here's what my Connector Configuration looks like, and note that this DOES work for the CSR method:
<Connector port=
"8443"
protocol=
"org.apache.coyote.http11.Http11NioProtocol"
relaxedPathChars=
"[]|"
relaxedQueryChars=
"[]|{}^\`"<>"
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=
"/var/atlassian/application-data/jira/jira.jks"
keystorePass=
"changeit"
keystoreType=
"JKS"
/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
If you converted your JKS to PCKS12 then in your server.xml connector you need to make sure you are referencing keystoreType "PKCS12" and you keystoreFile should be of .p12 or .pfx vs jks. You and also reference your truststoreFile which would be the cacerts file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.