APIGateway SSL intermediate cert issue,while connecting to web server:-
Hi Folks,
🙏 Namaste and Welcome to my blog 🙏
Today I will explain about if you are getting issue to connect your newly create AWS API gateway to your running web server (My web server is tomcat8 running on ec2). First you need to check what is error for you in my case i am getting some missing intermediate ssl cert issue.
So for that you may ask to provide a complete ssl cert chain from your web server admin who have previously configure ssl cert for your web server , or if you are owner of that server yourself then no worry i will tell you how we can download intermediate cert from website and how can we configure it'.
Stay here 😉
1) Download intermediate Cert
2) Move the downloaded cert to web server
3) Configure that new intermediate cert in your web server
4) Restart tomcat
5) Verify Intermediate Cert Installed properly or not with Online SSL checker
6) Now go to API Gateway and try to run API gateway now
1) Download intermediate Cert
I will show you how i will download intermediate cert of google.com (please use your web site domain name instead of google 👮, it is just an example)
- Go to URL and click on lock icon as shown below and next click on certificate
- Then go to certificate path and then click on the middle one certificate( in your case the name will be different , like comodo , lets encrypt etc so please click only on the middle one which is intermediate cert for your website)
- Next you have to click on view certificate at the bottom right which will bring you in the next box as shown below here go to Details and then below that click on copy to file
- In next page you will be on welcome wizard then just click on next
- On the next you will get two option of format in which you want to export that cert. I am choosing second one of Base64
- Then click on next and save your file in somewhere you local system. Name the file .crt and select extension type all. Click on finish and it will save the file as
- Go to downloaded location and see the name of file which looks like below here you can see it have also .cer extension which you can rename file move this to linux machine.
- As shown below file name is abc.crt.cer now i will rename it to crt extension only.
2) Move the downloaded cert to web server
- Now you have intermediate cert abc.crt with you just move this to required location as i have done below
scp -i hello.pem abc.crt ec2-user@171.37.2.12:/tmp
- Move that file to certs directory
3) Configure that new intermediate cert in your web server
- Change configuration file ssl.conf (for my case i have done proxy pass through ssl so my configuratyion is in ssl in your case it may be in apache or ngnix or somewhere other)
SSLCertificateChainFile /etc/pki/tls/certs/abc.crt
4) Restart tomcat
service httpd restart
- We have multiple online site where you can check if you intermediate cert installed in your server I will give you example of some website where you can check easily
5) Verify Intermediate Cert Installed properly or not with Online SSL checker
- Above screenshot is showing name of ssl checker online popular site, also I am using google to check how can we see for intermediate cert from this site
- In above screen shot you can see cert chain is not breaking so basically intermediate cert is also known as chain cert. so chain is not breaking for google.com it means they have intermediate cert for their website (of course there will have i was only showing you how to see perfect intermediate cert that's why i used google )
- In next screen shot i will show you one of my dummy webserver where i have not installed intermediate cert and which will show you error or chain break
- In above screenshot you can see success response from my web servers api, for you if you will also get some response from web server then you are champion now and you have configured it ....🙌
Note:- For how to create and configure API Gateway in AWS, please go to my other blog where i have explained in detailed.
https://vdkthakur.blogspot.com/2020/08/hi-folks-namaste-welcome-to-my-blog.html
Cheers👍
Comments
Post a Comment