I have an Web API OData
controller that is connected to an encrypted data source. I want to send data back to clients as encrypted but do not want get search/filter functionality from client. It is needed that client can query over data as like it is a not encrypted data. I mean client have not to encrypt search criteria then pass to odata.
I found no where better than type serializer to do this. I tried to customize it and encrypt data in that place. It works in some situations but not all situations. When odata is called directly in browser (not in client app) it does not work. when client decides to only get specific fields it does not work again.
Client will decrypt data when gets encrypted data from odata.
My question is it a correct place to inject my encryption mechanism? Is there any better solution?
Following shows what I am doing currently. I have asked also similar questions here, here, here, here and here, but did get an answer for my problem.