{"id":504,"date":"2022-02-18T19:05:51","date_gmt":"2022-02-18T18:05:51","guid":{"rendered":"http:\/\/blog.xoupix.fr\/?p=504"},"modified":"2022-02-18T19:05:53","modified_gmt":"2022-02-18T18:05:53","slug":"enabling-secured-connections-between-components","status":"publish","type":"post","link":"https:\/\/blog.xoupix.fr\/index.php\/2022\/02\/18\/enabling-secured-connections-between-components\/","title":{"rendered":"Enabling secured connections between components"},"content":{"rendered":"\n<p>How-to secure connections between components.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>The following steps will allow you to enable secured connections between two components, like querying https url<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>retrieve the certificate of the url you want to connect to : openssl s_client -connect my-service.com:443 -showcerts<\/li><li>store the output of the previous command, including &#8220;&#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211;&#8221; and &#8220;&#8212;&#8211;END CERTIFICATE&#8212;&#8211;&#8221; into my-service.com.pem<\/li><li>convert the pem fil to cer certificate using the following command line : openssl x509 -inform PEM -in my-service.com.pem -outform DER -out my-service.com.cer<\/li><li>adding the cer certificate to the keystore using the following command line : it to cacerts using \/path\/to\/java\/bin\/keytool -import -alias my-alias -keystore \/path\/to\/cacerts -file \/path\/to\/my-service.com.cer<\/li><li>restart your service<\/li><\/ul>\n\n\n\n<p>The next time you will call your url, it must be OK !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How-to secure connections between components.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-504","post","type-post","status-publish","format-standard","hentry","category-ssl"],"_links":{"self":[{"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/posts\/504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/comments?post=504"}],"version-history":[{"count":1,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/posts\/504\/revisions"}],"predecessor-version":[{"id":505,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/posts\/504\/revisions\/505"}],"wp:attachment":[{"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/media?parent=504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/categories?post=504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/tags?post=504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}