Skip to content

Commit

Permalink
docs(java): Link Spring Boot's "environment variable" documentation (#…
Browse files Browse the repository at this point in the history
…1350)

The section shows an environment variable, which was intended to be
mapped to `cds.remote.services.OtherCapService.binding.options.url`, but
was missing the `binding` part.

This commit fixes the example, and additionally links to Spring Boot's
documentation, which is the underlying mechanism.

---------

Co-authored-by: René Jeglinsky <[email protected]>
  • Loading branch information
bugwelle and renejeglinsky authored Oct 18, 2024
1 parent c0d9a4d commit 2c391df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions java/cqn-services/remote-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,12 @@ cds:
:::

The plain service binding of XSUAA or IAS does not contain the URL of the remote API. Therefore, it needs to be explicitly configured in the `options` section.
As the URL is typically not known at development time, it can be alternatively defined as an environment variable `CDS_REMOTE_SERVICES_<name>_OPTIONS_URL`.
Since the URL is typically not known during development, you can define it as an environment variable. For the previous example, use `CDS_REMOTE_SERVICES_OTHERCAPSERVICE_BINDING_OPTIONS_URL`.

[Learn more about Binding From Environment Variables in the Spring Boot documentation.](https://docs.spring.io/spring-boot/reference/features/external-config.html#features.external-config.typesafe-configuration-properties.relaxed-binding.environment-variables){.learn-more}

:::tip
Remote APIs which require IAS-based authentication might expect certificate based client authentication in addition to the IAS-based JWT token (ie. [proof-of-possession](https://github.com/SAP/cloud-security-services-integration-library/tree/main/java-security#proofofpossession-validation)).
Remote APIs which require IAS-based authentication might expect certificate based client authentication in addition to the IAS-based JWT token, see [ProofOfPossession validation](https://github.com/SAP/cloud-security-services-integration-library/tree/main/java-security#proofofpossession-validation).
CAP _Remote Services_ automatically takes care of this by initiating a mutual TLS handshake with the remote API.
:::

Expand Down

0 comments on commit 2c391df

Please sign in to comment.