Skip to content

Commit

Permalink
Test backend connectivity via approuter
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorwolf committed Feb 14, 2020
1 parent 24fa189 commit b6e0e21
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 11 deletions.
7 changes: 7 additions & 0 deletions app/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ <h2>Reading from Backend via Destination using Cloud SDK</h2>
<ul>
<li><a href="/catalog/Orders?$expand=EPMBusinessPartner">/catalog/Orders?$expand=EPMBusinessPartner</a></li>
</ul>

<h2>Reading from Backend via Destination directly</h2>
<ul>
<li><a href="/sap/public/ping">/sap/public/ping</a></li>
<li><a href="/sap/bc/ping">/sap/bc/ping</a></li>
<li><a href="/sap/opu/odata/sap/ZEPM_BP_SRV/EPMBusinessPartner">/sap/opu/odata/sap/ZEPM_BP_SRV/EPMBusinessPartner</a></li>
</ul>
<p><a href="/do/logout">Logout</a></p>
</body>

Expand Down
5 changes: 5 additions & 0 deletions app/xs-app.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"destination": "srv_api",
"csrfProtection": true
},
{
"source": "/sap/(.*)$",
"target": "/sap/$1",
"destination": "NPL"
},
{
"source": "^/app/logout.html$",
"localDir": "webapp",
Expand Down
24 changes: 16 additions & 8 deletions mta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ modules:
- name: epmbp-consumer-app-db-hdi-container
- name: epmbp-consumer-app-uaa
- name: epmbp-consumer-app-destination-service
- name: epmbp-consumer-app-connectivity-service

- name: epmbp-consumer-app-app
type: nodejs
Expand All @@ -41,14 +42,16 @@ modules:
memory: 256M
disk-quota: 1024M
requires:
- name: epmbp-consumer-app-uaa
- name: srv_api
group: destinations
properties:
forwardAuthToken: true
strictSSL: false
name: srv_api
url: ~{url}
- name: epmbp-consumer-app-destination-service
- name: epmbp-consumer-app-connectivity-service
- name: epmbp-consumer-app-uaa
- name: srv_api
group: destinations
properties:
forwardAuthToken: true
strictSSL: false
name: srv_api
url: ~{url}

resources:
- name: epmbp-consumer-app-db-hdi-container
Expand All @@ -67,4 +70,9 @@ resources:
parameters:
service-plan: lite
service: destination
type: org.cloudfoundry.managed-service
- name: epmbp-consumer-app-connectivity-service
parameters:
service-plan: lite
service: connectivity
type: org.cloudfoundry.managed-service
19 changes: 16 additions & 3 deletions xs-security.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
{
"xsappname": "epmbp-consumer-app",
"tenant-mode": "dedicated",
"scopes": [],
"attributes": [],
"role-templates": []
"description": "Security profile of called application",
"scopes": [
{
"name": "uaa.user",
"description": "UAA"
}
],
"role-templates": [
{
"name": "Token_Exchange",
"description": "UAA",
"scope-references": [
"uaa.user"
]
}
]
}

0 comments on commit b6e0e21

Please sign in to comment.