tryGetDestination() fails with "Failed to get destination" for NoAuthentication+IAS destination in subscriber tenant context
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 41
- Fork
- 33
- Merge medio
- 18h 34m
- PR unite (30g)
- 19
Descrizione
Describe the Bug
When calling DestinationAccessor.getLoader().tryGetDestination("OneSimAPI_Destination") in a subscriber tenant context, the SDK fails with "Failed to get destination." for a destination configured with
Authentication=NoAuthentication and IAS-based M2M properties (cloudsdk.ias-dependency-name, tokenService.body.url).
The same destination is successfully returned by DestinationService.getAllDestinationProperties() (metadata-only call). The failure happens only during the full resolution via tryGetDestination.
This works correctly for another tenant on the same landscape with the same destination configuration (same auth type, same dependency name, different tokenService.body.url).
Steps to Reproduce
- Configure a BTP destination in a subscriber subaccount with:
- Authentication: NoAuthentication
- cloudsdk.ias-dependency-name: sim-supplier-search-api
- tokenService.body.url: https://.accounts.ondemand.com
- Call DestinationAccessor.getLoader().tryGetDestination("OneSimAPI_Destination") in the context of the subscriber tenant
- Observe failure with "Failed to get destination."
Expected Behavior
tryGetDestination() should successfully resolve the destination. Since the auth type is NoAuthentication, the SDK should not attempt user token exchange. The destination should be returned with its properties so
our code can handle the IAS token fetch separately using the cloudsdk.ias-dependency-name and tokenService.body.url properties.
Screenshots
No response
Used Versions
- SAP Cloud SDK: 5.20.0
- Java: 21
- Spring Boot: 3.x
- Landscape: CF EU30 (prod)
Code Examples
// Our call in DestinationCallProcessor.java
private Try tryGetDestination(String destinationName) {
return DestinationAccessor.getLoader().tryGetDestination(destinationName);
}
Destination configuration (sensitive values removed):
{
"Name": "OneSimAPI_Destination",
"Type": "HTTP",
"Authentication": "NoAuthentication",
"ProxyType": "Internet",
"URL": "https://.prod-eu30.supplier-info-management.procurement.cloud.sap/api/ambassador-srv-api/v1",
"cloudsdk.ias-dependency-name": "sim-supplier-search-api",
"tokenService.body.url": "https://.accounts.ondemand.com"
}
Stack Trace
No response
Log File
Log file
...Affected Development Phase
Production
Impact
Blocked
Timeline
No response
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da DestinationAccessor.getLoader().tryGetDestination e confronta il relativo percorso di risoluzione con quello di DestinationService.getAllDestinationProperties(). Riproduci il caso di un subscriber-tenant usando le proprietà NoAuthentication e IAS indicate, quindi traccia il motivo per cui la risoluzione completa fallisce mentre i metadati vengono recuperati correttamente. Il lavoro è completato quando tryGetDestination restituisce la destination senza scambio del token utente e conserva le proprietà relative a IAS.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, spring-boot
- Ambito
- backend, cloud
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100