Using Cloud Security SDKs


The BMC Helix Cloud Security software development kit (SDK) provides access to Innovation Suite APIs and SDKs, the core building blocks for developers. The SDK provides a normalized and homogeneous interface to manage your cloud and other on-premises software. The SDK can be used to directly use the Cloud Security API by embedding a .jar file into development code to enable the API to be invoked programatically.

This topic contains the following sections:

Prerequisites for installing the SDK

The following table details the SDKs used and the prerequisites for each use case.

Use case

SDKs used

Prerequisites

  • You are a registered user of Helix Cloud Security.
  • You have installed the Cloud Security-SDK.jar file (attached to this page).
  • A Policy (.yaml) file is available.
  • S3 Bucket json data is available.
  • Java 11 is installed.
  • Maven is installed.
  • Eclipse is installed.
  • You are a registered user of BMC Helix Cloud Security.
  • A Policy (.yaml) file is available.
  • Post Man client is installed.
  • You are a registered user of BMC Helix Cloud Security.
  • You have installed the Cloud Security-SDK.jar file (attached to this page).
  • A Policy (.yaml) file is available in Cloud Security.
  • A connector is available in Cloud Security.
  • Java 11 is installed.
  • Maven is installed.
  • Eclipse is installed.
  • You are a registered user of BMC Helix Cloud Security.
  • You have installed the Cloud Security-SDK.jar file (attached to this page).
  • A Policy (.yaml) file is available in Cloud Security that contains a non-compliant resource to be remediated.
  • Java 11 is installed.
  • Maven is installed.
  • Eclipse is installed.

To install Java

Install OpenJDK 11.0.2

To set up a Maven project in Eclipse

  1. Create a Maven project in Eclipse.
  2. Add the cloudsecurity-sdk-java.jar dependency in the pom.xml file.

    For example:

    <dependency>
    <groupId>com.bmc.dem.caas</groupId>
    <artifactId>cloudsecurity-sdk-java</artifactId>
    <version>0.0.70</version>
    <scope>system</scope>
    <systemPath>${basedir}/lib/cloudsecurity-sdk-java.jar</systemPath>
    </dependency> 
  3. Add the cred.json file containing gateway details in the config directory.
    For example:

    image2019-9-9_14-7-48.png

Examples of creds.json files:

{
 "user": "QLVCR7nkHt6TqdSHchIU",
 "password": "****************",
 "endpoints": {
   "ifm": "https://bmchelix-cloudopsapi.onbmc.com"
 }
}

image2019-9-9_13-58-48.png

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*