Operations don't seem to work in AzMan provider

Topics: Security Application Block
Oct 29, 2010 at 6:57 PM
Edited Oct 30, 2010 at 10:22 AM

This is the first time I've used the Security block - I'm using it for AuthZ and I'm using AzMan as the provider.  I've used AzMan before, via COM, and I did my checks at the operation level, e.g. one operation per command, grouping operations into related sets using Tasks and then grouping them into roles.

The AzMan provider only seems to check at Task level.  The page Designing for Simplified Authorization says "When you configure your application to use the AzManAuthorizationProvider the Authorize method accepts operations or tasks as the context parameter".  I've tried operation names and operation numbers (as strings because there's no Int overload) and neither seems to work: I get a SecurityException: Element not found.  I've tried it in my own project and using the sample project.

Also, it seems that a Task must have Operations defined otherwise I get a ConfigurationErrorsException: "No operations are defined for the given task." which means that I have to define two objects for everything I want to secure, and link them.  My old app has hundreds of operations built up over time.  Now, it seems that setting up its replacement will take twice as long as it needs to.

Am I doing something wrong? 

Nov 2, 2010 at 9:58 AM
Edited Nov 2, 2010 at 1:47 PM

Did you prefixed your operation with "O:"?  

authorizationProvider.Authorize(principal, "O:Do Something");

On the matter of having operations defined for a task, it seems that is a design decision as the code explicitly throws that exception. 


Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.