public static boolean assertPolicy(AssertionInfoMap aim, String localname) { Collection<AssertionInfo> ais = getAllAssertionsByLocalname(aim, localname); if (!ais.isEmpty()) { for (AssertionInfo ai : ais) { ai.setAsserted(true); } return true; } return false; }
public void assertPolicy(QName qName) { Collection<AssertionInfo> ais = aim.getAssertionInfo(qName); if (ais != null && !ais.isEmpty()) { for (AssertionInfo ai : ais) { ai.setAsserted(true); } } }
public static boolean assertPolicy(AssertionInfoMap aim, QName name) { Collection<AssertionInfo> ais = aim.getAssertionInfo(name); if (ais != null && !ais.isEmpty()) { for (AssertionInfo ai : ais) { ai.setAsserted(true); } return true; } return false; }
private void assertAssertion(AssertionInfoMap aim, QName type) { Collection<AssertionInfo> aic = aim.getAssertionInfo(type); for (AssertionInfo ai : aic) { ai.setAsserted(true); } }
public void assertPolicy(QName qName) { Collection<AssertionInfo> ais = aim.getAssertionInfo(qName); if (ais != null && !ais.isEmpty()) { for (AssertionInfo ai : ais) { ai.setAsserted(true); } } }
public static boolean assertPolicy(AssertionInfoMap aim, QName name) { Collection<AssertionInfo> ais = aim.getAssertionInfo(name); if (ais != null && !ais.isEmpty()) { for (AssertionInfo ai : ais) { ai.setAsserted(true); } return true; } return false; }
public static boolean assertPolicy(AssertionInfoMap aim, String localname) { Collection<AssertionInfo> ais = getAllAssertionsByLocalname(aim, localname); if (!ais.isEmpty()) { for (AssertionInfo ai : ais) { ai.setAsserted(true); } return true; } return false; }
private void assertAssertion(AssertionInfoMap aim, QName type) { Collection<AssertionInfo> aic = aim.getAssertionInfo(type); for (AssertionInfo ai : aic) { ai.setAsserted(true); } }
protected void assertSecurePartsIfTokenNotRequired( AbstractSecurityAssertion securedPart, QName name, AssertionInfoMap aim ) { Collection<AssertionInfo> ais = aim.get(name); if (ais != null && !ais.isEmpty()) { for (AssertionInfo ai : ais) { if (ai.getAssertion().equals(securedPart)) { ai.setAsserted(true); } } } } public boolean isEnforceEncryptedTokens() {
protected void assertSecurePartsIfTokenNotRequired( AbstractSecurityAssertion securedPart, QName name, AssertionInfoMap aim ) { Collection<AssertionInfo> ais = aim.get(name); if (ais != null && !ais.isEmpty()) { for (AssertionInfo ai : ais) { if (ai.getAssertion().equals(securedPart)) { ai.setAsserted(true); } } } } public boolean isEnforceEncryptedTokens() {
/** * Asserts all RMAssertion assertions for the current message, regardless their attributes * (if there is more than one we have ensured that they are all supported by considering * e.g. the minimum acknowledgment interval). * @param message the current message */ void assertReliability(Message message) { AssertionInfoMap aim = message.get(AssertionInfoMap.class); Collection<AssertionInfo> ais = RMPolicyUtilities.collectRMAssertions(aim); for (AssertionInfo ai : ais) { ai.setAsserted(true); } } protected abstract void handle(Message message) throws SequenceFault, RMException;
public void assertPolicy(Assertion assertion) { Collection<AssertionInfo> ais = aim.getAssertionInfo(assertion.getName()); if (ais != null && !ais.isEmpty()) { for (AssertionInfo ai : ais) { if (ai.getAssertion() == assertion) { ai.setAsserted(true); } } } }
public void handleMessage(Message message) throws Fault { AssertionInfoMap aim = message.get(AssertionInfoMap.class); for (QName an : getAssertionTypes()) { Collection<AssertionInfo> ais = aim.getAssertionInfo(an); if (LOG.isLoggable(Level.INFO)) { LOG.info("Asserting for " + an); } if (null != ais) { for (AssertionInfo ai : ais) { ai.setAsserted(true); } } } } }
public void assertPolicy(Assertion assertion) { Collection<AssertionInfo> ais = aim.getAssertionInfo(assertion.getName()); if (ais != null && !ais.isEmpty()) { for (AssertionInfo ai : ais) { if (ai.getAssertion() == assertion) { ai.setAsserted(true); } } } }
public void handleMessage(Message message) throws Fault { AssertionInfoMap aim = message.get(AssertionInfoMap.class); for (QName an : getAssertionTypes()) { Collection<AssertionInfo> ais = aim.getAssertionInfo(an); if (LOG.isLoggable(Level.INFO)) { LOG.info("Asserting for " + an); } if (null != ais) { for (AssertionInfo ai : ais) { ai.setAsserted(true); } } } } }
public Credential validate(Credential credential, RequestData data) throws WSSecurityException { Credential validatedCredential = super.validate(credential, data); // Assert the IssuedToken policy SoapMessage message = (SoapMessage)data.getMsgContext(); AssertionInfoMap aim = message.get(AssertionInfoMap.class); Collection<AssertionInfo> ais = aim.get(SP12Constants.ISSUED_TOKEN); for (AssertionInfo ai : ais) { ai.setAsserted(true); } return validatedCredential; }
protected AbstractToken assertTokens(SoapMessage message, String localname, boolean signed) { AssertionInfoMap aim = message.get(AssertionInfoMap.class); Collection<AssertionInfo> ais = PolicyUtils.getAllAssertionsByLocalname(aim, localname); AbstractToken tok = null; for (AssertionInfo ai : ais) { tok = (AbstractToken)ai.getAssertion(); ai.setAsserted(true); } PolicyUtils.assertPolicy(aim, SPConstants.SUPPORTING_TOKENS); if (signed || isTLSInUse(message)) { PolicyUtils.assertPolicy(aim, SPConstants.SIGNED_SUPPORTING_TOKENS); } return tok; }
protected AbstractToken assertTokens(SoapMessage message, String localname, boolean signed) { AssertionInfoMap aim = message.get(AssertionInfoMap.class); Collection<AssertionInfo> ais = PolicyUtils.getAllAssertionsByLocalname(aim, localname); AbstractToken tok = null; for (AssertionInfo ai : ais) { tok = (AbstractToken)ai.getAssertion(); ai.setAsserted(true); } PolicyUtils.assertPolicy(aim, SPConstants.SUPPORTING_TOKENS); if (signed || isTLSInUse(message)) { PolicyUtils.assertPolicy(aim, SPConstants.SIGNED_SUPPORTING_TOKENS); } return tok; }
/** * Validate policies. */ public void validatePolicies(PolicyValidatorParameters parameters, Collection<AssertionInfo> ais) { for (AssertionInfo ai : ais) { Layout layout = (Layout)ai.getAssertion(); ai.setAsserted(true); assertToken(layout, parameters.getAssertionInfoMap()); if (!validatePolicy(layout, parameters.getResults().getResults(), parameters.getSignedResults())) { String error = "Layout does not match the requirements"; ai.setNotAsserted(error); } } }
/** * Validate policies. */ public void validatePolicies(PolicyValidatorParameters parameters, Collection<AssertionInfo> ais) { for (AssertionInfo ai : ais) { Layout layout = (Layout)ai.getAssertion(); ai.setAsserted(true); assertToken(layout, parameters.getAssertionInfoMap()); if (!validatePolicy(layout, parameters.getResults().getResults(), parameters.getSignedResults())) { String error = "Layout does not match the requirements"; ai.setNotAsserted(error); } } }