多个租户的账户管理
我有一个在 GAE 上有多个租户的应用程序。
在“主”(它本身就是一个租户)上,我让人们注册并创建一个子应用程序/租户,其中创建者是应用程序的所有者。
管理用户帐户的最佳方式是什么?
假设 USER_A 创建 APP_A,USER_B 创建 APP_B。 因此,有 2 个用户和 2 个应用程序,其中每个用户都是其创建的应用程序的所有者,并且无权访问其他用户的应用程序。 现在 USER_B 希望向其他用户授予其应用程序的访问权限。
模拟这种情况的最佳方法是什么?
我应该将成员存储在完全独立的命名空间中,并通过在命名空间之间不断切换来验证用户会话吗?
我认为保留特定用户对应用程序拥有的权限的最佳位置是在实际的应用程序租户上,而不是在 USER 对象上。
有什么建议或最佳实践吗?
谢谢
i have an app with multiple tenants on GAE.
over the 'master' (which is a tenant on its own) i let people register and create a subapp/tenant where the creator is the owner of the app.
what is the best way to manage the user accounts?
lets say USER_A creates APP_A and USER_B creates APP_B.
so there are 2 users and 2 apps where each user is owner to the app it created and does not have access to the other users app.
now USER_B wants to give access to the other user on his app.
what is the best way to model this situation.
should i store members in a completely separate namespace and validate the users session by switching constantly between namespaces?
i think the best place to keep what permissions a specific user has on an app is on the actual app tenant rather than the USER object.
any tips or best practices?
thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果“用户身份”可以跨越租户(您的应用程序),则将用户实体保留在公共命名空间中(默认命名空间可以正常工作,并且这是请求开始时的默认命名空间)。任何特定于租户的信息(例如,用户身份对特定租户具有什么授权)都可以存储在最方便的地方。我发现将其放入租户的命名空间可以简化查询,否则必须指定该名称或将其过滤掉。
If 'user identity' can span tenants (your apps), then keep user entities in a common namespace (the default namespace works fine for that, and that's the default when a request begins). Anything specific to a tenant (e.g., what authorization a user identity has for a specific tenant) can be stored where it is most convenient. I find that putting it in the tenant's namespace simplifies queries that would otherwise have to specify that or filter it out.