Questions tagged [roles]

In various access control systems, roles define a group of users and organize permissions into a more manageable structure.

In various systems, roles define a group of users and organize permissions into a more manageable structure. In systems which feature roles, a user may belong to many roles, and typically roles can be nested hierarchically.

Roles are a common feature in operating systems as well as database management systems.

Further Reading

3030 questions
77
votes
3 answers

What is exactly "Assume" a role in AWS?

Question What does exactly "Assume" a role mean in AWS and where is the definitive definition provided? Background Assuming a role is frequently used and trying to understand the definition and what it actually means. I suppose when a principal (IAM…
mon
  • 18,789
  • 22
  • 112
  • 205
53
votes
2 answers

Role based authentication in the new MVC 4 Internet template using simplemembership

I like the new simplemembership feature in MVC 4 internet template with links to OAuth for external logins in VS 2012 RTM. For the most part authentication feature are working. However even after spending over 8 hours on this I am unable to…
Ahmed
  • 1,231
  • 1
  • 10
  • 8
52
votes
10 answers

Best Role-Based Access Control (RBAC) database model

What is the best database schema to track role-based access controls for a web application? I am using Rails, but the RBAC plugin linked by Google looks unmaintained (only 300 commits to SVN; latest was almost a year ago). The concept is simple…
JasonSmith
  • 72,674
  • 22
  • 123
  • 149
51
votes
1 answer

Future of roles for GADT-like type variables?

A question from yesterday had a definition of HList (from the HList package) that uses data families. Basically: data family HList (l :: [*]) data instance HList '[] = HNil newtype instance HList (x ': xs) = HCons1 (x, HList xs) pattern HCons x xs…
Alec
  • 31,829
  • 7
  • 67
  • 114
44
votes
3 answers

Angular2 routing canActivate and AuthGuard (JWT) with user role parameter

In this exaple project with JWT authentication we se how to allow only authenticated users to some route: import { RouterConfig } from '@angular/router'; import { Home } from './home'; import { Login } from './login'; import { Signup } from…
Kamil Kiełczewski
  • 85,173
  • 29
  • 368
  • 345
41
votes
5 answers

How do I serve up an Unauthorized page when a user is not in the Authorized Roles?

I am using the Authorize attribute like this: [Authorize (Roles="Admin, User")] Public ActionResult Index(int id) { // blah } When a user is not in the specified roles, I get an error page (resource not found). So I put the HandleError…
Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
40
votes
4 answers

How to assign IAM role to users or groups

I know how to create user, group and role in AWS IAM. I can also attach policies to each of them. For example, after selecting a group, you can go to permissions tab, and attach some policies to it. However, I don't know how to attach a role to a…
Alisa
  • 2,892
  • 3
  • 31
  • 44
39
votes
5 answers

Spring security added prefix "ROLE_" to all roles name?

I have this code in my Web Security Config: @Override protected void configure(HttpSecurity http) throws Exception { http .authorizeRequests() .antMatchers("/api/**") .hasRole("ADMIN") .and() …
Gustavo Rozolin
  • 1,070
  • 2
  • 13
  • 21
39
votes
9 answers

asp.net mvc decorate [Authorize()] with multiple enums

I have a controller and I want two roles to be able to access it. 1-admin OR 2-moderator I know you can do [Authorize(Roles="admin, moderators")] but I have my roles in an enum. With the enum I can only authorize ONE role. I can't figure out how to…
codette
  • 12,343
  • 9
  • 37
  • 38
35
votes
2 answers

Symfony granting path access to multiple roles in security.yml

Hi I would like to be able to allow access to a path in security.yml based on the user either having ROLE_TEACHER, or ROLE_ADMIN. According to the question in Multiple roles required for same url in symfony 2 the entry below should allow either role…
nmcilree
  • 557
  • 1
  • 6
  • 11
32
votes
10 answers

Can I hide/show asp:Menu items based on role?

Am I able to hide certain menu items in an asp:Menu control based on role?
kacalapy
  • 9,806
  • 20
  • 74
  • 119
32
votes
7 answers

Authentication, Authorization, User and Role Management and general Security in .NET

I need to know how to go about implementing general security for a C# application. What options do I have in this regard? I would prefer to use an existing framework if it meets my needs - I don't want to re-invent the wheel. My requirements are as…
Saajid Ismail
  • 8,029
  • 11
  • 48
  • 56
31
votes
2 answers

How do I allow multiple roles to see a page when using a custom RoleProvider in ASP.Net

I have created my own Role Provider because I found the one that ASP.Net provides to be way too bulky in terms of tables in the database. I found implementing a custom RoleProvider to be quite easy. My only problem is that right now I cannot have…
uriDium
  • 13,110
  • 20
  • 78
  • 138
28
votes
6 answers

Non-string role names in ASP.NET MVC?

ASP.NET MVC has good support for role-based security, but the usage of strings as role names is maddening, simply because they cannot be strongly-typed as enumerations. For example, I have an "Admin" role in my app. The "Admin" string will now…
MikeWyatt
  • 7,842
  • 10
  • 50
  • 71
26
votes
3 answers

PostgreSQL error Fatal: role “username” does not exist

I'm setting up my PostgreSQL 9.1 in windows. I can't do anything with PostgreSQL: can't createdb, can't createuser; all operations return the error message Fatal: role root does not exist root is my account name, which I created while installing…
Abhishek
  • 1,999
  • 5
  • 26
  • 52