A programmer Is developing a Node is application which will run in a Linux server on their on-premises

By | December 3, 2022

A programmer Is developing a Node is application which will run in a Linux server on their on-premises data center. This application will access various Oracle Cloud Infrastructure (OC1) services using OCI SDKs.
What is the secure way to access OCI services with OCI Identity and Access Management (JAM)?

Correct Answer: C
Set up an Oracle Cloud Infrastructure API Signing Key for Use with Oracle Functions:
Before using Oracle Functions, you have to set up an Oracle Cloud Infrastructure API signing key.
The instructions in this topic assume:
– you are using Linux
For more information and other options, see Required Keys and OCIDs.
The instructions below describe how to create a new ~/.oci directory, how to generate a new private key file and public key file in that ~/.oci directory, how to upload the public key to Oracle Cloud Infrastructure to create a new API signing key, and how to obtain a fingerprint for the public API key. Be aware that instructions and examples elsewhere in this documentation assume the ~/.oci directory exists and contains the private and public key files.
To set up an API signing key:
Log in to your development environment as a functions developer.
In a terminal window, confirm that the ~/.oci directory does not already exist. For example, by entering:
ls ~/.oci
Assuming the ~/.oci directory does not already exist, create it. For example, by entering:
mkdir ~/.oci
Generate a private key encrypted with a passphrase that you provide by entering:
$ openssl genrsa -out ~/.oci/<private-key-file-name>.pem -aes128 2048
where <private-key-file-name> is a name of your choice for the private key file (for example, john_api_key_private.pem).
For example:
$ openssl genrsa -out ~/.oci/john_api_key_private.pem -aes128 2048
Generating RSA private key, 2048 bit long modulus
….+++
…………………………………………………………..+++ e is 65537 (0x10001) Enter pass phrase for /Users/johndoe/.oci/john_api_key_private.pem:
References:
https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Tasks/functionssetupapikey.htm