How to protect JSON API from being accessed by anyone but my iOS client?

Evgenii

I have an iPhone app that uses a Rails server HTTP API. The API is public at this point - no authorisation is required to get the data.

Currently anyone can go to API's URL and download the data.

http://server.com/mydata

The data is not very sensitive. But I still want to prevent people from easily getting it. What are the ways of doing that? I do not want iOS app users to log in either.

Current solution I have

iPhone app adds a secret token to the HTTP header or query of the request. The data goes over HTTPS.

https://server.com/mydata?secret=my_secret

Is there a better approach?

aussiegeek

You could try an approach where the client is only allowed X number of requests per time period (based on IP address or username)

HTTPS is extremely easy to man in the middle on a device you control. You can do SSL cert validation, but there is always someone out there with more time, so best off to handle it server side.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to protect my Javascript from being accessed by other parties?

From Dev

How to protect my Javascript from being accessed by other parties?

From Dev

how would you protect a file from being downloaded by anyone not logged in on a Yii2 project?

From Dev

Authenticate on client side, How to protect my Java Rest API now?

From Dev

Authenticate on client side, How to protect my Java Rest API now?

From Dev

Protect PDF docs from being directly accessed in URL

From Dev

Will this approach protect my database from being modified?

From Dev

How to protect Access Token sent to Client during Implicit Grant flow from being hijacked?

From Dev

How to protect columns in hibernate from being read

From Dev

How to protect bash function from being overridden?

From Dev

Java anti-hacking. How protect .class file from being changed in my jar

From Dev

How do I make my backspace key functional in a bash script for Linux being accessed remotely from Windows?

From Dev

Will sandboxing a program protect my computer from being damaged?

From Dev

How to hide individual XPages from being accessed from a webbrowser

From Dev

How can I protect my WebAPI from abuse and avoid sharing API keys?

From Dev

How can I protect a matrix in R from being altered by Rcpp?

From Dev

How can I protect sqlite db in android from being stolen

From Dev

How can i protect a property from being overwritten

From Dev

How to Protect Windows OS Image From Being Copied?

From Dev

Value in JSON Object not being accessed

From Dev

Android SharedPreference JSON not being accessed

From Dev

protect images from being copied

From Dev

How can I prevent this script from being freely accessed?

From Dev

How can I prevent this script from being freely accessed?

From Dev

C# - How to lock a method from being accessed by multiple process

From Dev

How to differentiate between JSON Web Tokens from API partner or tokens from my own front-end client?

From Dev

How to protect my network?

From Dev

How can I protect my Kloudless API Key and Account ID?

From Dev

How can I protect my Kloudless API Key and Account ID?

Related Related

  1. 1

    How to protect my Javascript from being accessed by other parties?

  2. 2

    How to protect my Javascript from being accessed by other parties?

  3. 3

    how would you protect a file from being downloaded by anyone not logged in on a Yii2 project?

  4. 4

    Authenticate on client side, How to protect my Java Rest API now?

  5. 5

    Authenticate on client side, How to protect my Java Rest API now?

  6. 6

    Protect PDF docs from being directly accessed in URL

  7. 7

    Will this approach protect my database from being modified?

  8. 8

    How to protect Access Token sent to Client during Implicit Grant flow from being hijacked?

  9. 9

    How to protect columns in hibernate from being read

  10. 10

    How to protect bash function from being overridden?

  11. 11

    Java anti-hacking. How protect .class file from being changed in my jar

  12. 12

    How do I make my backspace key functional in a bash script for Linux being accessed remotely from Windows?

  13. 13

    Will sandboxing a program protect my computer from being damaged?

  14. 14

    How to hide individual XPages from being accessed from a webbrowser

  15. 15

    How can I protect my WebAPI from abuse and avoid sharing API keys?

  16. 16

    How can I protect a matrix in R from being altered by Rcpp?

  17. 17

    How can I protect sqlite db in android from being stolen

  18. 18

    How can i protect a property from being overwritten

  19. 19

    How to Protect Windows OS Image From Being Copied?

  20. 20

    Value in JSON Object not being accessed

  21. 21

    Android SharedPreference JSON not being accessed

  22. 22

    protect images from being copied

  23. 23

    How can I prevent this script from being freely accessed?

  24. 24

    How can I prevent this script from being freely accessed?

  25. 25

    C# - How to lock a method from being accessed by multiple process

  26. 26

    How to differentiate between JSON Web Tokens from API partner or tokens from my own front-end client?

  27. 27

    How to protect my network?

  28. 28

    How can I protect my Kloudless API Key and Account ID?

  29. 29

    How can I protect my Kloudless API Key and Account ID?

HotTag

Archive