Tags:
Hi Darren
I'm experiencing the same issue here, my plan was to create an active expression in siteminder get the SM_USERGROUPS values and then browse thru the groups and only select the groups which the application requires and set that in a separate header.
but what i;m seeing when i run the code is, the return value( string) from the userContext.getProp("SM_USERGROUPS") is truncated. it is not able to give me the full list of groups.
I'm not sure what went wrong? could this be some kind of bug?
Thanks,
Dhruv
Dhruv, I'm sorry I missed your post, I just saw it now as I was reading Trever's.
Dhruv, the first thing I think of when it's an Active Expression is the buffer size. Are you sure you set it large enough? Increase it, and see if it helps.
Trever, are you using an Active Expression as well? Or just the standard SM_USERGROUPS response?
For both of you, my suggestion would be to follow it through the logs. On the policy server in the Profiler log, you will see the search being done, and the result it got:
[00:40:00][Ldap Search callout succeeds.][][][][SmDsLdapProvider.cpp:2125][3396][1336][10/26/2011][00:40:00.267][CSmDsLdapProvider::Search][(Search) Base: 'CN=Users,dc=coreblox,dc=com', Filter: '(|(&(objectclass=groupOfNames)(member=CN=jdoe,CN=Users,dc=coreblox,dc=com))(&(objectclass=groupOfUniqueNames)(uniqueMember=CN=jdoe,CN=Users,dc=coreblox,dc=com))(&(objectclass=group)(member=CN=jdoe,CN=Users,dc=coreblox,dc=com)))'. Status: 1 entries]
[00:40:00][Leave function CSmAuthUser::GetProp][][][][SmAuthUser.cpp:1772][3396][1336][10/26/2011][00:40:00.267][CSmAuthUser::GetProp][true]
[00:40:00][Leave function CSmActiveExprLibrary::GetActiveValue][][][][SmActiveExpr.cpp:419][3396][1336][10/26/2011][00:40:00.267][CSmActiveExprLibrary::GetActiveValue][mygroups=CN=cooldudes,ou=groups,dc=coreblox,dc=com]
See if the whole thing is there. If it is, that means that the policy server is not chopping it off.
Then go check the agent trace log, you will see the header that the agent is setting:
[10/26/2011][00:40:00][3120][3596][CSmHttpPlugin::ProcessResponses][Setting custom HTTP header variable: 'HTTP_mygroups=CN=cooldudes,CN=Users,dc=coreblox,dc=com' from Policy Server]
If that looks ok, then the agent is setting the whole thing. You might be running into a header space limitation on the webserver. If that's the case, there are things you can do to help, like turning off some of siteminders other default headers, Disable*Vars settings in the agent conf object.
Let me know what you find guys.
regards,
Darren
This was definitely the problem. I was using an active expression and calling UserContext.getProp(String). Apparently the default buffer size is 100.
The API on this is really bad I have to say. If SM is going to truncate data it should be throwing an exception (like java.sql does) or provide some other means of feedback to let you know the data was truncated.
As it stands I have to get the data with an increased buffer size, if the length of the data == the buffer size I have to double the buffer and try again. I don't like it but their API leaves me no alternative that I can see.
Thanks for your help!
Agreed!!, in fact I had the same problem and took some time to figure it out.
Thanks Darren and Trever for your help!!
© 2012 Created by CoreBlox