Skip navigation links

Oracle Security Developer Tools Web Services Security Java API Reference
11g (11.1.1)

E10678-02


oracle.security.xmlsec.wss.util
Class WSSKeyRetriever

java.lang.Object
  extended by oracle.security.xmlsec.keys.retrieval.KeyRetriever
      extended by oracle.security.xmlsec.wss.util.WSSKeyRetriever


public class WSSKeyRetriever
extends oracle.security.xmlsec.keys.retrieval.KeyRetriever

This class server as an utility for extracting keys from dsig:KeyInfo instances containing wsse elements. It can only retrieve information located in the same org.w3c.dom.Document instance.

Users should override this class to implement retrieval of keys from persistant storage.


Constructor Summary
WSSKeyRetriever()
           

 

Method Summary
 java.security.cert.X509Certificate processCert(oracle.security.xmlsec.keys.KeyInfoData kid)
          Parse the KeyInfo data and obtain the X509Certificate certificate.
 java.security.PrivateKey processPrivateKey(oracle.security.xmlsec.keys.KeyInfoData kid)
          Parse the KeyInfo data and obtain the private key.
 javax.crypto.SecretKey processSymmetricKey(oracle.security.xmlsec.keys.KeyInfoData kid)
          Parse the KeyInfo data and obtain the symmetric key.
protected  java.security.cert.X509Certificate retrieveCertificate(oracle.security.xmlsec.keys.KeyInfoData keyInfo)
          Retrieves the certificate identified by the given KeyInfoData.
protected  java.security.PrivateKey retrievePrivateKey(oracle.security.xmlsec.keys.KeyInfoData keyInfo)
          Retrieves the private key identified by the given KeyInfoData.
protected  java.security.PublicKey retrievePublicKey(oracle.security.xmlsec.keys.KeyInfoData keyInfo)
          Retrieves the public key identified by the given KeyInfoData.
protected  javax.crypto.SecretKey retrieveSymmetricKey(oracle.security.xmlsec.keys.KeyInfoData keyInfo)
          Retrieves the secret key identified by the given KeyInfoData.

 

Methods inherited from class oracle.security.xmlsec.keys.retrieval.KeyRetriever
addKeyRetriever, getAuthenticator, getCertificate, getCertificate, getPrivateKey, getPrivateKey, getPublicKey, getPublicKey, getSymmetricKey, getSymmetricKey, removeKeyRetriever, retrieveCertificate, retrievePrivateKey, retrievePublicKey, retrieveSymmetricKey, setAuthenticator, setCertificateValidator, validateCertificate, validateCertificate, validateCertificate

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

WSSKeyRetriever

public WSSKeyRetriever()

Method Detail

retrieveCertificate

protected java.security.cert.X509Certificate retrieveCertificate(oracle.security.xmlsec.keys.KeyInfoData keyInfo)
                                                          throws oracle.security.xmlsec.keys.retrieval.KeyRetrievalException
Description copied from class: oracle.security.xmlsec.keys.retrieval.KeyRetriever
Retrieves the certificate identified by the given KeyInfoData. If this method is not overridden it always returns null.
Overrides:
retrieveCertificate in class oracle.security.xmlsec.keys.retrieval.KeyRetriever
Parameters:
keyInfo - A KeyInfoData to be used to locate the certificate.
Returns:
A X509Certificate, or null if none could be located.
Throws:
oracle.security.xmlsec.keys.retrieval.StorageAuthenticationException - If an error occurs authenticating to the key source.
oracle.security.xmlsec.keys.retrieval.KeyRetrievalException

retrievePublicKey

protected java.security.PublicKey retrievePublicKey(oracle.security.xmlsec.keys.KeyInfoData keyInfo)
                                             throws oracle.security.xmlsec.keys.retrieval.KeyRetrievalException
Description copied from class: oracle.security.xmlsec.keys.retrieval.KeyRetriever
Retrieves the public key identified by the given KeyInfoData. If this method is not overridden it always returns null.
Overrides:
retrievePublicKey in class oracle.security.xmlsec.keys.retrieval.KeyRetriever
Parameters:
keyInfo - A KeyInfoData to be used to locate the public key.
Returns:
A PublicKey, or null if none could be located.
Throws:
oracle.security.xmlsec.keys.retrieval.StorageAuthenticationException - If an error occurs authenticating to the key source.
oracle.security.xmlsec.keys.retrieval.KeyRetrievalException

retrievePrivateKey

protected java.security.PrivateKey retrievePrivateKey(oracle.security.xmlsec.keys.KeyInfoData keyInfo)
                                               throws oracle.security.xmlsec.keys.retrieval.KeyRetrievalException
Description copied from class: oracle.security.xmlsec.keys.retrieval.KeyRetriever
Retrieves the private key identified by the given KeyInfoData. If this method is not overridden it always returns null.
Overrides:
retrievePrivateKey in class oracle.security.xmlsec.keys.retrieval.KeyRetriever
Parameters:
keyInfo - A KeyInfoData to be used to locate the private key.
Returns:
A PrivateKey, or null if none could be located.
Throws:
oracle.security.xmlsec.keys.retrieval.StorageAuthenticationException - If an error occurs authenticating to the key source.
oracle.security.xmlsec.keys.retrieval.KeyRetrievalException

retrieveSymmetricKey

protected javax.crypto.SecretKey retrieveSymmetricKey(oracle.security.xmlsec.keys.KeyInfoData keyInfo)
                                               throws oracle.security.xmlsec.keys.retrieval.KeyRetrievalException
Description copied from class: oracle.security.xmlsec.keys.retrieval.KeyRetriever
Retrieves the secret key identified by the given KeyInfoData. If this method is not overridden it always returns null.
Overrides:
retrieveSymmetricKey in class oracle.security.xmlsec.keys.retrieval.KeyRetriever
Parameters:
keyInfo - A KeyInfoData to be used to locate the secret key.
Returns:
A SecretKey, or null if none could be located.
Throws:
oracle.security.xmlsec.keys.retrieval.StorageAuthenticationException - If an error occurs authenticating to the key source.
oracle.security.xmlsec.keys.retrieval.KeyRetrievalException

processCert

public java.security.cert.X509Certificate processCert(oracle.security.xmlsec.keys.KeyInfoData kid)
                                               throws WSSException
Parse the KeyInfo data and obtain the X509Certificate certificate. This method assumes that the reference points to a X.509 certificate token in the same Document.
Parameters:
kid - The wsse:SecurityTokenReference element.
Returns:
Returns the X509Certificate certificate or null.
Throws:
WSSException

processPrivateKey

public java.security.PrivateKey processPrivateKey(oracle.security.xmlsec.keys.KeyInfoData kid)
                                           throws WSSException
Parse the KeyInfo data and obtain the private key.
Parameters:
kid - The wsse:SecurityTokenReference element.
Returns:
Returns the private key or null.
Throws:
WSSException

processSymmetricKey

public javax.crypto.SecretKey processSymmetricKey(oracle.security.xmlsec.keys.KeyInfoData kid)
                                           throws WSSException
Parse the KeyInfo data and obtain the symmetric key.
Parameters:
kid - The wsse:SecurityTokenReference element.
Returns:
Returns the symmetric key or null.
Throws:
WSSException

Skip navigation links

Oracle Security Developer Tools Web Services Security Java API Reference
11g (11.1.1)

E10678-02


Copyright © 2005, 2009, Oracle. All rights reserved.