How Can I Secure My Web API Against Unauthorized Access Even with Authentication?

0
3
Asked By CleverPineapple123 On

I'm working on a project where I've got encrypted JSON data stored on the client's PC. I developed a service that reads this JSON and sends requests to my Web API to retrieve decrypted data. My goal is to prevent competitors from accessing this JSON data, which details the flow of my application's instructions. However, I'm facing a challenge: even with an authentication token, rivals can still send requests to my API and access the decrypted information. I'm looking for suggestions on how to effectively block other programs from making valid requests to my API, even if they have the auth token.

5 Answers

Answered By CuriousOtter33 On

As tough as this sounds, protecting the data on the client side is inherently risky. You could look into envelope encryption where the client generates a temporary key to handle decryption on the fly. Just remember, anything that runs on the client side can potentially be exposed. The best defense is often to keep sensitive logic server-side.

Answered By SneakyFox88 On

You might think about implementing IP blocking for authorized clients, but as others pointed out, if a rival runs software on the same machine, they could still mimic your service's API calls. The real answer might be restructuring your application so that sensitive operations happen on the server, keeping the client app less vulnerable.

Answered By FriendlyHedgehog99 On

Your project seems interesting, but to be real, if someone has access to the client PC, they could find a way to exploit it. Focusing on detecting unauthorized access and adding measures like session invalidation for reused tokens might give you more peace of mind than focusing solely on obstruction.

Answered By WittyTurtle45 On

Honestly, it's tough to completely prevent others from accessing your data once they're determined enough. While you can make it more complicated for rivals to retrieve data, there’s no foolproof way to stop them if they have a legitimate access path. Maybe consider server-side decryption with strict rate limits on API usage. It won't stop everyone, but it can make things more challenging for unauthorized users.

Answered By BraveSquirrel77 On

I feel you on this concern, but you have to remember that no matter what security measure you implement, a skilled developer could reverse-engineer your application. Instead of just focusing on protecting the data, you might want to think about making the API workflow more complex with elements like one-time tokens to validate requests.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.