跨数据库同步 persistence_token
我正在尝试弄清楚如何跨服务器同步 authlogic 持久性令牌。
我有 4 台服务器,所有 4 台服务器上都有许多应用程序,身份验证适用于一台服务器上的所有应用程序。如果我将持久性令牌从一台服务器复制到另一台服务器,我什至可以让它们在不同的服务器上工作。
我能想到的唯一问题是用户可能登录到一台服务器而不是另一台服务器,但我仍然希望他们能够以便同步,以防它们确实转到其他服务器。例如:
Joe 登录到服务器 1
Joe 也登录到服务器 2
Jane 只登录到服务器 1
Fred 只登录到服务器 2
我需要从每个服务器进行 2 路同步。我不在乎他们得到哪个持久性令牌,只要它们都是相同的即可。
如果重要的话,这也会使用 LDAP 进行身份验证。
我几乎愿意接受任何建议,包括一些与轨道无关的建议。
编辑
要更新此内容,我无法删除 LDAP 身份验证。我真的不想取代authlogic。我正在考虑使用 rake 任务或 shell 脚本之类的东西来处理同步。
我完全可以提出自己的想法,只是想看看是否有人知道最好的方法。
谢谢大家的帮助。
I am trying to figure out how to sync authlogic persistence tokens across servers.
I have 4 servers, and I have many apps on all 4, the authentication is working across all the apps on one server. I can even get them to work on different servers if I copy the persistence token from one to the other 3.
The only issue I can think of is users may login to one server and not the other, but I still want them to be able to be synced in case they do go to that other server. For example:
Joe logs into server 1
Joe also logs into server 2
Jane only logs into server 1
Fred only logs into server 2
I would need a 2 way sync from each of the servers. I don't care which persistence token they get as long as they are all the same.
This also uses LDAP for authentication in case that matters.
I am open to pretty much any suggestion, including something non-rails related.
Edit
To update this, I cannot remove LDAP authentication. I really have no desire to replace authlogic. I was thinking of something like a rake task or shell script to handle the syncing.
I am perfectly fine coming up with my own idea, just want to see if someone knows the best way.
Thank you all for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能确实在寻找中央身份验证服务 (CAS)——能够启用单点登录 (SSO) 的服务。
这使您能够登录到不同的服务。它将像
然后:
这样用户就不会多次输入凭据。
OAuth 的工作原理如下(过于简化)
人们已经使用了 基于 java 的 CAS 。一些帖子:
You might really be looking for a central authentication service (CAS) -- something that will enable Single Sign On (SSO).
This enables you to log on to different services. It will work something like
Then:
That way the user does not enter credentials more than once.
OAuth works like this (over-simplified)
People have used the java based CAS . Some posts: