{"id":1241,"date":"2023-05-18T11:33:30","date_gmt":"2023-05-18T11:33:30","guid":{"rendered":"http:\/\/wp.chaoyu.nl\/?p=1241"},"modified":"2023-07-12T23:59:51","modified_gmt":"2023-07-12T23:59:51","slug":"oracle-database-local-installation-wallet-for-https-calls","status":"publish","type":"post","link":"https:\/\/chaoyu.nl\/?p=1241","title":{"rendered":"Oracle Database Local Installation Wallet For HTTPs Calls"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This should be used only for local installations, if you have OCI ATP, wallet should work out of the box. <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Access to the database server<\/li>\n\n\n\n<li>download the full root certs from the website for Https calls<\/li>\n\n\n\n<li>upload certs to your database server with SCP or other way <\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">I do know that there is a <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/Dani3lSun\/oracle-ca-wallet-creator\" data-type=\"URL\" data-id=\"https:\/\/github.com\/Dani3lSun\/oracle-ca-wallet-creator\" target=\"_blank\">gitRepo<\/a> that does a download of all certs there are, however It only worked for my Docker DB instance , not a DB in a VM. Therefore, I have sticked to this manual way. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">***  update ***\nUpbove mentioned gitRepo, does work. However.\nafter create the wallet, the setting should be like this. \n\nbegin\n  apex_instance_admin.set_parameter('WALLET_PATH'\n                                   ,'file:\/opt\/oracle\/my_wallets');\n  apex_instance_admin.set_parameter('WALLET_PWD'\n                                   ,NULL);\n  commit;\nend;\n\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Read here for more. <a href=\"https:\/\/docs.oracle.com\/en\/database\/oracle\/apex\/23.1\/aeapi\/Available-Parameter-Values.html#GUID-75DCF658-5A76-4E81-B12D-04E254A3D80A\">https:\/\/docs.oracle.com\/en\/database\/oracle\/apex\/23.1\/aeapi\/Available-Parameter-Values.html#GUID-75DCF658-5A76-4E81-B12D-04E254A3D80A<\/a> search &#8220;The password associated with the wallet. Use an empty\/null value for auto-login wallets&#8221;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Create Wallet<\/h2>\n\n\n\n<p class=\"has-pale-pink-color has-text-color has-medium-font-size wp-block-paragraph\" style=\"text-decoration:underline;text-transform:capitalize\">!! use user Oracle at all times<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code lang=\"bash\" class=\"language-bash line-numbers\">$ sudo su - oracle\n$ cd \/opt\/oracle\n$ mkdir my_wallets\n$ orapki wallet create -wallet \/opt\/oracle\/my_wallets -pwd WalletPasswd123 -auto_login<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">If error orapki command not found <\/h3>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background has-small-font-size wp-block-paragraph\" style=\"font-style:normal;font-weight:400\">if you run a different version, the third command can be different. For exmple  ..\/18c\/..<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code lang=\"bash\" class=\"language-bash line-numbers\">$ export ORACLE_SID=XE \n$ export ORAENV_ASK=NO \n$ . \/opt\/oracle\/product\/21c\/dbhomeXE\/bin\/oraenv<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/docs.oracle.com\/en\/database\/oracle\/oracle-database\/21\/xeinl\/installing-oracle-database-free.html#GUID-A5FCC804-5786-4B4B-B1B4-60E36E80B73F\">https:\/\/docs.oracle.com\/en\/database\/oracle\/oracle-database\/21\/xeinl\/installing-oracle-database-free.html#GUID-A5FCC804-5786-4B4B-B1B4-60E36E80B73F<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add Wallet<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Assume you have SCP the .pem file into \/tmp folder<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code lang=\"bash\" class=\"language-bash line-numbers\">$ orapki wallet add -wallet \/opt\/oracle\/my_wallets -trusted_cert -cert \"\/tmp\/mycer.pem\" -pwd WalletPasswd123<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Settings in Database<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run this code in SYS<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code lang=\"sql\" class=\"language-sql line-numbers\">begin\n  apex_instance_admin.set_parameter('WALLET_PATH'\n                                   ,'file:\/opt\/oracle\/my_wallets');\n  apex_instance_admin.set_parameter('WALLET_PWD'\n                                   ,'WalletPasswd123');\n  commit;\nend;\n\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Or setting the wallet in APEX Internal workspace -&gt; manage instance -&gt; instance settings -&gt; wallet<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">To Download Wallet<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I recommand using firefox<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/wp.chaoyu.nl\/wp-content\/uploads\/2023\/05\/image.png\" alt=\"\" class=\"wp-image-1246\" width=\"836\" height=\"651\"\/><figcaption class=\"wp-element-caption\">Click on View certificate<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/wp.chaoyu.nl\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-18-13-45-52-2.png\" alt=\"\" class=\"wp-image-1249\" width=\"843\" height=\"1000\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>This should be used only for local installations, if you have OCI ATP, wallet should work out of the box. I do know that there is a gitRepo that does a download of all certs there are, however It only worked for my Docker DB instance , not a DB in a VM. Therefore, I&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1256,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1241","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/posts\/1241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1241"}],"version-history":[{"count":9,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/posts\/1241\/revisions"}],"predecessor-version":[{"id":1457,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/posts\/1241\/revisions\/1457"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/media\/1256"}],"wp:attachment":[{"href":"https:\/\/chaoyu.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}