Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Security / March 2007

Tip: Looking for answers? Try searching our database.

AzMan AccessCheck problem with Active Directory Groups

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hocky.johansson@gmail.com - 12 Mar 2007 13:58 GMT
I have trouble using AD groups assigned to Roles in AzMan.
The AccessCheck function works great when I assign AD Users direct to
AzMan Roles.
If I put an AD User into an AD Group then assign the AD Group to my
Role in AzMan the AccessCheck always return false?!?
AD is running on one 2003 server and the application is running on a
2003 server SP1, servers are on the same domain.
My test code looks like this,
// Set operation number
object[] operations = new object[1];
operations[0] = 1; // Test operation
// Access Check
object[] scopes = { null };
object[] results = new object[1];
results = (object[])clientContext.AccessCheck("TEST",
               scopes, operations, null,null, null, null, null);
int result;
result = (int)results[0];
// Return
if (result == 0)
return true;
else
return false;
Any suggestions?
Dave McPherson [MSFT] - 12 Mar 2007 22:46 GMT
A few things come to mind.
1.    Using AD groups means the user has to log on and off to get the group in
their token (if you doing this test with a local account.) If you're testing
this from a local machine and then looping back to a server on the local
machine then the original token might be being reused and the AD group may
not have gotten in the token (in this case try a reboot or try from a
different client or both.)
2.    Another possibility is that you are using AD domain local groups and the
service token or client context creation is not getting those. Domain local
groups (depending on how the logon is happening and what form of AzMan client
context initialization you’re using) may not get enumerated for a
token/context in the domain of the server (if the account the client and the
server are in the same domain this is not the issue.)
3.    If you’re using AzMan’s initializeClientContextFromName this uses
Kerberos Services for Users which as a client token cache that is something
like 10 mins by default. S4u caching can be disabled by setting the following
registry key (a reboot is required). Using the below setting a new ticket
will always be issued by an S4u logon:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos\Parameters]
"CacheS4UTickets"=dword:00000000
Note: applications that have access to the client’s NT token, perhaps from
impersonating the client, SSPI, the CLR Windows Identity or the ASP.Net HTTP
context should use the InitializeClientContextFromToken method to create an
AzMan client context to avoid the Kerberos S4U cache.

HTH,
Dave
---

This posting is provided "As Is" with no warranties, and confers no rights.

Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
hocky.johansson@gmail.com - 13 Mar 2007 11:30 GMT
Tanks for quick the ansver, very good input!

I'm using this for an ASP.NET 2.0 solution with forms authentication.

Getting the context with this code,
clientContext = app.InitializeClientContextFromStringSid(objectSid, 0,
null);

This really confuses me now. Today it works!
Maybe the caching problem?!? If I add users and groups to the roles
now I got it works instantly?!?

Have a feeling that this may stop working again...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.