/** * Return true if this token is a Kerberos GSS V5 AP REQ token */ public boolean isGssV5ApReq() { String type = getValueType(); if (WSConstants.WSS_GSS_KRB_V5_AP_REQ.equals(type) || WSConstants.WSS_GSS_KRB_V5_AP_REQ1510.equals(type) || WSConstants.WSS_GSS_KRB_V5_AP_REQ4120.equals(type)) { return true; } return false; }
public void retrieveServiceTicket( String jaasLoginModuleName, CallbackHandler callbackHandler, String serviceName, boolean isUsernameServiceNameForm ) throws WSSecurityException { retrieveServiceTicket(jaasLoginModuleName, callbackHandler, serviceName, isUsernameServiceNameForm, false); }
KerberosTicket tgt = getKerberosTicket(clientSubject, null); secretKey = new SecretKeySpec(sessionKey.getEncoded(), sessionKey.getAlgorithm()); } else { KerberosTicket serviceTicket = getKerberosTicket(clientSubject, tgt); secretKey = serviceTicket.getSessionKey(); setToken(krbCtx.getKerberosToken()); if ("".equals(getValueType())) { setValueType(WSConstants.WSS_GSS_KRB_V5_AP_REQ);
/** * Checks the <code>element</code> and creates appropriate binary security object. * * @param element The XML element that contains either a <code>BinarySecurityToken * </code> or a <code>PKIPath</code> element. * @param config A WSSConfig instance * @return a BinarySecurity token element * @throws WSSecurityException */ private BinarySecurity createSecurityToken( Element element, WSSConfig config ) throws WSSecurityException { String type = element.getAttributeNS(null, "ValueType"); BinarySecurity token = null; if (X509Security.X509_V3_TYPE.equals(type)) { token = new X509Security(element, config.isWsiBSPCompliant()); } else if (PKIPathSecurity.getType().equals(type)) { token = new PKIPathSecurity(element, config.isWsiBSPCompliant()); } else if (KerberosSecurity.isKerberosToken(type)) { token = new KerberosSecurity(element, config.isWsiBSPCompliant()); } else { token = new BinarySecurity(element, config.isWsiBSPCompliant()); } return token; }
|| WSConstants.WSS_SAML_KI_VALUE_TYPE.equals(type) || WSConstants.WSS_SAML2_KI_VALUE_TYPE.equals(type) || KerberosSecurity.isKerberosToken(type))) {
KerberosTicket tgt = getKerberosTicket(clientSubject, null); secretKey = new SecretKeySpec(sessionKey.getEncoded(), sessionKey.getAlgorithm()); } else { KerberosTicket serviceTicket = getKerberosTicket(clientSubject, tgt); secretKey = serviceTicket.getSessionKey(); setToken(krbCtx.getKerberosToken()); if ("".equals(getValueType())) { setValueType(WSConstants.WSS_GSS_KRB_V5_AP_REQ);
/** * Checks the <code>element</code> and creates appropriate binary security object. * * @param element The XML element that contains either a <code>BinarySecurityToken * </code> or a <code>PKIPath</code> element. * @param config A WSSConfig instance * @return a BinarySecurity token element * @throws WSSecurityException */ private BinarySecurity createSecurityToken( Element element, WSSConfig config ) throws WSSecurityException { String type = element.getAttributeNS(null, "ValueType"); BinarySecurity token = null; if (X509Security.X509_V3_TYPE.equals(type)) { token = new X509Security(element, config.isWsiBSPCompliant()); } else if (PKIPathSecurity.getType().equals(type)) { token = new PKIPathSecurity(element, config.isWsiBSPCompliant()); } else if (KerberosSecurity.isKerberosToken(type)) { token = new KerberosSecurity(element, config.isWsiBSPCompliant()); } else { token = new BinarySecurity(element, config.isWsiBSPCompliant()); } return token; }
|| WSConstants.WSS_SAML_KI_VALUE_TYPE.equals(type) || WSConstants.WSS_SAML2_KI_VALUE_TYPE.equals(type) || KerberosSecurity.isKerberosToken(type))) {
secRef.addTokenType(WSConstants.WSS_ENC_KEY_VALUE_TYPE); ref.setValueType(customValueType); } else if (KerberosSecurity.isKerberosToken(customValueType)) { secRef.addTokenType(customValueType); ref.setValueType(customValueType);
/** * Return true if this token is a Kerberos V5 AP REQ token */ public boolean isV5ApReq() { String type = getValueType(); if (WSConstants.WSS_KRB_V5_AP_REQ.equals(type) || WSConstants.WSS_KRB_V5_AP_REQ1510.equals(type) || WSConstants.WSS_KRB_V5_AP_REQ4120.equals(type)) { return true; } return false; }
public void retrieveServiceTicket( String jaasLoginModuleName, CallbackHandler callbackHandler, String serviceName, boolean isUsernameServiceNameForm, boolean requestCredDeleg ) throws WSSecurityException { retrieveServiceTicket(jaasLoginModuleName, callbackHandler, serviceName, isUsernameServiceNameForm, requestCredDeleg, null); }
secRef.addTokenType(WSConstants.WSS_ENC_KEY_VALUE_TYPE); ref.setValueType(customValueType); } else if (KerberosSecurity.isKerberosToken(customValueType)) { secRef.addTokenType(customValueType); ref.setValueType(customValueType);
/** * Return true if this token is a Kerberos GSS V5 AP REQ token */ public boolean isGssV5ApReq() { String type = getValueType(); if (WSConstants.WSS_GSS_KRB_V5_AP_REQ.equals(type) || WSConstants.WSS_GSS_KRB_V5_AP_REQ1510.equals(type) || WSConstants.WSS_GSS_KRB_V5_AP_REQ4120.equals(type)) { return true; } return false; }
public void retrieveServiceTicket( String jaasLoginModuleName, CallbackHandler callbackHandler, String serviceName, boolean isUsernameServiceNameForm, boolean requestCredDeleg ) throws WSSecurityException { retrieveServiceTicket(jaasLoginModuleName, callbackHandler, serviceName, isUsernameServiceNameForm, requestCredDeleg, null); }
secRef.addTokenType(WSConstants.WSS_ENC_KEY_VALUE_TYPE); refCust.setValueType(customTokenValueType); } else if (KerberosSecurity.isKerberosToken(customTokenValueType)) { secRef.addTokenType(customTokenValueType); refCust.setValueType(customTokenValueType); secRef.addTokenType(WSConstants.WSS_ENC_KEY_VALUE_TYPE); refCustd.setValueType(customTokenValueType); } else if (KerberosSecurity.isKerberosToken(customTokenValueType)) { secRef.addTokenType(customTokenValueType); refCustd.setValueType(customTokenValueType);
/** * Return true if this token is a Kerberos V5 AP REQ token */ public boolean isV5ApReq() { String type = getValueType(); if (WSConstants.WSS_KRB_V5_AP_REQ.equals(type) || WSConstants.WSS_KRB_V5_AP_REQ1510.equals(type) || WSConstants.WSS_KRB_V5_AP_REQ4120.equals(type)) { return true; } return false; }
public void retrieveServiceTicket( String jaasLoginModuleName, CallbackHandler callbackHandler, String serviceName, boolean isUsernameServiceNameForm ) throws WSSecurityException { retrieveServiceTicket(jaasLoginModuleName, callbackHandler, serviceName, isUsernameServiceNameForm, false); }
if (KerberosSecurity.isKerberosToken(customReferenceValue)) { secToken.addTokenType(customReferenceValue); } else if (!WSConstants.WSS_USERNAME_TOKEN_VALUE_TYPE.equals(customReferenceValue)) {
/** * This constructor creates a new Kerberos token object and initializes * it from the data contained in the element. * * @param elem the element containing the Kerberos token data * @param bspCompliant Whether the token is processed according to the BSP spec * @throws WSSecurityException */ public KerberosSecurity(Element elem, boolean bspCompliant) throws WSSecurityException { super(elem, bspCompliant); String valueType = getValueType(); if (bspCompliant && !WSConstants.WSS_GSS_KRB_V5_AP_REQ.equals(valueType)) { throw new WSSecurityException( WSSecurityException.INVALID_SECURITY_TOKEN, "invalidValueType", new Object[]{valueType} ); } }
if (KerberosSecurity.isKerberosToken(customReferenceValue)) { secToken.addTokenType(customReferenceValue); } else if (!WSConstants.WSS_USERNAME_TOKEN_VALUE_TYPE.equals(customReferenceValue)) {