SAP-archive / cloud-bulletinboard-ads

This is the bulletinboard-ads sample application code used in the openSAP course: Cloud-Native Development with SAP Business Technology Platform (formerly SAP Cloud Platform).
Apache License 2.0
76 stars 99 forks source link

How is the privateKey.txt generated in Exercise 24 ? #15

Closed boudhayan-dev closed 5 years ago

boudhayan-dev commented 5 years ago

Hi,

I understand that the publicKey.txt is obtained from the VCAP_SER VICES. But I could not find the private key under it. How was that generated ?

nenaraab commented 5 years ago

Dear Boudhayan,

for testing purposes it is explained here.

In productive environments the XSUAA service signs the token with a private key.

Thanks and best regards, Nena

boudhayan-dev commented 5 years ago

Hi @nenaraab ,

I have taken a look but I could not find details about the generation of the Private Key. In the Readme -

Create folder cc-bulletinboard-ads/src/test/resources and copy the files privateKey.txt, publicKey.txt into the new folder.

Here, it just says copy the private key from the privateKey.txt file . I want to know, how is that private Key generated ? For the public key, I can check the VCAP_SERVICES of the deployed app and find it. Is there a way to find the Private Key as well ?

nenaraab commented 5 years ago

Hi @boudhayan-dev this is easy to explain. We have generated a private/public key pair

hope that answers your question?

boudhayan-dev commented 5 years ago

Hi @nenaraab ,

Thanks , that explains. I could generate my own Key-Value pair and use it for local testing.