实施SSO和数据同步
我需要在 Liferay 和许多基于 PHP 的系统之间实现 SSO。使用的数据库是MySQL。
CAS将通过Liferay用户数据库进行身份验证,也会通过系统A和系统B的用户数据库进行身份验证。每个系统使用不同用户数据库的原因是因为它们是由不同的团队,也许是不同的供应商开发的。
由我决定用于存储所有系统的所有登录信息和权限的主表。
我的问题是,不同数据库的表之间如何同步数据?当一条记录插入到systemA.userdb中时,它将自动插入到master.table中(最重要的列是用户名和密码)。更新和删除也是如此。
我必须使用触发器吗?或者有什么软件可以实现吗?任何有关我的 SSO 实施的建议也将不胜感激。
I am required to implement SSO between Liferay and a number of PHP-based systems. Database used is MySQL.
CAS will authenticate through Liferay user database, as well as through user database from System A and System B. The reason why each system use different user database is because they were developed by different teams, perhaps different vendors.
It is up to me to decide the master table that will be used to store all login information and permissions to all systems.
My question is, how do I synchronize data between tables in different databases? When a record is inserted into systemA.userdb, it will be automatically inserted into master.table (the most important column being the username and password). So does update and delete.
Do I have to use trigger, or is there any software for it? Any advice on my SSO implementation will also be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议为每个应用程序创建一个视图,将用户表放入他们期望的任何格式。
如果由于某种原因您无法获得执行所需操作的视图,那么下一个最佳选择将是触发器。
如果应用程序使用不同的 mysql 服务器,请将上述两者之一与联合表结合起来。
i suggest creating a VIEW for each application that puts the user table in whatever format they expect.
if for some reason you can't get a view to do what you need, then the next best option would be a trigger.
if the applications use different mysql servers, combine either of the two above with federated tables.