new QName(((Element)currentChild).getNamespaceURI(), ((Element)currentChild).getLocalName()); Processor proc = request.getWssConfig().getProcessor(el); if (proc != null) { completeResults.addAll(proc.handleToken((Element)currentChild, request)); Processor proc = request.getWssConfig().getProcessor(el); if (proc != null) { LOG.debug("Processing decrypted element with: {}", proc.getClass().getName()); Processor proc = request.getWssConfig().getProcessor(el); if (proc != null) { LOG.debug("Processing decrypted element with: {}", proc.getClass().getName());
wsDocInfo.setCrypto(requestData.getSigVerCrypto()); wsDocInfo.setSecurityHeader(securityHeader); final WSSConfig wssConfig = requestData.getWssConfig();
if (requestData.getWssConfig() == null) { requestData.setWssConfig(getWssConfig());
); Processor proc = request.getWssConfig().getProcessor(WSConstants.SAML_TOKEN); List<WSSecurityEngineResult> samlResult = proc.handleToken(token, request); return
public void execute(WSHandler handler, SecurityActionToken actionToken, RequestData reqData) throws WSSecurityException { // // add the Timestamp to the SOAP Envelope // WSSecTimestamp timeStampBuilder = new WSSecTimestamp(reqData.getSecHeader()); timeStampBuilder.setIdAllocator(reqData.getWssConfig().getIdAllocator()); timeStampBuilder.setPrecisionInMilliSeconds(reqData.isPrecisionInMilliSeconds()); timeStampBuilder.setTimeToLive(reqData.getTimeStampTTL()); timeStampBuilder.setWsTimeSource(reqData.getWssConfig().getCurrentTime()); timeStampBuilder.setWsDocInfo(reqData.getWsDocInfo()); timeStampBuilder.setExpandXopInclude(reqData.isExpandXopInclude()); timeStampBuilder.build(); } }
key = KeyUtils.prepareSecretKey(symEncAlgo, secretKey); encrKeyResults = new ArrayList<>(); } else if (encryptedKeyElement != null && data.getWssConfig() != null) { WSSConfig wssConfig = data.getWssConfig(); Processor encrKeyProc = wssConfig.getProcessor(WSConstants.ENCRYPTED_KEY); encrKeyResults = encrKeyProc.handleToken(encryptedKeyElement, data); WSSConfig wssConfig = data.getWssConfig(); if (wssConfig != null) { if (decryptedElem != null) { //is null if we processed an attachment QName el = new QName(decryptedElem.getNamespaceURI(), decryptedElem.getLocalName()); Processor proc = data.getWssConfig().getProcessor(el); if (proc != null) { LOG.debug("Processing decrypted element with: {}", proc.getClass().getName());
wsc.setIdAllocator(reqData.getWssConfig().getIdAllocator()); wsc.setWsDocInfo(reqData.getWsDocInfo()); wsc.setExpandXopInclude(reqData.isExpandXopInclude());
target.name() + " security header", wse); final WSSConfig wssConfig = reqData.getWssConfig(); for (HandlerAction actionToDo : actions) { log.debug("Performing Action: " + convertAction(actionToDo));
QName el = new QName(token.getNamespaceURI(), token.getLocalName()); if (el.equals(WSConstants.BINARY_TOKEN)) { Processor proc = data.getWssConfig().getProcessor(WSConstants.BINARY_TOKEN); List<WSSecurityEngineResult> bstResult = proc.handleToken(token, parameters.getData()); BinarySecurity bstToken = principal = (Principal)bstResult.get(0).get(WSSecurityEngineResult.TAG_PRINCIPAL); } else if (el.equals(WSConstants.SAML_TOKEN) || el.equals(WSConstants.SAML2_TOKEN)) { Processor proc = data.getWssConfig().getProcessor(WSConstants.SAML_TOKEN); } else if (el.equals(WSConstants.ENCRYPTED_KEY)) { STRParserUtil.checkEncryptedKeyBSPCompliance(secRef, data.getBSPEnforcer()); Processor proc = data.getWssConfig().getProcessor(WSConstants.ENCRYPTED_KEY); List<WSSecurityEngineResult> encrResult = proc.handleToken(token, data); secretKey =
QName el = new QName(token.getNamespaceURI(), token.getLocalName()); if (el.equals(WSConstants.BINARY_TOKEN)) { Processor proc = data.getWssConfig().getProcessor(WSConstants.BINARY_TOKEN); List<WSSecurityEngineResult> bstResult = proc.handleToken(token, data); BinarySecurity bstToken =
protected void doReceiverAction(List<Integer> actions, RequestData reqData) throws WSSecurityException { WSSConfig wssConfig = reqData.getWssConfig(); if (wssConfig == null) { wssConfig = WSSConfig.getNewInstance();
builder.setIdAllocator(reqData.getWssConfig().getIdAllocator()); builder.setPrecisionInMilliSeconds(reqData.isPrecisionInMilliSeconds()); builder.setWsTimeSource(reqData.getWssConfig().getCurrentTime()); builder.setWsDocInfo(reqData.getWsDocInfo()); builder.setExpandXopInclude(reqData.isExpandXopInclude()); sign.setIdAllocator(reqData.getWssConfig().getIdAllocator()); sign.setAddInclusivePrefixes(reqData.isAddInclusivePrefixes());
builder.setIdAllocator(reqData.getWssConfig().getIdAllocator()); builder.setPrecisionInMilliSeconds(reqData.isPrecisionInMilliSeconds()); builder.setWsTimeSource(reqData.getWssConfig().getCurrentTime()); builder.setPasswordType(reqData.getPwType()); builder.setPasswordsAreEncoded(reqData.isEncodePasswords());
throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "noCredential"); if (data.getWssConfig() == null) { throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "empty", new Object[] {"WSSConfig cannot be null"});
handler.getPasswordCB(encryptionToken.getUser(), WSConstants.DKT_ENCR, callbackHandler, reqData); WSSecDKEncrypt wsEncrypt = new WSSecDKEncrypt(reqData.getSecHeader()); wsEncrypt.setIdAllocator(reqData.getWssConfig().getIdAllocator()); wsEncrypt.setWsDocInfo(reqData.getWsDocInfo()); wsEncrypt.setExpandXopInclude(reqData.isExpandXopInclude());
handler.getPasswordCB(signatureToken.getUser(), WSConstants.DKT_SIGN, callbackHandler, reqData); WSSecDKSign wsSign = new WSSecDKSign(reqData.getSecHeader()); wsSign.setIdAllocator(reqData.getWssConfig().getIdAllocator()); wsSign.setAddInclusivePrefixes(reqData.isAddInclusivePrefixes()); wsSign.setWsDocInfo(reqData.getWsDocInfo());
handler.getPasswordCB(signatureToken.getUser(), WSConstants.SIGN, callbackHandler, reqData); WSSecSignature wsSign = new WSSecSignature(reqData.getSecHeader()); wsSign.setIdAllocator(reqData.getWssConfig().getIdAllocator()); wsSign.setAddInclusivePrefixes(reqData.isAddInclusivePrefixes()); wsSign.setWsDocInfo(reqData.getWsDocInfo());
public void execute(WSHandler handler, SecurityActionToken actionToken, RequestData reqData) throws WSSecurityException { WSSecSAMLToken builder = new WSSecSAMLToken(reqData.getSecHeader()); builder.setIdAllocator(reqData.getWssConfig().getIdAllocator()); builder.setWsDocInfo(reqData.getWsDocInfo()); builder.setExpandXopInclude(reqData.isExpandXopInclude());
wsSign.setIdAllocator(reqData.getWssConfig().getIdAllocator()); wsSign.setAddInclusivePrefixes(reqData.isAddInclusivePrefixes()); wsSign.setWsDocInfo(reqData.getWsDocInfo());
public void execute(WSHandler handler, SecurityActionToken actionToken, RequestData reqData) throws WSSecurityException { WSSecEncrypt wsEncrypt = new WSSecEncrypt(reqData.getSecHeader()); wsEncrypt.setIdAllocator(reqData.getWssConfig().getIdAllocator()); wsEncrypt.setWsDocInfo(reqData.getWsDocInfo()); wsEncrypt.setExpandXopInclude(reqData.isExpandXopInclude());