on 2022 Jul 27 9:30 PM
Hello all,
As the title suggests, I'm looking for guidance on how to access destinations defined in the provider subaccount via the approuter in a multitenant application.
As a refresher, here are what I understand to be the 3 levels of destinations within SAP BTP deployed multitenant app, ordered from least specific, to most specific:
*This is my interpretation of official documentation: Multitenancy in the Destination Service.
Now my initial understanding of these levels is that the progression of locating a destination via the API would progress such that it checks the Subscriber Subaccount level first, then the Service Instance level next and finally the Provider Subaccount Level.
While testing this out using the Destination API within a tenant security context, I found that neither the Service Instance Level nor Provider Subaccount Level are taken into account. Indeed, if I access the API without a tenant context it can load these two destination sources just fine.
Now if I was writing this code by hand I'd know that as a fallback I'd just need to hit the API once more with the tenant context removed but as it stands now I'm relying on the `@sap/approuter` npm package to handle locating destination which means these potentially cross-subscriber destinations are inaccessible.
As a workaround I've just defined the destination in all subscriber subaccounts but this leads to a massive duplication of defined destinations and much more maintenance overhead as it involves keeping credentials in sync across all subscriber subaccounts. I suppose another alternative would be to modify the app environment variables to set the destination manually there but I really believe the cleanest way to handle this would be via a single destination defined in the provider subaccount.
I appreciate any advice that people can offer on this.
*** Edit
According to the docs, this should be possible by using the `preferLocal` option in the xs-app.json file but I'm having trouble confirming this. From the README file:
Thanks,
Brian
The issue was solved with approuter version 11.3.3
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.