(runAs.getRoleName() == null || runAs.getRoleName().length() == 0)) { DOLUtils.getDefaultLogger().log(Level.WARNING, "enterprise.deployment.backend.emptyRoleName"); String roleName = runAs.getRoleName();
@Override public Node writeDescriptor(Node parent, String nodeName, RunAsIdentityDescriptor descriptor) { Node subNode = super.writeDescriptor(parent, nodeName, descriptor); writeLocalizedDescriptions(subNode, descriptor); appendTextChild(subNode, TagNames.ROLE_NAME, descriptor.getRoleName()); return subNode; }
/** * write the descriptor class to a DOM tree and return it * * @param parent node in the DOM tree * @param node name for the root element for this DOM tree fragment * @param the descriptor to write * @return the DOM tree top node */ public Node writeDescriptor(Node parent, String nodeName, RunAsIdentityDescriptor descriptor) { Node subNode = super.writeDescriptor(parent, nodeName, descriptor); writeLocalizedDescriptions(subNode, descriptor); appendTextChild(subNode, EjbTagNames.ROLE_NAME, descriptor.getRoleName()); return subNode; }
(runAs.getRoleName() == null || runAs.getRoleName().length() == 0)) { DOLUtils.getDefaultLogger().log(Level.WARNING, "enterprise.deployment.backend.emptyRoleName"); String roleName = runAs.getRoleName();
"identity)"); } else { String role = runas.getRoleName(); String user = runas.getPrincipal(); logger.finest(" Will run-as: Role: " + role + (RunAsIdentityDescriptor)wcd.getRunAsIdentity(); if (runas!=null) { String role = runas.getRoleName(); String user = runas.getPrincipal(); logger.finest(" Will run-as: Role: " + role +
"identity)"); } else { String role = runas.getRoleName(); String user = runas.getPrincipal(); logger.finest(" Will run-as: Role: " + role + (RunAsIdentityDescriptor)wcd.getRunAsIdentity(); if (runas!=null) { String role = runas.getRoleName(); String user = runas.getPrincipal(); logger.finest(" Will run-as: Role: " + role +
public EJBSecurityManager(EjbDescriptor ejbDescriptor, InvocationManager invMgr, EJBSecurityManagerFactory fact) throws Exception { this.deploymentDescriptor = (EjbDescriptor) ejbDescriptor; this.invMgr = invMgr; roleMapperFactory = SecurityUtil.getRoleMapperFactory(); // get the default policy policy = Policy.getPolicy(); ejbSFM = fact; boolean runas = !(deploymentDescriptor.getUsesCallerIdentity()); if (runas) { runAs = deploymentDescriptor.getRunAsIdentity(); // Note: runAs may be null even when runas==true if this EJB // is an MDB. if (runAs != null) { if (_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, deploymentDescriptor.getEjbClassName() + " will run-as: " + runAs.getPrincipal() + " (" + runAs.getRoleName() + ")"); } } } else { runAs = null; } initialize(); }
/** * This method iniitalizes the EJBSecurityManager */ public EJBSecurityManager(EjbDescriptor ejbDescriptor, InvocationManager invMgr, EJBSecurityManagerFactory fact) throws Exception { this.deploymentDescriptor = (EjbDescriptor) ejbDescriptor; this.invMgr = invMgr; roleMapperFactory = Globals.get(SecurityRoleMapperFactory.class); // get the default policy policy = Policy.getPolicy(); ejbSFM = fact; boolean runas = !(deploymentDescriptor.getUsesCallerIdentity()); if (runas) { runAs = deploymentDescriptor.getRunAsIdentity(); // Note: runAs may be null even when runas==true if this EJB // is an MDB. if (runAs != null) { if (_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, deploymentDescriptor.getEjbClassName() + " will run-as: " + runAs.getPrincipal() + " (" + runAs.getRoleName() + ")"); } } } else { runAs = null; } initialize(); }
wrapper.setRunAs(webComponentDesc.getRunAsIdentity().getRoleName());