/** * @return a new WSSConfig instance configured with the default values */ public static WSSConfig getNewInstance() { init(); return new WSSConfig(); }
/** * Initialize system configuration */ public void init() { this.silent = Boolean.getBoolean(MIDPOINT_SILENT_PROPERTY); initializeMidpointHomePath(); File midpointHome = new File(midPointHomePath); setupInitialLoggingFromHomeDirectory(midpointHome); loadConfiguration(midpointHome); if (isSafeMode()) { LOGGER.info("Safe mode is ON; setting tolerateUndeclaredPrefixes to TRUE"); QNameUtil.setTolerateUndeclaredPrefixes(true); } // Make sure that this is called very early in the startup sequence. // This is needed to properly initialize the resources // (the "org/apache/xml/security/resource/xmlsecurity" resource bundle error) WSSConfig.init(); }
protected void addToken(SoapMessage message) { WSSConfig.init(); SamlToken tok = (SamlToken)assertTokens(message); Header h = findSecurityHeader(message, true); try { SamlAssertionWrapper wrapper = addSamlToken(tok, message); if (wrapper == null) { AssertionInfoMap aim = message.get(AssertionInfoMap.class); Collection<AssertionInfo> ais = PolicyUtils.getAllAssertionsByLocalname(aim, SPConstants.SAML_TOKEN); for (AssertionInfo ai : ais) { if (ai.isAsserted()) { ai.setAsserted(false); } } return; } Element el = (Element)h.getObject(); el = (Element)DOMUtils.getDomElement(el); el.appendChild(wrapper.toDOM(el.getOwnerDocument())); } catch (WSSecurityException ex) { policyNotAsserted(tok, ex.getMessage(), message); } }
protected void addToken(SoapMessage message) { WSSConfig.init(); SamlToken tok = (SamlToken)assertTokens(message); Header h = findSecurityHeader(message, true); try { SamlAssertionWrapper wrapper = addSamlToken(tok, message); if (wrapper == null) { AssertionInfoMap aim = message.get(AssertionInfoMap.class); Collection<AssertionInfo> ais = PolicyUtils.getAllAssertionsByLocalname(aim, SPConstants.SAML_TOKEN); for (AssertionInfo ai : ais) { if (ai.isAsserted()) { ai.setAsserted(false); } } return; } Element el = (Element)h.getObject(); el = (Element)DOMUtils.getDomElement(el); el.appendChild(wrapper.toDOM(el.getOwnerDocument())); } catch (WSSecurityException ex) { policyNotAsserted(tok, ex.getMessage(), message); } }
WSSConfig.init();
@BeforeClass public static void startServers() throws Exception { WSSConfig.init();
@BeforeClass public static void startServers() throws Exception { WSSConfig.init();