How to generate an API Signing Key?

How to generate an API Signing Key?

You can use the following OpenSSL commands to generate the key pair in the required PEM format. If you're using Windows, you'll need to install Git Bash for Windows and run the commands with that tool.

1. Create a directory

      For your convenience, you can create a .oci directory to store the credentials:
      mkdir ~/.oci

2. Generate private key

      You can use the following command to generate the private key with no passphrase.

      openssl genrsa -out ~/.oci/oci_api_key.pem 2048

For security reasons, it is critical to ensure that only you can read/write the private key file. To enable the same, use the following command:

      chmod go-rwx ~/.oci/oci_api_key.pem

3. Generate public key:

      openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem

4. Upload public key to IAM

You can copy the contents of the public key to the clipboard using pbcopy, xclip or a similar tool (you'll need to paste the value into the console later). For example:

      cat ~/.oci/oci_api_key_public.pem | pbcopy

Your API requests will be signed with your private key and Oracle will use public key to verify the authenticity of your request. The public key must be uploaded to the IAM.

                    New to ADSelfService Plus?

                      • Related Articles

                      • How to change AppManager credentials/EUM API Key?

                        How to change AppManager credentials/EUM API Key in console mode or directly from file? For EUM Agent version 18 and above: Go to [EUM_HOME]/conf folder. Open AppServer.xml in a text editor. Remove encryptedKey attribute and add new attribute apikey ...
                      • How to get the Key's Fingerprint?

                        To generate key fingerprint, you need to upload the generated PEM public key in the Oracle cloud console. Follow the steps below to achieve the same: Open the Console, and sign in. View the details for the user who will be calling the API with the ...
                      • How can I generate SSH key for public key based authentication in server monitors?

                        To monitor a Unix server via Public Key Authentication in SSH mode, you need to generate a set of RSA or DSA key pairs. To generate RSA or DSA SSH key pairs: For windows, you can use a free tool like PuTTYgen. For Linux, you can use ssh-keygen ...
                      • REST API Monitor - FAQS

                        1. What should I do when Basic Authentication fails in REST API monitor? Verify if the credentials provided in the Applications Manager are correct. Try if sending username and password in Authorization request header works Get an BASE-64 encoded ...
                      • Troubleshoot SSH key based authentication failures

                        Follow the suggestions given below to troubleshoot SSH key based authentication failures Check server availability. Click here to know how to check server availability in Applications Manager Verify if you have specified the correct command prompt ...