TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Best practices for stolen session detection?

2 点作者 stephanos2k大约 11 年前
We want to secure our service with additional methods of detecting a stolen HTTP session via IP&#x2F;geolocation.<p>Are there any resources to find best practices for implementing such a system?

1 comment

chrisfarms大约 11 年前
Detecting the location of the client by IP is not going to be very reliable, it&#x27;s a false sense of security at best. You want to make it impossible to hijack, not detect it when it&#x27;s too late!<p>Even tieing a session to a single source IP is not great (think stealing sessions in a coffee shop behind NAT).<p>Use HTTPS.<p>Sign requests with a MAC (message authentication code).<p>Make sure your tokens expire fairly quickly and you have a method to refresh them.
评论 #7459107 未加载