To use a service instance from an external application or an application deployed in another space, you need to create a service key.
-
You've created a service instance for SAP Credential Store.
-
You've downloaded and installed the Cloud Foundry command line interface (cf CLI).
Unlike service bindings that are used to automatically generate credentials, service keys are used to manually configure credentials. Once you configure a service key for your SAP Credential Store, the service instance can be accessible by external applications or applications deployed in another space. For more information, see: Service Keys
You can create a service key in two ways:
-
By using cf CLI. Execute:
cf create-service-key mycredstore myservicekey -
SAP BTP cockpit. To learn how, see the procedure below.
For newly created service keys, the default validity is 60 days. This applies to service instances with all types of authentication (
basic,mtls,oauth:key, andoauth:mtls).If you want to change the service key validity, go to the service instance and choose Credential Store > Settings > Edit Configuration > Binding Validity.
-
In the SAP BTP cockpit, navigate to your subaccount and space.
-
From the left-side navigation menu, choose Services > Instances.
-
Select a Credential Store instance.
-
From the left-side navigation menu, choose Service Keys.
-
Choose Create Service Key.
-
Enter a name for the new service key.
-
(Optional) Define configuration parameters in JSON format for this service key.
The parameters are the same as in step 5 in task Bind a Service Instance.
-
Choose Save. The service key is created.
The relevant properties in the VCAP_SERVICES environment variable are the same as the ones described in Bind a Service Instance: Next Steps.
-
To download a service key, choose (Save JSON to file).
-
To delete an obsolete service key, choose (Delete Service Key).
Related Information