[jboss-user] [JBoss Portal] - Re: No principals found in domain error
kpalania
do-not-reply at jboss.com
Wed Sep 12 10:30:04 EDT 2007
public boolean implies(ProtectionDomain domain, Permission permission)
| {
| // Check the
| boolean isJaccPermission = permission instanceof EJBMethodPermission
| || permission instanceof EJBRoleRefPermission
| || permission instanceof WebResourcePermission
| || permission instanceof WebRoleRefPermission
| || permission instanceof WebUserDataPermission;
| boolean implied = false;
| // If there are external permission types check them
| if( isJaccPermission == false && externalPermissionTypes.length > 0 )
| {
| Class pc = permission.getClass();
| for(int n = 0; n < externalPermissionTypes.length; n ++)
| {
| Class epc = externalPermissionTypes[n];
| if( epc.isAssignableFrom(pc) )
| {
| isJaccPermission = true;
| break;
| }
| }
| }
|
| if (isJaccPermission == false)
| {
| // Let the delegate policy handle the check
| implied = delegate.implies(domain, permission);
| }
| else
| {
| if (trace)
| {
| log.trace("implies, domain=" + domain + ", permission=" + permission);
| try
| {
| Subject caller = (Subject) PolicyContext.getContext("javax.security.auth.Subject.container");
| log.trace("implies javax.security.auth.Subject.container: "+caller);
| }
| catch(Throwable e)
| {
| log.trace("Failed to access Subject context", e);
| }
| }
| String contextID = PolicyContext.getContextID();
| ContextPolicy contextPolicy = (ContextPolicy) activePolicies.get(contextID);
| if (contextPolicy != null)
| implied = contextPolicy.implies(domain, permission);
| else if (trace)
| log.trace("No PolicyContext found for contextID=" + contextID);
| }
| if (trace)
| {
| log.trace("implied=" + implied);
| }
| return implied;
| }
It is this piece of code in DelegatingPolicy.java that is relevant to my case (I'm pretty sure). In the case where it fails, isJaccPermission is FALSE. Now, how do I fix this :(
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083476#4083476
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083476
More information about the jboss-user
mailing list