Oracle Security Developer Tools Web Services Security Java API Reference
10g Release 2 (10.1.2.0.2)

B15570-01


oracle.security.xmlsec.wss.util
Class WSSKeyRetriever

java.lang.Object
  extended byoracle.security.xmlsec.keys.retrieval.KeyRetriever
      extended byoracle.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
oracle.security.crypto.cert.X509 processCert(oracle.security.xmlsec.keys.KeyInfoData kid)
Parse the KeyInfo data and obtain the X509 certificate.
PrivateKey processPrivateKey(oracle.security.xmlsec.keys.KeyInfoData kid)
Parse the KeyInfo data and obtain the private key.
SymmetricKey processSymmetricKey(oracle.security.xmlsec.keys.KeyInfoData kid)
Parse the KeyInfo data and obtain the symmetric key.
protected oracle.security.crypto.cert.X509 retrieveCertificate(oracle.security.xmlsec.keys.KeyInfoData keyInfo)
Retrieves the certificate identified by the given KeyInfoData.
protected PrivateKey retrievePrivateKey(oracle.security.xmlsec.keys.KeyInfoData keyInfo)
Retrieves the private key identified by the given KeyInfoData.
protected PublicKey retrievePublicKey(oracle.security.xmlsec.keys.KeyInfoData keyInfo)
Retrieves the public key identified by the given KeyInfoData.
protected SymmetricKey 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, retrieveCertificate, retrievePrivateKey, retrievePublicKey, retrieveSymmetricKey, setAuthenticator

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 oracle.security.crypto.cert.X509 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.
Parameters:
keyInfo - A KeyInfoData to be used to locate the certificate.
Returns:
A X509, or null if none could be located.
Throws:
oracle.security.xmlsec.keys.retrieval.KeyRetrievalException

retrievePublicKey

protected 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.
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.KeyRetrievalException

retrievePrivateKey

protected 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.
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.KeyRetrievalException

retrieveSymmetricKey

protected SymmetricKey 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.
Parameters:
keyInfo - A KeyInfoData to be used to locate the secret key.
Returns:
A SymmetricKey, or null if none could be located.
Throws:
oracle.security.xmlsec.keys.retrieval.KeyRetrievalException

processCert

public oracle.security.crypto.cert.X509 processCert(oracle.security.xmlsec.keys.KeyInfoData kid)
                                             throws WSSException
Parse the KeyInfo data and obtain the X509 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 X509 certificate or null.
Throws:
WSSException

processPrivateKey

public 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 SymmetricKey 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

Oracle Security Developer Tools Web Services Security Java API Reference
10g Release 2 (10.1.2.0.2)

B15570-01


Copyright © 2005 , Oracle. All rights reserved.