Access Control Troubleshooting (verbose logging style)
Access control. Those two words alone can send the heartiest of men into a fit of tears when faced with trying to debug issues related to them. Tracking down why someone does or does not have access to something in Windchill can be downright tedious. Anytime you enable the wt.access.evaluation.* loggers you can pretty much expect to have to sift through a "War and Peace"-length log to get to the bottom of it.
Below is a mini-tutorial/demonstration on how to potentially troubleshoot access control issues where permission has been denied. Similar techniques can be used in other scenarios.
The following demonstrates an issue where a normal user needs to be able to modify team templates on the Team Administration page, but we don't know what permissions are needed for this action.
Start out by enabling the wt.access.evaluation.* logging (wt.access.evaluation.report, wt.access.evaluation.policyACL, wt.access.evaluation.securityLabels, and wt.access.evaluation.events set to ALL). This is done in the JMXConsole/SMJConsole (you could also do this by using the SetLogLevel action in a windchill shell) just before clicking anything in the Team Administration page when logged in as the regular user (lsood, in this case).
Once enabled one of the listed team templates is selected and immediately after the logging is disabled and logs analyzed.
In this particular case we are interested in anything that comes back saying that the access permission was false for Team-related objects (e.g. where “hasAccess is false” appears in the log and lsood is the user). The following is found in the log:
2014-04-22 19:50:15,320 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.report lsood -=> hasAccess: lsood, object = Team - Change Activity Team (wt.team.TeamTemplate:42967), permission = Modify
2014-04-22 19:50:15,331 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.report lsood - type = WCTYPE|wt.team.TeamTemplate, domain = Site /System (wt.admin.AdministrativeDomain:8)
2014-04-22 19:50:15,332 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.report lsood - checking for policy access ...
2014-04-22 19:50:15,334 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.policyACL lsood - => getPolicyAcl - IN: = wt.admin.AdministrativeDomain:8, wt.team.TeamTemplate
2014-04-22 19:50:15,378 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.policyACL lsood - <= getPolicyAcl - OUT - acl from cache: wt.admin.AdministrativeDomain:8, wt.team.TeamTemplate
2014-04-22 19:50:15,380 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.policyACL lsood - + Participant: uid=bozo1,ou=people,cn=administrativeldap,cn=windchill_10.1,o=ptc (wt.org.WTUser:311123): [Full Control (All)]
2014-04-22 19:50:15,381 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.policyACL lsood - + Participant: ALL: [Read]
2014-04-22 19:50:15,382 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.policyACL lsood - + Participant: cn=lifecycleadministrators,ou=people,cn=administrativeldap,cn=windchill_10.1,o=ptc (wt.org.WTGroup:1424): [Read, Modify, Create, Delete]
2014-04-22 19:50:15,384 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.policyACL lsood - + Participant: cn=administrators,ou=people,cn=administrativeldap,cn=windchill_10.1,o=ptc (wt.org.WTGroup:15): [Full Control (All)]
2014-04-22 19:50:15,385 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.policyACL lsood - ! Participant: cn=view and print only,ou=people,cn=administrativeldap,cn=windchill_10.1,o=ptc (wt.org.WTGroup:24589): [Modify, Create, Delete, Administrative, Revise, New View Version, Change Permissions, Modify Content, Change Domain, Create By Move, Change Context, Set State, Modify Identity]
2014-04-22 19:50:15,388 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.report lsood - => AclEntrySet.getPermissionMasks: uid=lsood,ou=people,cn=enterpriseldap,cn=windchill_10.1,o=ptc, id = wt.org.WTUser:104696
2014-04-22 19:50:15,389 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.report lsood - <= AclEntrySet.getPermissionMasks: (from cache), grant = 1 [Read], absolute deny = 0 []
2014-04-22 19:50:15,390 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.report lsood - object is ownable - check for owner rights
2014-04-22 19:50:15,391 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.report lsood - checking for ad hoc access ...
2014-04-22 19:50:15,392 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.report lsood -<= hasAccess is false: lsood, object = Team - Change Activity Team (wt.team.TeamTemplate:42967), permission = Modify
Break down the logging:
- The first bolded line indicates the beginning of the check (=> hasAccess) for a specific permission (Modify) and specifies the object type for which it is checking permissions (wt.team.TeamTemplate):
2014-04-22 19:50:15,320 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.report lsood -=> hasAccess: lsood, object = Team - Change Activity Team (wt.team.TeamTemplate:42967), permission = Modify
- The next bolded text indicates the domain where it is checking for this permission. In this case it is the Site’s System domain.
2014-04-22 19:50:15,331 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.report lsood - type = WCTYPE|wt.team.TeamTemplate, domain = Site /System (wt.admin.AdministrativeDomain:8)
It is searching here because the team template that I selected was created at the Site level. If I selected a team template created at the Org or Product/Library/Project level, then this domain would be the system domain for that context (i.e. Org’s System domain or Product/Library/Project’s System domain).
For example:
2014-04-22 20:03:12,703 DEBUG [RMI TCP Connection(13062)-10.198.108.33] wt.access.evaluation.report lsood - type = WCTYPE|wt.team.TeamTemplate, domain = Site, Organization - Demo Organization, Demo Organization, Product - Lori Product, Demo Organization /System (wt.admin.AdministrativeDomain:322606)
The above line is essentially saying that it is checking the System domain under the Site > Demo Organization > Lori Product.
- The middle section describes which groups/roles/users are being checked for access and what access those groups/roles/users have:
014-04-22 19:50:15,332 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.report lsood - checking for policy access ...
2014-04-22 19:50:15,334 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.policyACL lsood - => getPolicyAcl - IN: = wt.admin.AdministrativeDomain:8, wt.team.TeamTemplate
2014-04-22 19:50:15,378 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.policyACL lsood - <= getPolicyAcl - OUT - acl from cache: wt.admin.AdministrativeDomain:8, wt.team.TeamTemplate
2014-04-22 19:50:15,380 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.policyACL lsood - + Participant: uid=bozo1,ou=people,cn=administrativeldap,cn=windchill_10.1,o=ptc (wt.org.WTUser:311123): [Full Control (All)]
2014-04-22 19:50:15,381 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.policyACL lsood - + Participant: ALL: [Read]
2014-04-22 19:50:15,382 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.policyACL lsood - + Participant: cn=lifecycleadministrators,ou=people,cn=administrativeldap,cn=windchill_10.1,o=ptc (wt.org.WTGroup:1424): [Read, Modify, Create, Delete]
2014-04-22 19:50:15,384 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.policyACL lsood - + Participant: cn=administrators,ou=people,cn=administrativeldap,cn=windchill_10.1,o=ptc (wt.org.WTGroup:15): [Full Control (All)]
2014-04-22 19:50:15,385 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.policyACL lsood - ! Participant: cn=view and print only,ou=people,cn=administrativeldap,cn=windchill_10.1,o=ptc (wt.org.WTGroup:24589): [Modify, Create, Delete, Administrative, Revise, New View Version, Change Permissions, Modify Content, Change Domain, Create By Move, Change Context, Set State, Modify Identity]
The above says that the following permissions have been given for the following principals:
User: bozo1 has Full Control
Pseudo Role: ALL has Read
Group: Lifecycle Administrators has Read, Modify, Create and Delete
Group: Administrators has Full Control
Group View and Print Only has absolute deny on Modify, Create, Delete, Administrative, Revise, New View Version, Change Permissions, Modify Content, Change Domain, Create By Move, Change Context, Set State, Modify Identity
Note: a "+" before the "Participant:" text indicates permission(s) is granted, a "-" before the "Participant:" text indicates permission(s) is denied, and a "!" before the "Participant:" text indicates the permission(s) is absolute denied
- The next section reconciles the user's permissions based on the association to groups/roles/users listed above and their permissions:
2014-04-22 19:50:15,388 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.report lsood - => AclEntrySet.getPermissionMasks: uid=lsood,ou=people,cn=enterpriseldap,cn=windchill_10.1,o=ptc, id = wt.org.WTUser:104696
2014-04-22 19:50:15,389 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.report lsood - <= AclEntrySet.getPermissionMasks: (from cache), grant = 1 [Read], absolute deny = 0 []
This means that lsood has been granted Read permission and no permissions have been absolutely denied. This indicates that the only group that lsood is associated with is ALL since that is the only one above that matches the same permission set.
- The last bolded line in the above block indicates that the check is complete (<= hasAccess) and provides the result (lsood did not have the Modify permission):
2014-04-22 19:50:15,392 DEBUG [RMI TCP Connection(13034)-10.198.108.33] wt.access.evaluation.report lsood -<= hasAccess is false: lsood, object = Team - Change Activity Team (wt.team.TeamTemplate:42967), permission = Modify
Now that you know how to break down the access control logging output, hopefully troubleshooting such issues won't be quite as daunting. Happy access control hunting!

