BACon User Guide

BACon User Guide


The Mirata Backend Action Connector or (BACon) is an SAP Business Technology Platform (BTP) Cloud Foundry (CF) environment application implemented using the SAP Cloud SDK for JavaScript.
  1. Configuring the BTP Environment for BACon
  2. Installing or Updating BACon 
    1. Prerequisites
    2.     Installing BACon
    3. Updating BACon
    4.     Provide BACon XSUAA Configuration Data to Mirata
  3. Configuring the Mirata Admin Tool to connect to BACon

Configuring the BTP Environment for BACon

A trust configuration must be established to the BTP IAS service in the subaccount that will be the target of the BACon installation.

Instructions on enabling the IAS service and defining the service user’s credential can be found here https://help.sap.com/docs/identity-authentication

Installing or Updating BACon

Prerequisites

  1. The individual who installs BACon must be a member of the target BTP subaccount (i.e.- organization) and space with assigned role(s) that allow for the creation of BTP applications and services
  2. Install the CloudFoundry (CF) CLI v8 for the operating system of choice (MacOS, Windows, Linux) from https://docs.cloudfoundry.org/cf-cli/install-go-cli.html
  3. Use the web-based SAP BTP Cockpit to access the target BTP subaccount, then copy the assigned “API Endpoint URL”:

  1. Use CF CLI to authenticate with BTP. The first time you use CF CLI, you must provide the API Endpoint URL using the “-a” parameter:

cf login -a "https://......hana.ondemand.com"

CF CLI continues to use this value for subsequent logins until a different API Endpoint URL is provided.

  1. If the user is a member of multiple BTP subaccounts, CF CLI prompts to select the target subaccount. If the specified subaccount has multiple spaces that the user is a member of, CF CLI prompts to select the target space. Once you login with CF CLI, your authentication will be valid for a 24-hour period.

Installing BACon

Follow these steps if BACon is not yet installed in the target BTP account.

  1. Expand bacon.zip
  2. Edit the forms-bacon-destination.config.json file to provide the following details for the SAP Server destination:
  1. Name - Uniquely identifies an entry in this file. The default value provided may be changed. However, the value entered cannot contain any space characters. Note that the value entered must match the destination value in the vars.yml file (see below).
  2. Description - A description of the target SAP server.
  3. CloudConnectorLocationId - This value can be obtained from the “Cloud Connectors” tab on the BTP Organization administration screen.

  1. URL - This is the SAP Server URL exposed by Cloud Connector. This value can be obtained from the “Cloud Connectors” tab on the BTP Organization administration screen. Note that the IP address entered must be prefaced with “http://

  1. User - See note below.
  2. Password - See note below.
  3. Client - This is the number of the target client on the destination SAP server.

Note the Name value in this file must match the destination value in the vars.yml file below.

Tip the Name value in this file cannot contain spaces.

The User and Password values are the username and password of the “Service User” that will authenticate with the SAP Server to execute the Mirata SAP-based backend action on behalf of the Mirata user. This user’s credentials must be configured in the BTP Identity Authentication Service (IAS) associated with the target BTP Organization. This service is not enabled by default in BTP accounts.

The values provided for the remaining parameters in this file should not be modified.

  1. Edit the vars.yml file to provide the following values:
  1. sap_security_session_timeout - The value this parameter must match the value assigned to the http/security_session_timeout profile parameter on the target SAP Server, which can be obtained using the RZ11 transaction code (this value is in seconds).
  2. trust_config_origin_key - This value must match the “Origin Key” value of the IdP that defines the Service User’s credentials, which can be obtained from the “Trust Configuration” tab of the BTP Subaccount administration screen where BACon is being installed.

The other values provided in the vars.yml do not need to be modified, but this is what they mean:

  1. memory - The memory limit of the app instance. The target subaccount must have enough memory available to fulfill this memory requirement.
  2. disk_quota - Disk space allocated for the app instance.
  3. port - The port the BACon application listens on.

Note the destination value in this vars.yml file must match the value of the Name property in the forms-bacon-destination.config.json file.

  1. Execute the install.sh script (or install.cmd if running on Windows)

The BTP app will be deployed and a random Application Route URL assigned to it. This URL will be needed when configuring Mirata’s connection to BACon, and it can be found in this page in BTP:

After the app is installed, running cf logs forms-bacon will connect to the logging output for the BTP app and provide details on what’s going on.

Updating BACon

Follow these steps if you are updating an existing BACon installation with a new version of BACon, or you need to modify a BACon run-time configuration parameter (by editing the vars.yml file).

  1. Expand bacon.zip
  2. Update the vars.yml as needed.
  3. Execute the update.sh script (or update.cmd if running on Windows)

Provide BACon XSUAA Configuration Data to Mirata

Once the BACon application has been configured and installed in your SAP BTP subaccount space, a "trust relationship" must be established between the BACon XSUAA service and the Mirata Identity Provider (IdP). To establish this trust relationship, configuration data from the BACon XSUAA instance must be obtained and provided to Mirata Support as follows:

  1. Navigate to the home page of the BTP subaccount space that hosts the BACon application
  2. Select the Instances (vertical) tab
  3. In the Service Instances table row for the forms-xsuaa instance, select the 1 binding; 1 key  hyperlink in the Credentials column
  4. In the resulting Credentials window, ensure that the Form tab is selected
  5. Copy and temporarily record the values of the following fields...
    1. clientid
    2. clientsecret
    3. url
  1. Securely communicate this BACon XSUAA configuration data to Mirata Support.

Configuring the Mirata Admin Tool to connect to BACon

Add a new Connection under Admin with the following details:

  1. Connection Type - SAP
  2. URL - The URL from the Application Routes value found on BTP Application Overview page for the BACon app.
  3. Authentication Type - External Token
  4. Success Code List - Add all the 200-s

Add new Backend Actions with the following Details:

  1. Action Request Type - HTTP Request

And then, in the Request tab:

  1. Connection Info - The connection created above.
  2. Request Type - POST
  3. URL Path - This is the path into the destination's SAP OData API. For example, if URL Path is set to FormSet/, then the SAP request will be routed to /sap/opu/odata/MIRATA/ODATA_SRV/FormSet/
  4. Body Type - JSON

The request body is the SAP Query that will be passed “as-is” to SAP

The newly created action can be tested by using “Run Test” in the “Test” tab