authorization

ASP.NET MVC: Custom parameters to login page after authorization

I would like to redirect visitors to a login page with added parameters (based on the action they are performing) after the authorization fails. This is an example of what I would like to do: http://stackoverflow.com/questions/835672/asp-net-mvc-customeauthorize-filter-action-using-an-external-website-for-loggin However, since this is...

Download HTML content that require authorization?

I use WebClient from System.Net Namespace of Visual Studio 2008 to download the HTML content. It done well with normal website but with some 4rum that require authorization such as warez-bb.org, it always return the HTML of the login page. I wonder if there is a way to send the username and password to the WebClient? ...

Authorized View or Configure View as Authorized?

Is it best to create a separate view for authorized and unauthorized even if there will not be a lot of additional information in the authorized view? Or should there be one view and with model data adjusted accordingly? EDIT: In MVC, I believe it better to have 2 views and then use partial views for the duplicate information. agree? ...

ASP.NET MVC Authorization and hyperlinks

Hello, I am using successfully custom authorization in ASP.NET MVC. It simply involves a comparison between User.Identity and the owner of the object in context. It works like a charm when used in simple conditions. It becomes more complicated when I try to call 2 actions in one web request. Lets say I want to display an image which w...

Automated testing of authorization scenarios implemented with AzMan

I have a web application that uses AzMan authorization to grant different functionality to different users. I've just started using WatiN to implement some automated web UI tests that run under Visual Studio Team System/TFS. I'd like to be able to use it to verify the different authorization scenarios. To do this though I'd need to be ab...

How do I assign a Role to an OpenId user for an ASP.NET MVC site?

Hi Folks, I'm using OpenId in my ASP.NET MVC application. Works great :) Once i have the user's OpenId Identifier (once they have authenticated and returned to my site), i load up the users data (to get display name, etc). From here, i also know their roles. I'm not sure how to assign the role to the current Forms.Identity. here's my...

Using Forms Authentication/Authorization with Rewritten URLs

I'm doing a quick sandbox test with some Rewritten URLs (example taken from Scott Guthrie's blog) and Forms Authentication / Authorization. I've a very simple setup. ~/View/(\d{1,6}) => ~/Public/View.aspx?ContentID=$1 AND ~/Buy/(\d{1,6}) => ~/Private/Purchase.aspx?ContentID=$1 I've confirmed the URL Rewriting...

How do I restrict access to certain pages in ASP.NET MVC?

Hi folks, I wish to lock out access to a user's EDIT page (eg. /user/pure.krome/edit) if a) Identity.IsAuthenticated = false or they are authenticated but b) Idenitity.Name != user name of the user page they are trying to edit c) Identity.UserType() != UserType.Administrator // This is like a Role, without using RoleProviders. I'm ...

How to do Authorization redirect on ASP.NET MVC

Hi Everybody. So, I come from a ASP.NET 2.0 WebForms background and am new to ASP.NET MVC which I find it wonderful, however, i've been somewhat accostumed to it. This time, my problem has to do with Authentication and Authorization Model: I used to restrict folders via Web.config's authorization section <authorization> <deny user...

Integrating CSLA Authorization with DotNetNuke Roles

I am interested if anyone has experience using DotNetNuke authorization in CSLA. I would like to be able to use my DotNetNuke roles to be able to assign permissions to my CSLA objects and properties. If I just reference the DNN assemblies won't that create an unwanted dependency in my CSLA business objects? Would it be easier to build...

Is the Authorize attribute in ASP .NET MVC used for Authentication as well as Authorization?

I'm reading up on ASP .NET MVC, and I just got to a section talking about the Authorize attribute. It's saying that the Authorize attribute is used to check that a user is authenticated against a Controller. Is this true? I know that the attribute is designed to be used for authorization purposes, but is it also a best practice to use...

Rails: Authorization with Authlogic

I need a very granular authorization system that works seamlessly with Authlogic. I've tried these gems/plugins so far: Lockdown rails_authorization_plugin ACL9 I've also looked at, but not tried implementing: Padlock I've searched around for a good tutorial detailing how to set up any of these with Authlogic in a way that makes...

ASP.NET MVC Custom Authorization

I have a question about custom authorization in MVC. I have a site that I want to limit access to certain pages, depending on their group membership. Now I have seen tons of examples on how to do this if there is a single admin group and a single user group, for example, but not any examples for a third level. For example, only user...

Simplest CMS allowing content hiding for not-logged-in

I'm looking for the simplest CMS that supports the ability to show different content depending on whether you are or are not logged in. Simplest because the school users are not the most sophisticated or tech-savvy users. The CMS is for a school site, which is not permitted to show some content (because of copyright etc.) to any users ...

Evaluating user management options.

I am working on a web application (C#, VS2008 with Entity modelling) and within about a year from now, they will ask me to add some login/authentication/authorization options to this site that can be managed through the site. Which is fine by me but I would like to know some good ways to implement such functionality. Visitors for this s...

Turning off security for /

I am using openID on my site for login and need it to fetch the XRDS document So I unsecured it <location path="xrds.aspx"> <system.web> <authorization> <allow users="?" /> </authorization> </system.web> </location> But when the openID server checks the domain for the locati...

centralized data authorization - who is administrator?

Lets say I have centralized database and can't trust administrators (like in Azure or other cloud service). Lets say I solved the problem of authentication and I can trust user identity. Lets say I use certificates to authenticate and encrypt data (private key never leaves the client machine). How can I design the application/database t...

IIS vs. ASP.NET authorization - easiest way to secure static files?

Let's say I have the following in a web.config: <allow roles="Developers" /> <deny users="*"/> This locks down access on .aspx, .asmx, and other .NET file types, but it's still allowing unauthorized users to open static files like image.jpg. I understand why the web.config isn't asked for authorization information when someone asks f...

WCF - Windows authentication - Security settings require Anonymous...

Hi, I am struggling hard with getting WCF service running on IIS on our server. After deployment I end up with an error message: Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service. I want to use Windows authentication and thus I have Anonymous ac...

How to pass Authorization header from Flex WebService?

Hi, I have Basic Authorization mechanism on the server for WSDL/SOAP. How I can send "Authorization" header through Flex WebService? Simplified example: var ws:WebService = new WebService(); ws.wsdl = "http://localhost:8000/api/service.wsdl" var encoder:Base64Encoder = new Base64Encoder(); encoder.insertNewLines = false; encoder.enco...