Here's what we're trying to do:
Our react SPA is calling the API of a 3rd party ASP.NET application running in the user's intranet. The user authenticates against the application using his AD credentials. The current API returns paths to local (intranet) files and resources (among other data, of course). We should allow the users of our webapp to download/open these files from their browser.
As accessing the path from the browser directly (<a href="file://share/my/folder/myfile.pdf"> Open </a>
) does not work due to security reasons, the only way I can think of is to request a new API endpoint from the 3rd party to read the file in the backend and stream it. But as I'm not familiar with .NET and IIS, I don't know if it's possible to read the file with the permissions of the currently logged in user. I read about impersonation & delegation but couldn't figure out if it would work in our case and whether it's safe to use. Can it be used for this operation only, without affecting the rest of the API?
To sum up: Is it reasonable to request this from the backend? Or is there an alternative that we can implement in the frontend?