Questions tagged [fluent-security]

Fluent Security configuration for ASP.NET MVC

Fluent Security provides a fluent interface for configuring security in ASP.NET MVC. No attributes or nasty xml. It is open source and available on NuGet!

34 questions
8
votes
1 answer

How Can I Use Domain Groups as Roles with Fluent Security in ASP.NET MVC 4?

In my ASP.NET MVC 4 application, I am using the intranet template to implement Windows authentication. I am also using Fluent Security. Out of the box I can use the annotations shown below to limit access to controller methods to either specific…
5
votes
1 answer

FluentSecurity makes Azure WebRole to fail

I have a ASP.NET MVC website using FluentSecurity. As a Azure Website it works just fine. I need to make it a WebRole. I added a WebRole project but the WebRole fails at startup with a generic "The page cannot be displayed because an internal server…
Igor Kulman
  • 16,211
  • 10
  • 57
  • 118
5
votes
2 answers

C# Accessing dynamic property on interface

I am playing around with FluentSecurity library for asp.net mvc. One of the interfaces exposed by this library is ISecurityContext as shown below: public interface ISecurityContext { dynamic Data { get; } bool CurrenUserAuthenticated(); …
4
votes
1 answer

Fluent Security - configuring parameterized controller actions

I have done quite a bit of research and have tested both the 1.4 and 2.0 versions of the FluentSecurity libraries and I don't seem to be able to use the configuration pattern: configuration.For(x => x.GetCustomer()) …
4
votes
1 answer

Does FluentSecurity replaces Asp.Net membership provider or it's supposed to complement/work together with it?

I'm working on an Asp.Net MVC4 site and I wanted to create a membership provided backed by Redis. Since I need the user privileges to be dynamic - user can create new roles in the admin dashboard - I was considering on using FluentSecurity…
3
votes
3 answers

How to redirect to specific page in FluentSecurity?

Hi I'm using FluentSecurity to authenticate and verify users permissions in my MVC application. In the basic settings when a user wants to access to denied Action it throws an exception. I want to know how should I redirect to another page (such as…
Saber Amani
  • 6,409
  • 12
  • 53
  • 88
2
votes
1 answer

FluentSecurity: How to assign multiple roles

In ASP.NET MVC, we can assign multiple roles in AuthorizeAttribute. I'm currently using Fluent Security. The documentation says RequireRolePolicy can support one or more roles. I want to do the code below: configuration.For(x =>…
Jen
  • 153
  • 2
  • 13
2
votes
1 answer

Testing a custom PolicyViolationHandler in FluentSecurity

I have written a custom policy in FluentSecurity (implement ISecurityPolicy) and a corresponding PolicyViolationHandler by implementing IPolicyViolationHandler. Everything is working perfectly with the policy and the handler, however I'm doing some…
Sean B
  • 11,189
  • 3
  • 27
  • 40
2
votes
1 answer

Catch exceptions from RequiredRole and other policies to redirect using Fluent Security

Using Fluent Security, I have configured website access using DenyAnonymousAccess, DenyAuthenticationAccess and RequireRole. SecurityConfigurator.Configure(configuration => { configuration.ResolveServicesUsing(new…
asunrey
  • 875
  • 2
  • 10
  • 28
2
votes
2 answers

fluent security unit testing

I have been writing some tests on my Fluent Security configuration off late. Though I can write tests verifying if a controller action method has a particular policy applied e.g.…
2
votes
1 answer

FluentSecurity with MVCSiteMapProvider

I was hoping to use this with MvcSiteMapProvider to hide / show menu items instead of doubling up and defining roles in my mvc.sitemap file. I have gone through the source for 2.0alpha1 but can't seem to figure out how to do something like: bool…
Mark
  • 1,108
  • 10
  • 11
1
vote
3 answers

Implementing FluentSecurity over Ninject (aka porting StructureMap to Ninject)

I'm a beginner on IoC and dependency injection. I'm reading about it, but I just can't get it. While I figure out how stuff works, I'm trying to implement some of these patterns on my project (and maybe learn by trial and error). I'm implementing…
tyron
  • 3,715
  • 1
  • 22
  • 36
1
vote
1 answer

Using a fluent security custom policy with castle windsor

I have Fluent Security setup (and working) to secure my controller actions and have used castle windsor to resolve everything (pretty much as shown in the castlewindsor-fluentsecurity project you can download). What I want to do now is create a…
Ian Barrett
  • 106
  • 4
1
vote
2 answers

FluentSecurity and Ninject

Error activating IntPtr I'm trying to configure FluentSecurity (v.1.4) with Ninject (v.3) in an ASP.NET MVC 4 application. I can't set up the ResolveServicesUsing() configuration expression without throwing the above…
Boggin
  • 3,251
  • 3
  • 33
  • 48
1
vote
1 answer

Fluent Security and AOP with CastleDynamicProxy

This exact problem has been asked on GitHub but the provided workaround just doesnt seem to be optional with version 2. The problem is, that if security is configured properly, even when it is configured via ForAllControllersInheriting, it just…
1
2 3