cds add xsuaa --for production

This commit is contained in:
Johannes Vogt
2025-03-21 16:52:51 +01:00
parent dca837e595
commit 39335c8c9b
4 changed files with 72 additions and 49 deletions

View File

@@ -27,6 +27,7 @@ modules:
srv-url: ${default-url} srv-url: ${default-url}
requires: requires:
- name: samples-db - name: samples-db
- name: samples-auth
- name: samples-db-deployer - name: samples-db-deployer
type: hdb type: hdb
@@ -44,24 +45,25 @@ modules:
disk-quota: 256M disk-quota: 256M
memory: 256M memory: 256M
requires: requires:
- name: orders-api - name: orders-api
group: destinations group: destinations
properties: properties:
name: orders-api name: orders-api
url: ~{srv-url} url: ~{srv-url}
forwardAuthToken: true forwardAuthToken: true
- name: reviews-api - name: reviews-api
group: destinations group: destinations
properties: properties:
name: reviews-api name: reviews-api
url: ~{srv-url} url: ~{srv-url}
forwardAuthToken: true forwardAuthToken: true
- name: bookstore-api - name: bookstore-api
group: destinations group: destinations
properties: properties:
name: bookstore-api name: bookstore-api
url: ~{srv-url} url: ~{srv-url}
forwardAuthToken: true forwardAuthToken: true
- name: samples-auth
provides: provides:
- name: app-api - name: app-api
properties: properties:
@@ -74,3 +76,12 @@ resources:
parameters: parameters:
service: hana service: hana
service-plan: hdi-shared service-plan: hdi-shared
- name: samples-auth
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: application
path: ./xs-security.json
config:
xsappname: samples-${org}-${space}
tenant-mode: dedicated

View File

@@ -6,7 +6,8 @@
"author": "daniel.hutzel@sap.com", "author": "daniel.hutzel@sap.com",
"dependencies": { "dependencies": {
"@sap/cds": ">=8", "@sap/cds": ">=8",
"@cap-js/hana": "^1" "@cap-js/hana": "^1",
"@sap/xssec": "^4"
}, },
"workspaces": [ "workspaces": [
"./bookshop", "./bookshop",
@@ -44,6 +45,11 @@
"cds": { "cds": {
"sql": { "sql": {
"native_hana_associations": false "native_hana_associations": false
},
"requires": {
"[production]": {
"auth": "xsuaa"
}
} }
} }
} }

6
xs-security.json Normal file
View File

@@ -0,0 +1,6 @@
{
"scopes": [],
"attributes": [],
"role-templates": [],
"authorities-inheritance": false
}