{"id":231,"date":"2017-09-19T22:29:40","date_gmt":"2017-09-19T22:29:40","guid":{"rendered":"http:\/\/www.mrmarkyoung.com\/oracle\/?p=231"},"modified":"2018-06-05T17:16:27","modified_gmt":"2018-06-05T07:16:27","slug":"how-to-create-a-ssl-connection-between-oracle-10-2-0-5-and-amazon-aurora-data-migration-services","status":"publish","type":"post","link":"http:\/\/www.mrmarkyoung.com\/oracle\/2017\/09\/19\/how-to-create-a-ssl-connection-between-oracle-10-2-0-5-and-amazon-aurora-data-migration-services\/","title":{"rendered":"How to create a SSL connection between Oracle 10.2.0.5 and Amazon Aurora Data Migration Services"},"content":{"rendered":"<p>Amazon have documented this process, however this is for 11g source Oracle database only, and there are a few steps that must be adhered to in order to get this to work. Please note, there are a few changes from 10g to 11g using orapki, specifically with the auto_login command.<br \/>\nPlease set your Oracle environment so the $ORACLE_HOME is set. This document has been written for UNIX environments.<\/p>\n<p><strong>Please note: Oracle 10.2.0.5 only supports SHA1 certificates.<\/strong><\/p>\n<p>The steps as follows:<\/p>\n<p>Step 1 &#8211; On the Oracle server, create a directory you will use to work with the self-signed certificate.<\/p>\n<pre class=\"lang:default decode:true \" >mkdir my_ssl<\/pre>\n<p>Step 2 &#8211; Change into the directory you created in the previous step.<\/p>\n<pre class=\"lang:default decode:true \" >cd my_ssl<\/pre>\n<p>Step 3 &#8211; Create a root key.<\/p>\n<pre class=\"lang:default decode:true \" >openssl genrsa -out self-rootCA.key 1024<\/pre>\n<p>Step 4 &#8211; Self sign a root certificate using the root key you created in the previous step.<\/p>\n<pre class=\"lang:default decode:true \" >openssl req -x509 -new -nodes -key self-rootCA.key -sha1 -days 1024 -out self-rootCA.pem<\/pre>\n<p>Step 5 &#8211; Create an Oracle wallet directory for the Oracle database.<\/p>\n<pre class=\"lang:default decode:true \" >mkdir $ORACLE_HOME\/ora_ssl_wallet<\/pre>\n<p>Step 6 &#8211; Create a new Oracle wallet.<\/p>\n<pre class=\"lang:default decode:true \" >orapki wallet create -wallet $ORACLE_HOME\/ora_ssl_wallet -pwd Welcome1 -auto_login<\/pre>\n<p>Step 7 &#8211; Add the root certificate to the Oracle wallet.<\/p>\n<pre class=\"lang:default decode:true \" >orapki wallet add -wallet $ORACLE_HOME\/ora_ssl_wallet -trusted_cert -cert self-rootCA.pem -pwd Welcome1<\/pre>\n<p>Step 8 &#8211; List the contents of the Oracle wallet. The list should include the root certificate.<\/p>\n<pre class=\"lang:default decode:true \" >orapki wallet display -wallet $ORACLE_HOME\/ora_ssl_wallet<\/pre>\n<p>Step 9 &#8211; Generate the Certificate Signing Request (CSR) using the ORAPKI utility.<\/p>\n<pre class=\"lang:default decode:true \" >orapki wallet add -wallet $ORACLE_HOME\/ora_ssl_wallet -dn \"CN=MyToll, OU=GT, O=Toll, L=Melbourne, ST=Victoria, C=AU\" -keysize 1024 -pwd Welcome1<\/pre>\n<p>Step 10 &#8211; List the contents of the Oracle wallet. The list should include the CSR.<\/p>\n<pre class=\"lang:default decode:true \" >orapki wallet display -wallet $ORACLE_HOME\/ora_ssl_wallet<\/pre>\n<p>Step 11 &#8211; Export the CSR from the Oracle wallet.<\/p>\n<pre class=\"lang:default decode:true \" >orapki wallet export -wallet $ORACLE_HOME\/ora_ssl_wallet -dn \"CN=MyToll, OU=GT, O=Toll, L=Melbourne, ST=Victoria, C=AU\" -request self-signed-oracle.csr -pwd Welcome1<\/pre>\n<p>Step 12 &#8211; Sign the CSR using the root certificate.<\/p>\n<pre class=\"lang:default decode:true \" >openssl x509 -req -in self-signed-oracle.csr -CA self-rootCA.pem -CAkey self-rootCA.key -CAcreateserial -out self-signed-oracle.crt -days 365 -sha1<\/pre>\n<p>Step 13 &#8211; Add the Client certificate to the server wallet.<\/p>\n<pre class=\"lang:default decode:true \" >orapki wallet add -wallet $ORACLE_HOME\/ora_ssl_wallet -user_cert -cert self-signed-oracle.crt -pwd Welcome1<\/pre>\n<p>Step 14 &#8211; List the content of the Oracle wallet.<\/p>\n<pre class=\"lang:default decode:true \" >orapki wallet display -wallet $ORACLE_HOME\/ora_ssl_wallet<\/pre>\n<p>Step 15 &#8211; Configure sqlnet.ora file ($ORACLE_HOME\/network\/admin\/sqlnet.ora).<\/p>\n<pre class=\"lang:default decode:true \" >WALLET_LOCATION =\r\n   (SOURCE =\r\n     (METHOD = FILE)\r\n     (METHOD_DATA = (DIRECTORY = \/app\/oracle\/10.2.0.5\/ora_ssl_wallet))\r\n   )\r\n\r\nSSL_VERSION = 1.0\r\nSSL_CLIENT_AUTHENTICATION = FALSE\r\nSSL_CIPHER_SUITES = (SSL_RSA_WITH_AES_256_CBC_SHA)<\/pre>\n<p>Step 16 &#8211; Stop the Oracle listener.<\/p>\n<pre class=\"lang:default decode:true \" >lsnrctl stop<\/pre>\n<p>Step 17 &#8211; Add entries for SSL in the listener.ora file $ORACLE_HOME\/network\/admin\/listener.ora.<\/p>\n<pre class=\"lang:default decode:true \" >WALLET_LOCATION =\r\n   (SOURCE =\r\n     (METHOD = FILE)\r\n     (METHOD_DATA = (DIRECTORY = \/app\/oracle\/10.2.0.5\/ora_ssl_wallet))\r\n   )\r\n\r\nSID_LIST_LISTENER =\r\n  (SID_LIST =\r\n    (SID_DESC =\r\n      (SID_NAME = PLSExtProc)\r\n      (ORACLE_HOME = \/app\/oracle\/10.2.0.5)\r\n      (PROGRAM = extproc)\r\n    )\r\n  )\r\n\r\nLISTENER =\r\n  (DESCRIPTION_LIST =\r\n    (DESCRIPTION =\r\n      (ADDRESS = (PROTOCOL = TCP)(HOST = orahost)(PORT = 1521))\r\n      (ADDRESS = (PROTOCOL = TCPS)(HOST = orahost)(PORT = 1522))\r\n      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))\r\n    )\r\n  )\r\n<\/pre>\n<p>Step 18 &#8211; Configure the tnsnames.ora file $ORACLE_HOME\/network\/admin\/tnsnames.ora.<\/p>\n<pre class=\"lang:default decode:true \" >DMS_SSL =\r\n   (DESCRIPTION =\r\n     (ADDRESS_LIST =\r\n     (ADDRESS = (PROTOCOL = TCPS)(HOST = orahost)(PORT = 1522)))\r\n     (CONNECT_DATA = (SERVICE_NAME = DATABASENAME))\r\n   )<\/pre>\n<p>Step 19 &#8211; Restart the Oracle listener.<\/p>\n<pre class=\"lang:default decode:true \" >lsnrctl start<\/pre>\n<p>Step 20 &#8211; Show the Oracle listener status.<\/p>\n<pre class=\"lang:default decode:true \" >lsnrctl status<\/pre>\n<p>Step 21 &#8211; Test the SSL connection to the database from localhost using sqlplus and the SSL tnsnames entry.<\/p>\n<p>Step 22 &#8211; Verify that you successfully connected using SSL.<\/p>\n<pre class=\"lang:default decode:true \" >SELECT SYS_CONTEXT('USERENV', 'network_protocol') FROM DUAL;\r\n\r\n\t\tSYS_CONTEXT('USERENV','NETWORK_PROTOCOL')\r\n\t\t--------------------------------------------------------------------------------\r\n\t\ttcps<\/pre>\n<p>Step 23 &#8211; Change directory to the directory with the self-signed certificate.<\/p>\n<pre class=\"lang:default decode:true \" >cd ~\/my_ssl<\/pre>\n<p>Step 24 &#8211; Create a new client Oracle wallet that AWS DMS will use.<\/p>\n<pre class=\"lang:default decode:true \" >orapki wallet create -wallet .\/ -auto_login<\/pre>\n<p>Step 25 &#8211; Add the self-signed root certificate to the Oracle wallet. There is no auto_login in 10.2.0.5<\/p>\n<pre class=\"lang:default decode:true \" >orapki wallet add -wallet .\/ -trusted_cert -cert rootCA.pem<\/pre>\n<p>Step 26 &#8211; List the contents of the Oracle wallet that AWS DMS will use. The list should include the self-signed root certificate.<\/p>\n<pre class=\"lang:default decode:true \" >orapki wallet display -wallet .\/<\/pre>\n<p>Step 27 &#8211; Upload the Oracle wallet you just created to AWS DMS. Note: you may have to create a new replication instance<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Amazon have documented this process, however this is for 11g source Oracle database only, and there are a few steps that must be adhered to in order to get this to work. Please note, there are a few changes from 10g to 11g using orapki, specifically with the auto_login command. Please set your Oracle environment &#8230; <a title=\"How to create a SSL connection between Oracle 10.2.0.5 and Amazon Aurora Data Migration Services\" class=\"read-more\" href=\"http:\/\/www.mrmarkyoung.com\/oracle\/2017\/09\/19\/how-to-create-a-ssl-connection-between-oracle-10-2-0-5-and-amazon-aurora-data-migration-services\/\" aria-label=\"Read more about How to create a SSL connection between Oracle 10.2.0.5 and Amazon Aurora Data Migration Services\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[12,11,49],"class_list":["post-231","post","type-post","status-publish","format-standard","hentry","category-oracle-database","tag-aws","tag-dms","tag-mysql"],"_links":{"self":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts\/231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/comments?post=231"}],"version-history":[{"count":11,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts\/231\/revisions"}],"predecessor-version":[{"id":242,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts\/231\/revisions\/242"}],"wp:attachment":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/media?parent=231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/categories?post=231"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/tags?post=231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}