简体   繁体   English

如何保护 web API 数据?

[英]How to secure web API data?

I have a web server with API in PHP and clients applications in Python.我有一个 web 服务器,PHP 中有 API 和 ZA7F5F35426B927411FC92317B 中的客户端应用程序Client application sends an request to the server with informations like what OS is client using or what services are running on his computer.客户端应用程序向服务器发送请求,其中包含客户端使用的操作系统或他的计算机上正在运行的服务等信息。 The HTTP POST request can look like: HTTP POST 请求可能如下所示:

POST http://www.example.com/users/info发布 http://www.example.com/users/info

And POST data like:并发布数据,例如:

{
  "os": "Windows 10",
  "services": [
    "chrome.exe",
    "firefox.exe",
    "calc.exe"
  ]
}

I want only my application to be able to send that requests.我只希望我的应用程序能够发送该请求。 How can I secure this data against self user manipulation?如何保护这些数据免受用户自我操纵?

Im using HTTPS requests to protect data but Im sure its not enough.我使用 HTTPS 请求来保护数据,但我确定这还不够。

If the application is in Python, and any user can read the source code, then anyone who knows Python - and has access to the source code - can spoof requests to your server.如果应用程序位于 Python 中,并且任何用户都可以阅读源代码,那么任何知道 Python 并有权访问源代码的人都可以欺骗对您服务器的请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM