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?)
/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.