开发者

Are users commonly implemented as Roles with the ability to login?

开发者 https://www.devze.com 2023-01-12 09:25 出处:网络
In recent versions of PostgreSQL users are implemented as roles that can login. Is this common in an RBAC implementations, that a user is just another role with the ability to login (or similar)? Some

In recent versions of PostgreSQL users are implemented as roles that can login. Is this common in an RBAC implementations, that a user is just another role with the ability to login (or similar)? Some of what I've read so far doesn't suggest that... but开发者_StackOverflow社区 maybe I've misread or just not read the right thing.


In particular what i understand in your question is the differences and relation between RBAC and create user command in postgresql, As you may know PostgreSQL manages database access permissions using the concept of roles. This role can be database user, or a group of database users, depending on how the role is set up.

As referred here Roles can own database objects (for example, tables) and can assign privileges on those objects to other roles to control who has access to which objects.

Furthermore, it is emphasized that CREATE USER is an alias for CREATE ROLE, which see for more information. The only difference is that when the command is spelled CREATE USER, LOGIN is assumed by default, whereas NOLOGIN is assumed when the command is spelled CREATE ROLE. (mentioned in postgresql manuel)

The concept of roles subsumes the concepts of "users" and "groups". In PostgreSQL versions before 8.1, users and groups were distinct kinds of entities, but now there are only roles. Any role can act as a user, a group, or both.

And RBAC is a access control, there can be a relation with databases however it is used for any kind of "stuff" access in an PC or large networks similar to other access control (MAC DAC), A database management system, in its access control mechanism, can also apply other access control mechanisms. In this case, the objects are tables, views, procedures, etc. You can read details from wikipedia

Finally, All relational DBMS provide some sort of intrinsic security mechanisms designed to minimize threats. If it fits for your database application you can benefit from CREATE USER or CREATE ROLE commands to reduce security risk, that's why these commands exists.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号