sap-tutorials / Tutorials

Tutorials on sap.com
https://developers.sap.com/tutorial-navigator.html
Creative Commons Attribution 4.0 International
692 stars 766 forks source link

Secure Your Application on SAP Business Technology Platform Cloud Foundry #23577

Open JHopmann opened 1 month ago

JHopmann commented 1 month ago

Tutorials: https://developers.sap.com/tutorials/s4sdk-secure-cloudfoundry.html

Hi there, just in case somebody can improve the content of this tutorial:

In section 5: Protect your backend microservice. The following text was found:


Also enhance your manifest.yml file by adding an environment variable and a service binding for the XSUAA service instance:```diff env:TARGET_RUNTIME: mainSPRING_PROFILES_ACTIVE: ‘cloud’JBP_CONFIG_SAPJVM_MEMORY_SIZES: ‘metaspace:128m..’JBP_CONFIG_COMPONENTS: ‘jres: [‘‘com.sap.xs.java.buildpack.jre.SAPMachineJRE’’]’JBP_CONFIG_SAP_MACHINE_JRE: ‘{ use_offline_repository: false, version: 17.0.5 }’

xsuaa_connectivity_instance_name: my-xsuaa services: my-xsuaa my-destination```

I was not able to identify what the author meant with this. It is somehow "corrupted" text. So I ignored and by following this tutorial step-by-step, I found it not working for some unknown reason. (Sometimes I wonder: Did someone ever followed this tutorial step-by-step ever???, Well I did...Thank you for this..! Yes)

I think the author wanted to tell us: "Please make sure you have the following lines exactly indented as this in your manifest.yml: (Because YAML get's it's syntax also by indentation. Feels like the 80s :-/ ... but tht's a different topic)

env: TARGET_RUNTIME: main SPRING_PROFILES_ACTIVE: 'cloud' JBP_CONFIG_SAPJVM_MEMORY_SIZES: 'metaspace:128m..' JBP_CONFIG_COMPONENTS: 'jres: [''com.sap.xs.java.buildpack.jre.SAPMachineJRE'']' JBP_CONFIG_SAP_MACHINE_JRE: '{ use_offline_repository: false, version: 17.0.5 }' xsuaa_connectivity_instance_name: 'my-xsuaa'

services:

  • my-xsuaa
  • my-destination

Remarks: I had some trouble with the service my-destination while pushing it to the cloud:

env:
  JBP_CONFIG_COMPONENTS: 'jres: [''com.sap.xs.java.buildpack.jre.SAPMachineJRE'']'
  JBP_CONFIG_SAP_MACHINE_JRE: '{ use_offline_repository: false, version: 17.0.5 }'
  JBP_CONFIG_SAPJVM_MEMORY_SIZES: metaspace:128m..
  SPRING_PROFILES_ACTIVE: cloud
  TARGET_RUNTIME: main
  xsuaa_connectivity_instance_name: my-xsuaa
services:
  my-xsuaa
    • my-destination For application 'BTPserver': Service instance 'my-destination' not found FAILED

I commented it again start searching what this service is all about. Maybe somebody can help?

Kindest regards Jörg Hopmann