4 Setting Up the Oracle Key Vault SDK

The client SDK is available in both C and Java.

4.1 Enrolling an Endpoint

An Endpoint must be registered and enrolled to the Oracle Key Vault server before downloading the SDK content to that endpoint.

If the endpoint is not already registered and enrolled before downloading the SDK, please enroll the endpoint by following the instructions from Enrolling Endpoints for Oracle Key Vault.

4.2 Downloading the C or Java SDK Software

You must download the appropriate Software Development Kit (SDK) software, either the C or Java version.

  1. Access the Oracle Key Vault management console from the endpoint on which you wish to deploy the SDK.
  2. The login page to the Oracle Key Vault management console appears.
    Do not log in.
  3. Click the Endpoint Enrollment and Software Download link below the Login button.

    Figure 4-1 Endpoint Enrollment and Software Download

    Click then Endpoint Enrollment and Software Download link on the management console login screen.
    Description of "Figure 4-1 Endpoint Enrollment and Software Download"
  4. The Enroll Endpoint & Download Software screen appears.
    There are four tabs along the top.
    • Enroll Endpoint & Download Software
    • Download Endpoint Software Only
    • Download RESTful Service Utility
    • Download Software Development Kit
  5. Click the Download Software Development Kit tab.

    Figure 4-2 Download Software Development Kit

    Description of Figure 4-2 follows
    Description of "Figure 4-2 Download Software Development Kit"
  6. The Download Software Development Kit screen appears with the option to select either the C or Java SDK.

    Figure 4-3 Select C as the SDK Language

    Description of Figure 4-3 follows
    Description of "Figure 4-3 Select C as the SDK Language"
  7. If you select the C SDK, you must select the platform for deployment.
    The platform options are:
    • Linux
    • Solaris SPARC
    • Solaris x64
    • AIX
    • HP-UX

    If you choose the Java SDK, it is platform independent and does not require you to choose a platform.

    Figure 4-5 Select Java as the SDK Language

    Description of Figure 4-5 follows
    Description of "Figure 4-5 Select Java as the SDK Language"
  8. Click Download.
    Save the SDK zip file to the desired location.
  9. Ensure that you have the necessary administrative privileges to install software on the endpoint.
  10. Check that the OKV_HOME environment variable is correctly set.
    See the README file included in the zip file for more information.
  11. Navigate to the directory in which you saved the zip file.
  12. Unzip the SDK file.
    For example, on Linux, to unzip the Java SDK file, use:
    unzip -o okv_jsdk.zip -d $OKV_HOME
    or for the C SDK file, use:
    unzip -o okv_csdk.zip -d $OKV_HOME

    Note:

    Oracle recommends you to deploy the SDK software contents under OKV_HOME. This applies even during redeployment or upgrade to new version of the SDK software.

    Oracle recommends to redeploy the SDK software in the same location post upgrade to Oracle Key Vault 21.2 if already deployed in Oracle Key Vault 21.1.

4.3 Contents of the C SDK File

The contents of C SDK file include demo programs, the SDK library file, and other necessary files.

Figure 4-6 C SDK Directories and Files

Description of Figure 4-6 follows
Description of "Figure 4-6 C SDK Directories and Files"

The include directory contains header files for C SDK APIs. The lib directory contains the shared library object. bin is an empty directory to place the demo program object files and executables.

The demo directory contains sample programs which demonstrate the use of the C SDK APIs. The table below provides a brief description of each sample program.

Table 4-1 Sample Programs

Sample Program Description
AsymmetricKeysDemo.c Application for Asymmetric Keys management operations such as register, activate, get, get all attributes of private and public keys.
AttributeOperationDemo.c Application for KMIP attribute operations such as add, modify, get, and delete attributes.
BatchOperationDemo.c Application to demonstrate batching such as batching of create, activate, add attribute, get key, and destroy operations.
CertificateDemo.c Application for Certificate management operations such as register, activate, get certificate and get all attributes.
CertificateRequestDemo.c Application for Certificate Request management operations such as register, get certificate request and get all attributes.
CreateKeyDemo.c Application for KMIP create and activate key operations.
CreateKeyInVirtualWalletDemo.c Application for KMIP create key operation in the given wallet and activate the key.
CryptoOperationsDemo.c Application to demonstrate encrypt and decrypt operations.
DestroyKeyDemo.c Application for KMIP locate operation by given name and destroy the key.
KeyManagementApp.c Application for Key management operations such as create, activate, get, deactivate, and destroy key.
LocateGetKeyDemo.c Application for KMIP locate operation by given name and get the key details like key length, algorithm, and value.
OpaqueDataDemo.c Application for Opaque Data management operations such as register, get, add attribute, and destroy opaque data.
RegisterKeyDemo.c Application for KMIP register key operation.
SecretDataDemo.c Application for Secret Data management operations such as register, activate, add attribute, deactivate, and destroy secret data.

See the README file provided with the C SDK for complete instructions about environment configuration, compiling, and running the demo programs.

4.4 Contents of the Java SDK File

The contents of Java SDK file include demo programs, the SDK library jar file, and other necessary files.

Figure 4-7 Java SDK Directories and Files

Description of Figure 4-7 follows
Description of "Figure 4-7 Java SDK Directories and Files"

The lib directory contains the Oracle Key Vault Client Java SDK jar file okvjsdk.jar and sample java.util.logging configuration file logging.properties. bin is an empty directory to place the Java demo program class files.

The demo directory contains sample programs which demonstrate the use of the Java SDK APIs. The table below provides a brief description of each sample program.

Table 4-2 Sample Programs

Sample Program Description
AsymmetricKeysDemo.java Application for Asymmetric Keys management operations such as register, activate, get, get all attributes of private and public keys.
AttributeOperationDemo.java Application for KMIP attribute operations such as add, modify, get, and delete attributes.
BatchOperationDemo.java Application to demonstrate batching such as batching of create, activate, add attribute, get key, and destroy operations.
CertificateDemo.java Application for Certificate management operations such as register, activate, get certificate and get all attributes.
CertificateRequestDemo.java Application for Certificate Request management operations such as register, get certificate request and get all attributes.
CreateKeyDemo.java Application for KMIP create and activate key operations.
CreateKeyInVirtualWalletDemo.java Application for KMIP create key operation in the given wallet and activate the key.
CryptoOperationsDemo.java Application to demonstrate encrypt and decrypt operations.
DestroyKeyDemo.java Application for KMIP locate operation by given name and destroy the key.
KeyManagementApp.java Application for Key management operations such as create, activate, get, deactivate, and destroy key.
LocateGetKeyDemo.java Application for KMIP locate operation by given name and get the key details like key length, algorithm, and value.
OpaqueDataDemo.java Application for Opaque Data management operations such as register, get, add attribute, and destroy opaque data.
RegisterKeyDemo.java Application for KMIP register key operation.
SecretDataDemo.java Application for Secret Data management operations such as register, activate, add attribute, deactivate, and destroy secret data.

See the README file provided with the Java SDK for complete instructions about environment configuration, compiling, and running the demo programs.