cancel
Showing results for 
Search instead for 
Did you mean: 

mta extension descriptor - how to reference to a user provided service instance credential

yasar_p
Newcomer
0 Kudos
168

Hi,

To create a destination with the authentication type BasicAuth using an MTA extension descriptor, we want to reference and use the credential which is defined as a
user provided service instance.

We have a Java application running in SAP BTP Cloud Foundry and would like to extend the use case with an additional destination for specific target subaccounts.
We deploy the cloud application with SAP Cloud TMS and therefore use extension descriptors for specific configurations.
The idea is to define the destination configuration (service: destination, plan: lite) in the extension descriptor in the resources section.
At the moment the destination will use the Basic Auth authentication type and we will define username/password. Since the extension descriptor is in plain text,
we cannot define the password directly in the extension descriptor file.

How to reference and consume a credential, that is stored in a user provided service instance within an extension descriptor?

I followed the following help page but was not able to find a solution:
- https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/create-destinations-using-mta-descrip...
- https://help.sap.com/docs/btp/sap-business-technology-platform/service-keys

Here is a sample extension descriptor file, that I tried for my use case, which does not work via Cloud TMS deployment:
"Error merging descriptors: Unknown required dependency "service-key-1" for module "appmodule-1" in extension descriptor "

modules:
- name: appmodule-1
requires:
- name: service-key-1
parameters:
env-var-name: keycredentials
resources:
- name: service-key-1
type: org.cloudfoundry.existing-service-key
parameters:
service-name: service-a
- name: destinationservice-a
type: destination
parameters:
service: destination
service-plan: lite
config:
init_data:
subaccount:
destinations:
- Name: destination-a
Description: Desc destination-a
Authentication: BasicAuthentication
ProxyType: Internet
Type: HTTP
User: destauser
Password: <Here I want to refer to the credential of the already existing user provided service instance service-key-1>
URL: https://sap.com
existing_destinations_policy: ignore

Thanks for your support.

Regards,

Yasar

Accepted Solutions (0)

Answers (0)