I am posting this in the hope of getting some feedback / tips and information about what I struggled with in the last few days. First, Iβll briefly talk about the project.
There are 2 applications in the solution:
WebAPI Resource and Authorization Server - Uses OWIN (hosted in IIS) and the ASP.NET identifier to issue an authentication token when logged in correctly and then resolves requests to various controllers.
MVC client application . There is no authorization yet (I wonβt find out yet), but it will call the WebAPI resource server to get all the data. These calls will be made only from the actions of the controllers in the client application, without AJAX calls on the client side.
The client application does not have its own data source. All information is stored in a database that the WebAPI service has access to, so if they provide the correct credentials and the client application receives the carrier token, I need to provide a way for the application to see them as authorized.
- What is the best way to handle this?
- Can I configure OWIN on the client side to use OAuth server settings? Am I barking the wrong tree and do I just need to use HTTPClients?
- Can I deserialize the carrier token and save it in the session, and then write my own authorization providers to check them on the client side?
My initial fears are that I am abusing the carrier tokens and trying to push them into a solution that is not ideal. All examples of external authorization that I have found so far usually include calls to providers hosted on Google / Facebook / Twitter to check which of them are who they say, and then proceeds to create a user record in their system. My application cannot do this.
Regarding security, I planned to introduce filters that would confirm that the request came from the client application, providing an identifier and a secret, along with an IP check.
I understand that this may be a little open, but I would appreciate any advice. The scope of the project is that the web service is only to have access to the database. The MVC client application will be hosted on another server, and the service will only accept requests from the specified client application.
source share