Questions tagged [claims-based-identity]

Application model for presenting an identity to a claims aware application. This identity contains claim elements, such as email address or username, in a secure package from a trusted source. This model separates the application from the authentication mechanism.

Resources

Wikipedia Entry - Claims-based identity

MSDN Article - Exploring Claims-Based Identity by Kieth Brown

1595 questions
210
votes
12 answers

Role-based access control (RBAC) vs. Claims-based access control (CBAC) in ASP.NET MVC

What are the main benefits of using CBAC vs. RBAC? When is it better to use CBAC and when is it better to use RBAC? I'm trying to understand the general concepts of the CBAC model but the general idea is still not clear for me.
205
votes
6 answers

Explain "claims-based authentication" to a 5-year-old

Well, not exactly to a 5-year-old, but please avoid buzzword and enterprisespeak if possible. Claims-based authentication seems to be all the rage now, but I could not find a simple and down-to-earth explanation of what it actually is, how is it…
Anton Gogolev
  • 113,561
  • 39
  • 200
  • 288
142
votes
7 answers

Anti-forgery token issues

I am having an issue with the anti-forgery token :( I have created my own User class which worked fine but now I am getting an error whenever I go to the /Account/Register page. The error is: A claim of…
r3plica
  • 13,017
  • 23
  • 128
  • 290
133
votes
12 answers

MVC 5 Access Claims Identity User Data

I am developing an MVC 5 web application using Entity Framework 5 Database First approach. I am using OWIN for the authentication of Users. Below shows my Login method within my Account Controller. public ActionResult Login(LoginViewModel model,…
tcode
  • 5,055
  • 19
  • 65
  • 124
130
votes
5 answers

Best Practices for Roles vs. Claims in ASP.NET Identity

I am completely new to the use of claims in ASP.NETIdentity and want to get an idea of best practices in the use of Roles and/or Claims. After all this reading, I still have questions like... Q: Do we no longer use Roles? Q: If so, why are Roles…
Prisoner ZERO
  • 13,848
  • 21
  • 92
  • 137
94
votes
4 answers

What is the purpose of nameidentifier claim?

What the claim of type http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier should be used for? This is the main question, and here are additional ones. How does it differ from…
Anthony Serdyukov
  • 4,268
  • 4
  • 31
  • 37
90
votes
2 answers

Why is my ClaimsIdentity IsAuthenticated always false (for web api Authorize filter)?

In a Web API project I am overriding the normal authentication process to check tokens instead. The code looks something like this: if ( true ) // validate the token or whatever here { var claims = new List(); claims.Add( new Claim(…
explunit
  • 18,967
  • 6
  • 69
  • 94
87
votes
7 answers

Difference between Service Principal and Managed Identities in Azure

I would like to know if it is always recommended to use Managed Identities in Azure , mostly system assigned or a Service Principal? When should Service Principals be used in Azure compared to a managed identity, what is the advantage of one over…
Pallab
  • 1,915
  • 2
  • 19
  • 46
85
votes
2 answers

Embedded statement cannot be a declaration or labeled statement

I am trying to create a user using claim identity asp.net I get this error while creating claims identity user. ApplicationUser user = new ApplicationUser { EmailConfirmed = true, UserName =…
husseinbaalbaki
  • 901
  • 1
  • 6
  • 7
62
votes
3 answers

What's the role of the ClaimsPrincipal, why does it have multiple Identities?

I am trying to understand the security model behind .NET based on claims for the application (Relying Party). I know there are 2 major classes: ClaimsPrincipal - security context for the running process ClaimsIdentity - stores information about…
Dan
  • 1,555
  • 2
  • 14
  • 30
48
votes
2 answers

Owin claims - Add multiple ClaimTypes.Role

I have an application in which users can be assigned the following roles: SuperAdmin Admin User One user may have assigned two or more roles, eg. both SuperAdmin and User. My application uses claims, and therefore i want to authenticate user…
Jeppe Christensen
  • 1,680
  • 2
  • 21
  • 50
42
votes
7 answers

MVC5 (VS2012) Identity CreateIdentityAsync - Value cannot be null

I am trying to setup OAuth for a an MVC5 site (in VS2012). I am using Fluent NHibernate. I have setup my own Userstore and pass in a repository object to access NHibernate session object. I pass my store into the default aspnet usermanager…
Jon
  • 15,110
  • 28
  • 92
  • 132
39
votes
3 answers

Using Windows Domain accounts AND application-managed accounts

It's easy to create an ASP.NET MVC application that authenticates based on windows domain user. It's also easy to create one that uses individual accounts stored using Entity Framework. In fact, there are project templates for both. But I want to…
recursive
  • 83,943
  • 34
  • 151
  • 241
39
votes
2 answers

ASP.NET Identity and Claims

I am trying to move away from WebForms and learn MVC, specifically using the new ASP.NET Identity model. However, I cant seem to find any formal documentation from Microsoft, that demonstrates how to create a claims object, and store it in a…
CSharpNewBee
  • 1,951
  • 6
  • 28
  • 64
36
votes
4 answers

How do I remove an existing claim from a ClaimsPrincipal?

I am making a developer tool for impersonating Roles for an intranet site to allow developers to quickly act as any Role as needed. Roles defined are Developer, Team Lead, Team Member, Engineering, Marketing, Guest and a tool on the web page makes…
Greg Mason
  • 753
  • 1
  • 9
  • 23
1
2 3
99 100