AzMan Security & Security Cache & WCF

Topics: Security Application Block
Oct 11, 2007 at 6:26 AM
Hello everybody,

As you can see I have 2 questions :
1) Does the AzMan security block take advantage of the Security cache ? (According to the code I don't think so.)
It would be nice to cache the list of operations (avoid AzMan access).
2) Only for WCF freak. I have a custom ServiceAuthorizationManager class.
I would like to check my action name (operationContext.RequestContext.RequestMessage.Headers.Action) against AzMan through the AzMan security block.
This (authenticationProvider.Authorize(operationContext.ServiceSecurityContext.WindowsIdentity, "test");) doesn't compile because it cannot cast a WindowsIdentity into a IPrincipal.
Any idea how to do the trick ?

Thanks in advance,
Philippe
Oct 11, 2007 at 11:21 AM
Hi Philippe,

Answers inline.


1) Does the AzMan security block take advantage of the Security cache ? (According to the code I don't think so.)
It would be nice to cache the list of operations (avoid AzMan access).


As you alredy figured out, it doesn't.


2) Only for WCF freak. I have a custom ServiceAuthorizationManager class.
I would like to check my action name (operationContext.RequestContext.RequestMessage.Headers.Action) against AzMan through the AzMan security block.
This (authenticationProvider.Authorize(operationContext.ServiceSecurityContext.WindowsIdentity, "test");) doesn't compile because it cannot cast a WindowsIdentity into a IPrincipal.
Any idea how to do the trick ?


Does it work if you do authenticationProvider.Authorize(new WindowsPrincipal(operationContext.ServiceSecurityContext.WindowsIdentity), "test");?

Fernando