SAP-archive / SAPConversationalAI

✨ 🤖 🤖 Build your own conversational bot on our Collaborative Bot Platform! 🤖🤖 ✨
https://cai.tools.sap
284 stars 68 forks source link

Recast with On premise systems #147

Open boudhayan-dev opened 5 years ago

boudhayan-dev commented 5 years ago

We have a scenario where we are trying to communicate Recast to an On-premise system. Flow of the system is as follows -

SAP UI5 Application + embedded recast chatbot -> Middleware hosted on SAP Cloud Foundry ( public cloud) -> SAP Cloud Connector ( it's like reverse proxy) -> On Premise Odata Endpoints.

So, whenever a query is made to the chatbot, it calls a webhook API which is hosted on the public Cloud (SAP Cloud Foundry) and that in return calls the OData Backend services to fetch the relevant query results. The reason for doing this is, the Odata services are not publicly available so we have to make use of a middle ware to route this request and also there needs to be some additional processing of request parameters before the Odata is called.

Anyway, the connection seems to work fine. However, the problem arises when we need to authenticate the User. So to access the Odata we need a Username and Password which is same as the one used to log in to the UI . So the question is, once the user has logged in via his Username and Password in the UI, how do we propagate this information to the middleware and that in return calls the OData with that information ? Is it possible ?

NOTE: - The UI also makes use of the OData services. It does so by using App 2 App SSO . But now that we have introduced a middleware, how can we pass that user info to the Odata service ?