public Object run() { LoginContextDriver.loginPrincipal(runAs.getPrincipal(), realmName); return null; } });
public Object run() { LoginContextDriver.loginPrincipal(runAs.getPrincipal(), realmName); return null; } });
(runAs.getPrincipal() == null || runAs.getPrincipal().length() == 0) && application != null && application.getRoleMapper() != null) {
(runAs.getPrincipal() == null || runAs.getPrincipal().length() == 0) && application != null && application.getRoleMapper() != null) {
String principal = runAsDescriptor.getPrincipal(); String servlet = wcd.getCanonicalName();
} else { String role = runas.getRoleName(); String user = runas.getPrincipal(); logger.finest(" Will run-as: Role: " + role + " Principal: " + user); if (runas!=null) { String role = runas.getRoleName(); String user = runas.getPrincipal(); logger.finest(" Will run-as: Role: " + role + " Principal: " + user);
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(); }
} else { String role = runas.getRoleName(); String user = runas.getPrincipal(); logger.finest(" Will run-as: Role: " + role + " Principal: " + user); if (runas!=null) { String role = runas.getRoleName(); String user = runas.getPrincipal(); logger.finest(" Will run-as: Role: " + role + " Principal: " + user);
public Node writeDescriptor(Element root, WebComponentDescriptor descriptor) { if (descriptor != null && descriptor.getRunAsIdentity() != null) { Node servletNode = appendChild(root, RuntimeTagNames.SERVLET_DESCRIPTOR); appendTextChild(servletNode, RuntimeTagNames.SERVLET_NAME, descriptor.getCanonicalName()); appendTextChild(servletNode, RuntimeTagNames.RUN_AS_PRINCIPAL_NAME, descriptor.getRunAsIdentity().getPrincipal()); return servletNode; } return null; } }
/** * 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(); }
descriptor.getRunAsIdentity().getPrincipal());
s1descriptor.setServletName(servlet.getCanonicalName()); if (servlet.getRunAsIdentity()!=null) { s1descriptor.setPrincipalName(servlet.getRunAsIdentity().getPrincipal());
if ( raid != null && raid.getPrincipal() != null ) { Node principalNode = appendChild(ejbNode, RuntimeTagNames.PRINCIPAL); appendTextChild(principalNode, RuntimeTagNames.NAME,raid.getPrincipal());
if ( raid != null && raid.getPrincipal() != null ) { Node principalNode = appendChild(ejbNode, RuntimeTagNames.PRINCIPAL); appendTextChild(principalNode, RuntimeTagNames.NAME,raid.getPrincipal());