授权规则的最佳方法

发布于 2024-07-26 04:03:59 字数 353 浏览 2 评论 0原文

我想知道实施身份验证的最佳方法。 使用业务对象的客户端-服务器应用程序中的规则。

我注意到常见的策略是:
- 在数据库端:为应用程序实现一个角色,用于所有应用程序的用户
- 定义用户权限和角色并将用户分配到适当的组
- 客户端:添加到业务对象的 getters/setters 权限检查器,允许为特定用户写入/显示数据

我担心的是,从安全角度来看,这是否真的是一个很好的方法。
看起来DB将所有信息发送给Client,然后Client的逻辑决定显示或不显示什么。
因此,潜在的高级用户可以从他们的盒子中进行查询并查看/更改任何内容。 不是吗?

I'm wonder about best approach of implementation auth. rules in Client-Server app using Business Objects.

I've noticed common tactic is:
- on DB side: implement one role for application, used for all app's users
- definition users right and roles and assign users to proper group
- Client side: add to Business Object's getters/setters rights checker allowing write / display data for particular user

My concern is if this is really good approach from security perspective.
It looks DB sends all information to Client, and then client's logic decide what to display or not.
So, potentially advanced user can make query from their box and see/change anything.
Isn't it?

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

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

发布评论

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

评论(1

尐偏执 2024-08-02 04:03:59

如果数据库将所有信息发送到客户端,包括某些用户不应该看到的信息,那么您就会遇到安全问题。 您应该只返回用户有权查看的数据量。

授权的设计与您的应用程序和数据库设计紧密相关。 如果您需要非常细粒度(可能是每个用户)的权限,那么您需要能够在设计中相当深入地指定这一点,以确保其安全。 如果您只需实施简单的规则,那么您可以在更高级别上工作,并且可能阻止对某些对象或表的访问。

If the DB is sending all information to the client, including information that some users should not see then you have a security problem. You should only return the amount of data which a user is authorized to see.

Design of the authorization tightly linked to your application and database design. If you need very granular (perhaps per user) permissions then you need to be able to specify this fairly deep in your design to ensure it is secure. If you only have simple rules to implement then you can work at a higher level and perhaps block access to certain objects or tables.

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