繁中版| 简中版| العربية | azərbaycan| বাংলা| català| čeština|德意志| εληνικά| Español| فف| Français| हिंदी|印度尼西亚| Italiano | 日本语| 한국어| ພາສາລາວ| lim lim | | മലയാളം|聚| Nederlands | Polski |葡萄牙(巴西)| n ไทย| Türkçe| Y时间tiếngviệt| π了
在设计,测试和发布API时,最重要的安全对策清单的清单。
Basic Auth
。改用标准身份验证(例如JWT)。 Authentication
, token generation
, password storage
重新发明轮子。使用标准。 Max Retry
和监狱功能。 JWT Secret
)使野蛮人非常迫使令牌。 HS256
或RS256
)。 RTTL
TTL
。 HSTS
标题避免SSL带攻击。 redirect_uri
服务器端,以仅允许安全的URL。 response_type=token
)。 state
参数来防止在OAUTH授权过程中进行CSRF。 GET (read)
, POST (create)
, PUT/PATCH (replace/update)
,然后DELETE (to delete a record)
,如果请求的方法为ISN,则405 Method Not Allowed
适用于请求的资源。 content-type
接受标题(内容协商)仅允许您的支持格式(例如, application/xml
, application/json
等),并以406 Not Acceptable
响应,如果不匹配。 content-type
(例如, application/x-www-form-urlencoded
, multipart/form-data
, application/json
等)。 XSS
, SQL-Injection
, Remote Code Execution
等)。 credentials
, Passwords
, security tokens
或API keys
),而是使用标准授权标头。 Quota
, Spike Arrest
或Concurrent Rate Limit
)并动态部署APIS资源。 /me/orders
代替/user/654321/orders
。 UUID
。 XXE
(XML外部实体攻击)。 Billion Laughs/XML bomb
。 X-Content-Type-Options: nosniff
标头。 X-Frame-Options: deny
标题。 Content-Security-Policy: default-src 'none'
标头。 X-Powered-By
, Server
, X-AspNet-Version
等。 content-type
为您的响应。如果您返回application/json
,则您的content-type
响应是application/json
。 credentials
, passwords
或security tokens
等敏感数据。 200 OK
, 400 Bad Request
, 401 Unauthorized
, 405 Method Not Allowed
等)。 通过分配此存储库,进行一些更改并提交拉力请求来随意做出贡献。无论如何,请给我们发送电子邮件至[email protected]
。