BEA Systems, Inc.

WebLogic Server 8.1 API Reference

weblogic.xml.security.wsse
Interface Security


public interface Security

The top level Security object. By adding this to the Web Service context, it is possible to configure WS Security manually.

Author:
Copyright © 2004 BEA Systems, Inc. All Rights Reserved.

Field Summary
static boolean WSSE_VERBOSE
           
static java.lang.String WSSE_VERBOSE_PROP
           
 
Method Summary
 weblogic.xml.security.encryption.EncryptedKey addEncryption(Token token, EncryptionSpec spec)
          Adds an encrypted key to the security token.
 weblogic.xml.security.encryption.EncryptedKey addEncryption(java.security.cert.X509Certificate cert, EncryptionSpec spec)
          Adds an encrypted key to the security token.
 weblogic.xml.security.signature.Signature addSignature(Token token, SignatureSpec spec)
          Adds a XML Signature to the Security element.
 weblogic.xml.security.wsu.Timestamp addTimestamp()
          adds a timestamp to the security element, with the created time as the current time and no expiry
 weblogic.xml.security.wsu.Timestamp addTimestamp(java.util.Calendar created)
          adds a timestamp to the security element, using the provided time as the created time.
 weblogic.xml.security.wsu.Timestamp addTimestamp(java.util.Calendar created, java.util.Calendar expires)
          add a timestamp to the security element, using times provided as args.
 weblogic.xml.security.wsu.Timestamp addTimestamp(long expires)
          adds a timestamp to the security element, with the created time as the current time and an expiration 'expires' milliseconds in the future
 Token addToken(Token token)
          Adds a token to the Security element.
 Token addToken(UserInfo user)
          Adds a token for the username/password in the UserInfo.
 Token addToken(java.security.cert.X509Certificate cert, java.security.PrivateKey key)
          Adds an X509certificate as a token in the Security element.
 boolean expired()
          returns true if any timestamp in the message has an Expires element whose time is in the past.
 boolean expired(long maxAge)
          returns trus if any timestamp in the message has a Created time older than the maxAge or an Expires element that has passed.
 java.lang.String getRole()
          Returns the role for which this security element was targetted.
 Token getTokenById(java.lang.String id)
          retrieves the token with the specified ID from the Security element.
 

Field Detail

WSSE_VERBOSE_PROP

public static final java.lang.String WSSE_VERBOSE_PROP

WSSE_VERBOSE

public static final boolean WSSE_VERBOSE
Method Detail

addSignature

public weblogic.xml.security.signature.Signature addSignature(Token token,
                                                              SignatureSpec spec)
                                                       throws SecurityProcessingException
Adds a XML Signature to the Security element. The signature will be signed by the token provided and will follow the SignatureSpec for processing.

Parameters:
token -  
spec -  
Returns:
 
Throws:
SecurityProcessingException -  

addEncryption

public weblogic.xml.security.encryption.EncryptedKey addEncryption(Token token,
                                                                   EncryptionSpec spec)
                                                            throws SecurityProcessingException
Adds an encrypted key to the security token. Items matching the EncryptionSpec will be encrypted with the key. The key will be encrypted for the entity designated by the Token

Parameters:
token -  
spec -  
Returns:
 
Throws:
SecurityProcessingException -  

addEncryption

public weblogic.xml.security.encryption.EncryptedKey addEncryption(java.security.cert.X509Certificate cert,
                                                                   EncryptionSpec spec)
                                                            throws SecurityProcessingException
Adds an encrypted key to the security token. Items matching the EncryptionSpec will be encrypted with the key. The key will be encrypted with the public key in the certificate.

Parameters:
cert -  
spec -  
Returns:
 
Throws:
SecurityProcessingException -  

addToken

public Token addToken(Token token)
Adds a token to the Security element.

Parameters:
token -  
Returns:
 

addToken

public Token addToken(java.security.cert.X509Certificate cert,
                      java.security.PrivateKey key)
Adds an X509certificate as a token in the Security element. The returned token can be used to sign/encrypt.

Parameters:
cert -  
key -  
Returns:
 

addToken

public Token addToken(UserInfo user)
Adds a token for the username/password in the UserInfo. By default, this token will include the password as clear text.

Parameters:
user -  
Returns:
 

getTokenById

public Token getTokenById(java.lang.String id)
retrieves the token with the specified ID from the Security element.

Parameters:
id -  
Returns:
 

getRole

public java.lang.String getRole()
Returns the role for which this security element was targetted.

Returns:
 

addTimestamp

public weblogic.xml.security.wsu.Timestamp addTimestamp()
adds a timestamp to the security element, with the created time as the current time and no expiry

Returns:
 

addTimestamp

public weblogic.xml.security.wsu.Timestamp addTimestamp(long expires)
adds a timestamp to the security element, with the created time as the current time and an expiration 'expires' milliseconds in the future

Parameters:
expires -  
Returns:
 

addTimestamp

public weblogic.xml.security.wsu.Timestamp addTimestamp(java.util.Calendar created)
adds a timestamp to the security element, using the provided time as the created time.

Parameters:
created -  
Returns:
 

addTimestamp

public weblogic.xml.security.wsu.Timestamp addTimestamp(java.util.Calendar created,
                                                        java.util.Calendar expires)
add a timestamp to the security element, using times provided as args.

Parameters:
created -  
expires -  
Returns:
 

expired

public boolean expired()
returns true if any timestamp in the message has an Expires element whose time is in the past.

Returns:
 

expired

public boolean expired(long maxAge)
returns trus if any timestamp in the message has a Created time older than the maxAge or an Expires element that has passed.

Parameters:
maxAge -  
Returns:
 

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs81