We have a use case where a bunch of data needs to be posted from our application to a partner site where the end user takes some actions and then returns back to our site. On the return, the partner site also posts some data back to us. We need to establish trust for both the redirects.. i.e. the partner site needs to confirm that the data is originated at our end and hasn't been modified during the transmission nd the same applies for post back from partner site. Our main constraint is that it should be a low cost solution for our partners. Our application is a multi-tenanted app with various partners (dozens). The usecase is applicable for all of them.

One option we looked at is a two step process, where our site posts a unique transaction id to the partner site which then calls a webservice hosted by us to get the complete data. We can secure our webservice using 2-way SSL auth and same goes for the data from the partner site. But the problem with the extra cost involved in creating a webservice at each partner end. This would delay the onboarding of a new partner and increase the cost.

Are there other alternatives to this problem than the PKI based solution?


Use something like JWT, where a shared secret is used to sign and to verify the data

If the signature the valid the other service can trust the data, and if the signature on the response is valid you can know that the response is valid too.

it may be worth-while using different secrets for each hop

You may need to implement serial numbers in addition to this to prevent replay acttacks.


Implement a service on your side only.

You provide user with a token for a partner.

When user is redirected to the partner, partner backend calls your service to "poll" needed data. This has 2 advantages: 1) Partner receives data directly from your service. Means user cannot manipulate these data. 2) Partner doesn't need to implement any service. They only implement a client that calls your service. Thus only your service need SSL and certificate, and integration can be much easier than in other cases.

Before user is redirected to your service again, the partner "posts" needed data to your service. Again: 1) Data cannot be manipulated by the user. 2) Service is needed only on your side.

Thus, you implement 2 service end points on your side. This is an effort and costs. But this needs to be done only once and can be used by all clients. Then you can integrate as many clients as you want. Clients don't need to implement any services and can be integrated easy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.