Skip to content

Latest commit

 

History

History
85 lines (40 loc) · 3.43 KB

File metadata and controls

85 lines (40 loc) · 3.43 KB

Create, Download, and Delete a Service Key

To use a service instance from an external application or an application deployed in another space, you need to create a service key.

Context

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:

    Example:

    cf create-service-key mycredstore myservicekey
    
  • SAP BTP cockpit. To learn how, see the procedure below.

Note:

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, and oauth:mtls).

If you want to change the service key validity, go to the service instance and choose Credential Store > Settings > Edit Configuration > Binding Validity.

Procedure

  1. In the SAP BTP cockpit, navigate to your subaccount and space.

  2. From the left-side navigation menu, choose Services > Instances.

  3. Select a Credential Store instance.

  4. From the left-side navigation menu, choose Service Keys.

  5. Choose Create Service Key.

  6. Enter a name for the new service key.

  7. (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.

  8. Choose Save. The service key is created.

    Tip:

    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

Bind a Service Instance

Cloud Foundry: VCAP_SERVICES