Adding an API Public Key to a User Profile
An API signing key is a PEM-format RSA public/private key pair, at least 2048 bits.
Use the Compute Web UI to add your own API public key to your profile. You can't use the OCI CLI until you have your API signing key pair in place. If you don't have a login and password for the Compute Web UI, contact an administrator.
A user can have a maximum of three (3) public keys added to their user account. If the user has more than one API public key, the user must specify the key's fingerprint to indicate which key they're using to sign the request.
Using the Compute Web UI
-
From a browser, sign in to the Compute Web UI.
-
Navigate to the user details page.
-
If you're adding a public key to your own user account, select your user icon in the upper right of the Compute Web UI, and then select My Profile.
-
If you're adding a public key to a different user account, select Identity on the navigation menu, select Users, and then select the name of the user in the user list.
-
-
On the user details page, scroll to the Resources section, select API Keys, and then select Add API Key.
-
In the Add Public Key dialog box, navigate to the location of the public key or paste the public key contents and then select Upload Key.
Using the OCI CLI
After you have installed and configured the OCI CLI, you can use the api-key upload
command to upload additional keys for your user account or upload keys for another user.
-
Get the OCID of the user that needs an API signing key (
oci iam user list
). -
Use the user API key list command to ensure that the account does not already have the maximum three API signing keys.
Syntax:
oci iam user api-key list --user-id user_OCID
-
Run the API key upload command.
Syntax:
oci iam user api-key upload --user-id ocid1.user.unique_ID \ { --key public_key | --key-file file://public_keyfile.pem }
-
public_key
– an RSA public key in PEM format -
public_keyfile
.pem
– a file that contains an RSA public key in PEM format
-