You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-java/environments/kyma.mdx
+70-6Lines changed: 70 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -586,7 +586,7 @@ The official [documentation of the Transparent Proxy](https://help.sap.com/docs/
586
586
587
587
You can either configure connectivity to individual destinations, or for arbitrary destinations in your destination service instance or subaccount (via Destination Gateway).
588
588
589
-
<Tabs
589
+
<Tabs
590
590
groupId="dynamic-dest"
591
591
defaultValue="single"
592
592
values={[
@@ -659,9 +659,22 @@ Apply the YAML with `kubectl apply -n` into the namespace of your application po
659
659
660
660
### Executing Requests
661
661
662
-
In your application you can now configure a destination to execute requests:
662
+
The SAP Cloud SDK offers two distinct approaches for executing requests through the Transparent Proxy in Kyma. Choose the approach that best fits your application's architecture and requirements.
The **TransparentProxyDestination Builder** approach provides explicit, fine-grained control over individual destination configurations. This is the recommended approach for most use cases as it offers maximum flexibility and clear configuration management.
667
+
668
+
### When to Use This Approach
669
+
670
+
- You need specific control over individual destination configurations
671
+
- You want to set custom headers or properties per destination
672
+
- You prefer explicit destination management
673
+
- You want to consume a destination with fragment or chain
674
+
675
+
### Implementation Examples
676
+
677
+
<Tabs
665
678
groupId="dynamic-dest"
666
679
defaultValue="single"
667
680
values={[
@@ -670,6 +683,10 @@ In your application you can now configure a destination to execute requests:
670
683
]}>
671
684
<TabItem value="single">
672
685
686
+
**For Concrete SAP Destinations:**
687
+
688
+
Use this when connecting to a specific, pre-configured destination with a dedicated Destination Custom Resource.
Use this when you need to connect to arbitrary destinations dynamically using a [Gateway Destination Custom Resource](https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/dynamic-lookup-of-destinations).
`<destination-custom-resource-namespace>`can be omitted if the destination custom resource is created in the same namespace as the application workload.
702
723
:::
703
724
704
-
The code above shows an example how you can then use the `destination` object to perform an OData request against the system.
725
+
## Approach 2: Transparent Proxy Loader
726
+
727
+
The **Transparent Proxy Loader** approach provides centralized proxy configuration where **all destination requests** are automatically routed through a single registered gateway without requiring explicit destination builders.
728
+
729
+
### When to Use This Approach
730
+
731
+
- You want all destinations to automatically route through a single [Dynamic Destination Custom Resource](https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/dynamic-lookup-of-destinations)
732
+
- You prefer a centralized, "set-it-and-forget-it" configuration approach
733
+
- You have many destinations that should all use the same proxy configuration
734
+
- You want to minimize code changes when migrating from traditional destination access
735
+
736
+
### Implementation Examples
737
+
738
+
**Step 1: Register the Transparent Proxy (typically during application startup):**
The provider tenant ID serves as a fallback when the current tenant cannot be accessed during destination preparation. This is particularly useful in scenarios where tenant information is not readily available, providing a default tenant for authentication and authorization purposes.
756
+
757
+
The SAP Cloud SDK automatically sets the current tenant ID during requests. The provider tenant ID is only used as a fallback when the current tenant cannot be accessed.
758
+
:::
759
+
760
+
**Step 2: Use destinations normally - they will automatically route through the registered proxy:**
761
+
762
+
```java
763
+
// All subsequent destination requests will be routed through the registered gateway
764
+
// No explicit TransparentProxyDestination creation needed
0 commit comments