lundi 7 février 2022

How to securely send request from frontend to backend and make it non replay-able?

I am trying something out in Springboot and stuck with a weird issue where I want to send some data from my frontend (react app) to backend (SpringBoot) and make that request non replay able by users (users should not be able to capture the request and make the request again and again).

Problem: I am writing some sample app which is making REST calls to a 3rd party API and I want to capture the matrices for my app. A few things about my app.

  1. Frontend calls this 3rd party API directly and this API is somewhat time consuming
  2. There is no communication between 3rd Party API and my backend and there can't be
  3. 3rd party API does not provide any way to capture matrices

Solution: I can create an endpoint at my backend and collect matrices (execution time of 3rd Party API etc) at frontend and send to backend

But with this solution there is a huge issue, any valid user can intercept that call to backend to update the matrices and play around with it and pollute the numbers.

Is there any standard way to deal with this kind of problem or any other smart way to capture the matrices for my use case?

Aucun commentaire:

Enregistrer un commentaire