通过 https 使用 GWT 和 GAE 进行安全身份验证?

发布于 2024-09-18 01:33:13 字数 221 浏览 8 评论 0原文

我想在我的 appengine 应用程序中实现自定义用户身份验证系统。我不想使用会话。我是这个领域的新手,所以我有两个基本问题:

1:通过 https 为每个 RPC 发送用户名和密码是否安全?我需要做什么才能确保客户端的用户名和密码安全?

2:如何告诉 GWT 在发出请求时使用 https?

我对安全了解不多,所以请不要向我透露任何“明显”的细节。

谢谢!

I want to implement a custom user authentication system in my appengine app. I don't want to use sessions. I'm a newbie in this area, so I have two basic questions:

1: Is it secure to just send a username and password with every single RPC over https? What do I need to do to keep that username and password secure on the client end?

2: How do I tell GWT to use https when it makes its requests?

I don't know much about security, so please don't spare me any "obvious" details.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

海拔太高太耀眼 2024-09-25 01:33:19

在 GAE 上,您还可以使用 Google User Services API http://code。 google.com/appengine/docs/java/users/overview.html。它非常直观,您无需了解安全详细信息。

On GAE you can also use Google User Services API http://code.google.com/appengine/docs/java/users/overview.html . It's very intuitive and you won't need to know security details.

仅一夜美梦 2024-09-25 01:33:18
  1. 通过 HTTPS 发送用户名和密码是安全的,但没有人对每个请求都这样做,因为有一天您可能会忘记/需要通过 HTTP 发送请求。此外,将密码保存在内存中会吸引 XSS 黑客。一种未被注意到的 XSS 漏洞会暴露密码。通常,开发人员将会话 ID 或 XSRF 令牌保留在内存中,并随每个请求一起发送。
  2. 请参阅 http://code.google.com/appengine/ docs/java/config/webxml.html#Secure_URLs
  3. 不要忘记 XSRF 保护,您需要为更改某些内容(非只读)的请求实现它。
  1. Sending username and password over HTTPS is secure, but nobody does this for every request, because some day you may forget/need to send a request through HTTP. Also, keeping password in memory will attract XSS hackers. One unnoticed XSS vulnerability will expose passwords. Usually, developers keep either session-id or XSRF-token in memory and send it with each request.
  2. Look at at http://code.google.com/appengine/docs/java/config/webxml.html#Secure_URLs
  3. Don't forget about XSRF protection, you need to implement it for requests that change something (not read-only).
缘字诀 2024-09-25 01:33:17

使用 firebug 观察该过程表明,所有 RPC 都是通过请求主机页面的同一协议发生的。这似乎是同站点源规则所必需的,所以我假设我的答案是

1:是的,但速度较慢

2:当通过 https 请求主机页面时,GWT 自动使用 https

Watching the process with firebug shows that all RPCs are happening over the same protocol that the host page was requested with. This seems to be required for same-site-origin rules, so I'm going to assume that my answers are

1: Yes, but it's slower

2: GWT automatically uses https when the host page was requested w/ https

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文