存储 OpenID 端点、OP-本地标识符和领域?
我将创建一个数据库表来存储 OpenID 登录信息。除了声明标识符之外,我想我还会包含以下三列:
- The OpenID 端点
- OP-Local标识符
- 领域
- OpenID 版本(1 或 2)
你存储这些字段吗?
您认为存储这些字段合理吗?,原因如下:
OpenID 端点:这样您就知道哪个 OpenID 提供商对用户进行了身份验证。也许将来您会发现某个提供商不太值得信赖,然后我认为最好知道 someuser.example.com 是否经过该提供商的身份验证。
OP 本地标识符:我认为它可以让我跟踪用户,即使她更改了用户提供的标识符。 (例如,如果她的用户提供的标识符是 example.com/username,但她将其更改为 Somethingelse.com/username,那么我认为 OP-Local 标识符将保持不变(假设用户继续使用相同的 OpenID 提供程序) .
- 。我正在构建一个多租户 Web 应用程序,如果我存储领域,就可以更容易地知道两个看似不同的 OpenID 标识符是否可能代表同一个人 (
Google 使用定向身份:您声明的 ID 因领域而异,所以是一样的。用户可以有许多不同的声明 ID。) 版本:如果将来出现某些安全问题,使用某些 OpenID 版本,那么最好知道哪些用户可能会受到影响。
领域和端点,用于统计收集目的。
(您能想到我应该存储的其他一些与 OpenID 相关的值吗?例如,我想识别提供商。为此,存储端点就足够了?我不需要存储提供商的名称?)
I'm about to create a datatbase table to store OpenID logins. I think I will include these three columns, in addition to the Claimed Identifier:
- The OpenID endpoint
- The OP-Local Identifier
- The realm
- The OpenID version (1 or 2)
Do you store these fields?
Do you think it's reasonable to store these fields?, for the following reasons:
The OpenID endpoint: So you know which OpenID Provider authenticated the user. Perhaps in the future you'll find out that one provider is not so very trustworthy, and then I think it's good to know if someuser.example.com was authenticated by that provider.
The OP-Local Identifier: I think it allows me to keep track of the user, even if she changes her User-Supplied Identifier. (For example, if her User-Supplied Identifier is example.com/username, but she changes it to somewhereelse.com/username, then I think the OP-Local Identifier will remain unchanged (assuming the user continues using the same OpenID Provider).
The realm: I'm building a multitenant webapp, and if I store the realm, it'll be easier to know if two seemingly different OpenID identifiers might represent the same person. (Google uses directed identities: your Claimed ID varies by realm. So the same user can have many different Claimed IDs.)
The version: In case some security issue appears in the future, with some OpenID version, then it might be good to know which users might be affected.
The realm and endpoint, for statistics gathering purposes.
(Can you think of some other OpenID related value I ought to store? For example, I want to identify provider. To do this, it suffice to store the endpoint? I don't need to store the provider's name?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
/server-username
)。您说过您想要识别提供者。但是,正如我上面提到的,如果提供商采取措施避免这种情况,则不可能这样做。例如,您可以存储它的域名,但这并不完美,因为同一域下可能有其他提供商(例如,几个人在共享主机上托管自己的提供商)。
总之,我的观点是,出于上述原因,存储这些是一个坏主意。
/server-username
).You've said that you want to identify the provider. However, as I've mentioned above, it's not possible to do so if the provider takes steps to avoid that. You could, for example, store it's domain name, but that's not perfect, since there might be other providers under the same domain (for example, several people hosting their own providers on a shared hosting).
In summary, my opinion is that storing these is a bad idea, for reasons stated above.