设置用户/角色管理系统 - 具有多租户功能

发布于 2024-10-19 21:47:12 字数 125 浏览 4 评论 0原文

有没有人有任何架构、数据模型或建议来创建考虑多租户的用户/角色管理系统。例如,组织 A 中的用户可能被分配到组织 B 中某个项目、某个应用程序的角色。有什么想法吗?我一直在阅读 RBAC,只是在寻找一个很好的例子。

谢谢

Does anyone have any schema's, data models, or suggestions for creating a user / roles management system that accounts for multi-tenancy. For example, a user in organization A, may be assigned a role to a certain project, to a certain application, in organization B. Any ideas? I've been reading up on RBAC, just looking for a good example.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

你与昨日 2024-10-26 21:47:12

关于RBAC的简要信息:
基于角色的访问控制系统是一种根据组织用户的角色限制对“某些源或应用程序或应用程序的某些功能”的访问的方法。

这里,限制可以通过多个权限来实现,这些权限是由管理员用户创建的,用于限制访问,这些权限共同代表一个角色,该角色将被分配给用户。

如果我们进一步深入了解 RBAC,它基本上包含 3 个功能。

1) 身份验证 - 确认用户的身份。通常它是通过用户帐户和密码或凭据完成的。

2) 授权 - 它定义用户在应用程序中可以做什么和不能做什么。前任。允许“修改订单”,但不允许“创建新订单”。

3) 审核用户对应用程序的操作。 - 它跟踪用户对应用程序的操作,以及谁向哪些用户授予了哪些访问权限?这是 RBAC 系统非常基本的俯视图。

对于多租户应用程序,我建议使用角色和权限“管理组和用户”

让我们举个例子。

应用程序有多个客户端(租户):

Client A – has – 100 users [Tenant A]
Client B – has – 50 users [Tenant B]
Client C – has – 100 users [Tenant C]

因此,场景类似于,每个客户端和该客户端的用户应仅被允许访问应用程序的特定功能,并且这些客户端的管理员应该能够管理其仅限用户。

因此,为了解决这个问题,我们可以

  1. 定义和管理组(租户)
  2. 作为组(租户)成员定义和管理用户或帐户
  3. 通过角色或权限限制应用程序中每个租户的访问
  4. 将安全管理委派给每个客户端或组织内的本地用户
    如下所示。

组层次结构:
组层次结构1 :

其中“客户端 A”组及其后代组将包含“客户端 A”的用户,其他客户端或组织也类似。

因此,用户将被分配到适当的组,并且角色将被分配到特定的组。

您可以查看这篇文章 - 它展示了如何通过我工作的 VisualGuard 提供的现成框架来处理用户和角色管理的多租户应用程序。

http://www.visual-guard.com/EN/net-powerbuilder-application-security-authentication-permission-access-control- rbac/secure-saas-and-multi-tenant-apps-with-asp-net-or-wcf-Silverlight.php

Brief information about RBAC:
Role based access control system is a method for restricting access to 'some sources or applications or some features of applications' based on the roles of users of organization.

Here, restrictions can be by means of multiple permissions, those are created by administrator users to restrict access, and these permissions collectively represents a role, which will be assigned to user.

And if we go slight deeper in RBAC, it basically contains 3 features.

1) Authentication - It confirms the user's identity. Usually it is done via user accounts and passwords or credentials.

2) Authorization - It defines what user can do and cannot do in an application. Ex. ‘Modifying order’ is allowed but ‘creating new order’ is not allowed.

3) Auditing of user actions on applications. - It keeps track of user's actions on applications, as well as who has granted which access to which users?This was very basic top view picture of RBAC system.

For multi-tenancy applications, I would recommend 'managing groups and users' with roles and permissions.

Let us take an example.

There are multiple clients (tenants) for the application:

Client A – has – 100 users [Tenant A]
Client B – has – 50 users [Tenant B]
Client C – has – 100 users [Tenant C]

So, the scenario would be something like, each client and users of this client should be allowed to access specific features of the application only, and administrator of these clients should be able to manage their users only.

So, to handle this, we can

  1. Define and manage groups (tenants)
  2. Define and manage users or accounts as members of group (tenant)
  3. Restrict access for each tenant in application via roles or permissions
  4. Delegate security administration to local users within each Client or organization
    Something like shown below.

Groups Hierarchy:
Groups Hierarchy1:

Where group ‘Client A’ and its descendent groups will be containing users for ‘Client A’, and similarly for other clients or organizations.

Accordingly users will be assigned to appropriate groups, and roles will be assigned to particular groups.

You may check this article – which shows how to deal with multi-tenant applications for users and roles management via ready to use framework provided by VisualGuard where I work.

http://www.visual-guard.com/EN/net-powerbuilder-application-security-authentication-permission-access-control-rbac/secure-saas-and-multi-tenant-apps-with-asp-net-or-wcf-Silverlight.php

街道布景 2024-10-26 21:47:12

您看过Rhino 安全吗?它可能无法完全满足您的需求,但 Ayende 在引导您完成安全模型和安全方面做得非常好。同样的开发过程,可以给你一个很好的起点。

Have you looked at Rhino security? It might not do exactly what you want, but Ayende does a pretty good job of walking you through the security model & the development process of same, could give you a good starting point.

爱本泡沫多脆弱 2024-10-26 21:47:12

您使用的是 .NET,但对于 PHP 世界中的我们来说,Zend Framework 提供了一个轻量级访问控制框架,使您能够构建自己的 ACL 实现,从而使您能够理解概念并在 .NET 中构建自己的 ACL 实现,网址为 http://framework.zend.com/manual/en/zend.acl.introduction。 html

如果您需要其他帮助,我可以提供 MYSQL 工作台文件以及我们当前正在使用的实现

You are in .NET but for us in the PHP world, the Zend Framework provides a lighweight access control framework that enables you to build your own ACL implementation which can enable you to understand the concepts and build your own in .NET at http://framework.zend.com/manual/en/zend.acl.introduction.html.

I can provide a MYSQL workbench file with an implementation that we are currently using if you need additional assistance

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文