Package org.jboss.security.integration.ejb

Examples of org.jboss.security.integration.ejb.EJBAuthorizationHelper.authorize()


            String iface = (locator != null) ? "Remote" : "Local";
           
            RunAsIdentity callerRunAs = SecurityActions.peekRunAsIdentity();
           
            EJBAuthorizationHelper helper = new EJBAuthorizationHelper(sc);
            boolean isAuthorized = helper.authorize(ejbName,
                             mi.getMethod(),
                             sc.getUtil().getUserPrincipal(),
                             iface,
                             ejbCS,
                             sc.getUtil().getSubject(),
View Full Code Here


/* 170 */         String iface = locator != null ? "Remote" : "Local";
/*     */
/* 172 */         RunAsIdentity callerRunAs = SecurityActions.peekRunAsIdentity();
/*     */
/* 174 */         EJBAuthorizationHelper helper = new EJBAuthorizationHelper(sc);
/* 175 */         boolean isAuthorized = helper.authorize(this.ejbName, mi.getMethod(), sc.getUtil().getUserPrincipal(), iface, this.ejbCS, sc.getUtil().getSubject(), callerRunAs, methodRoles);
/*     */
/* 183 */         if (!isAuthorized)
/* 184 */           throw new EJBAccessException("Caller unauthorized");
/*     */       }
/* 186 */       sc = invocation.invokeNext();
View Full Code Here

/*     */
/* 339 */     SecurityContext currentSC = SecurityActions.getSecurityContext();
/* 340 */     if (currentSC.getSecurityManagement() == null)
/* 341 */       currentSC.setSecurityManagement(this.securityManagement);
/* 342 */     EJBAuthorizationHelper eah = new EJBAuthorizationHelper(currentSC);
/* 343 */     isAuthorized = eah.authorize(this.ejbName, ejbMethod, mi.getPrincipal(), mi.getType().toInterfaceString(), this.ejbCS, caller, callerRunAsIdentity, methodRoles);
/*     */
/* 352 */     String msg = "Denied: caller with subject=" + caller + " and security context post-mapping roles=" + currentSC.getUtil().getRoles();
/*     */
/* 355 */     if (!isAuthorized)
/* 356 */       throw new SecurityException(msg);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.