cancel
Showing results for 
Search instead for 
Did you mean: 

CAP APP with seperate destinations for PrinciplePropagation and technical User

MR3
Explorer
309

I develop a java cap app. The app consumes also some remote services.

The access to the app is possible by a FIORI UI using destination PrinciplePropagation.

We would also use a technical user to access and do some requests with remote calls.

How we should configure it that the remote services are using the correct destionations? Or just we have missunderstood the mechanics?

For fiori we added destinations in the mta.yaml

parameters:
content:
subaccount: # Create Destination for HTML5 Apps (subaccount | instance)
existing_destinations_policy: update
destinations:
- Name: enrichment-api
Description: OAuth OData Service for Processing API
URL: ~{srv-api/srv-url}
Authentication: OAuth2UserTokenExchange
TokenServiceInstanceName: enrichment-api-xsuaa-srvc
TokenServiceKeyName: enrichment-api-uaa-key
HTML5.Timeout: 300001

for destination service we define two destinations .

resources:
  - name: enrichment-api-destination-srvc
    parameters:
      config:
        init_data:
          instance:
            destinations:
              - Authentication: PrincipalPropagation
                Name: s4_user_enrichment
                Description: "Destination to S4-OnPremise with PrinciplePropagation"
                ProxyType: OnPremise
                Type: HTTP
                URL: $S4_URL
                CloudConnectorLocationId: TESTID
                sap-client: 200
              - Authentication: BasicAuthentication
                Name: s4_techuser_enrichment
                Description: "Destination for Enrichment API to S4-OnPremise with BasicAuth technical user"
                ProxyType: OnPremise
                Type: HTTP
                URL: $S4_URL
                CloudConnectorLocationId: TESTID
                User: $S4_TECH_USER
                Password: $S4_TECH_USER_PASS
                sap-client: 200
            # fail |ignore | update
            existing_destinations_policy: update
        version: 1.0.0<br>

application-cloud.yaml with on remote service . Here with the destination for a technical user

cds:
remote.services:
- name: "API_BUSINESS_PARTNER"
destination:
name: "s4_techuser_enrichment"
suffix: "/sap/opu/odata/sap"
type: "odata-v2"

Accepted Solutions (0)

Answers (0)