private void validateSecurityContext() { if(securityContext == null) throw PicketBoxMessages.MESSAGES.invalidNullProperty("securityDomain"); } }
public void init(Map<String, Object> options) { if (options != null) { dsJndiName = (String) options.get("dsJndiName"); if (dsJndiName == null) throw PicketBoxMessages.MESSAGES.invalidNullProperty("dsJndiName"); rolesQuery = (String) options.get("rolesQuery"); if (rolesQuery == null) throw PicketBoxMessages.MESSAGES.invalidNullProperty("rolesQuery"); String option = (String) options.get("suspendResume"); if (option != null) suspendResume = Boolean.valueOf(option.toString()).booleanValue(); // Get the Transaction Manager JNDI Name option = (String) options.get("transactionManagerJndiName"); if (option != null) TX_MGR_JNDI_NAME = option; try { if (suspendResume) tm = getTransactionManager(); } catch (NamingException e) { throw PicketBoxMessages.MESSAGES.failedToGetTransactionManager(e); } } }
throw PicketBoxMessages.MESSAGES.invalidNullProperty("resourceMap"); throw PicketBoxMessages.MESSAGES.invalidNullProperty("policyRegistration"); this.policyContextID = webResource.getPolicyContextID(); throw PicketBoxMessages.MESSAGES.invalidNullProperty("servletRequest");
throw PicketBoxMessages.MESSAGES.invalidNullProperty("resourceMap"); throw PicketBoxMessages.MESSAGES.invalidNullProperty(ResourceKeys.POLICY_REGISTRATION); this.policyContextID = ejbResource.getPolicyContextID(); if(policyContextID == null) throw PicketBoxMessages.MESSAGES.invalidNullProperty("contextID");
throw PicketBoxMessages.MESSAGES.invalidNullProperty("resourceMap");
/** * @see IdentityTrustManager#isTrusted(org.jboss.security.SecurityContext) */ public TrustDecision isTrusted(SecurityContext securityContext) { if(securityContext == null) throw PicketBoxMessages.MESSAGES.invalidNullArgument("securityContext"); if(this.identityTrustContext == null) this.identityTrustContext = new JBossIdentityTrustContext(securityDomain, securityContext); TrustDecision td = TrustDecision.NotApplicable; if(this.identityTrustContext == null) throw PicketBoxMessages.MESSAGES.invalidNullProperty("identityTrustContext"); try { td = this.identityTrustContext.isTrusted(); } catch (IdentityTrustException e) { PicketBoxLogger.LOGGER.debugIgnoredException(e); } return td; }
throw PicketBoxMessages.MESSAGES.invalidNullProperty("resourceMap");
throw PicketBoxMessages.MESSAGES.invalidNullProperty("resourceMap");
throw PicketBoxMessages.MESSAGES.invalidNullProperty("ejbMethod"); throw PicketBoxMessages.MESSAGES.invalidNullProperty("principalRole");
throw PicketBoxMessages.MESSAGES.invalidNullProperty("userPrincipal");
/** * Process the ejb request * @param callerRoles * @return */ private int process(RoleGroup callerRoles) { int result = AuthorizationContext.DENY; EJBXACMLUtil util = new EJBXACMLUtil(); try { RequestContext requestCtx = util.createXACMLRequest(this.ejbName, this.ejbMethod, this.ejbPrincipal, callerRoles); PolicyDecisionPoint pdp = util.getPDP(policyRegistration, this.policyContextID); if(pdp == null) throw PicketBoxMessages.MESSAGES.invalidNullProperty("PDP"); ResponseContext response = pdp.evaluate(requestCtx); result = response.getDecision() == XACMLConstants.DECISION_PERMIT ? AuthorizationContext.PERMIT : AuthorizationContext.DENY; } catch(Exception e) { PicketBoxLogger.LOGGER.debugIgnoredException(e); result = AuthorizationContext.DENY; } return result; }
throw PicketBoxMessages.MESSAGES.invalidNullProperty("AuthorizationManager");
throw PicketBoxMessages.MESSAGES.invalidNullProperty("AuthorizationManager");
throw PicketBoxMessages.MESSAGES.invalidNullProperty("AuthorizationManager");
throw PicketBoxMessages.MESSAGES.invalidNullProperty("AuthorizationManager");
throw PicketBoxMessages.MESSAGES.invalidNullProperty("AuthorizationManager");
throw PicketBoxMessages.MESSAGES.invalidNullProperty("AuthorizationManager");
throw PicketBoxMessages.MESSAGES.invalidNullProperty("AuthorizationManager");