org.objectweb.proactive.ext.security
Interface SecurityEntity

All Known Subinterfaces:
Body, IbisRemoteBody, ProActiveRuntime, ProActiveRuntimeForwarder, RemoteBody, RmiRemoteBody, SecurityDomain, UniversalBody
All Known Implementing Classes:
AbstractBody, AbstractUniversalBody, ActiveBody, BodyAdapter, BodyAdapterForwarder, BodyAdapterImpl, BodyImpl, ComponentBodyImpl, DefaultProActiveSecurityManager, DomainImpl, EncryptedBody, HalfBody, HttpBodyAdapter, HttpRemoteBodyImpl, IbisBodyAdapter, IbisRemoteBodyImpl, InternalBodySecurity, JiniBodyAdapter, JiniRemoteBodyImpl, MigratableBody, ProActiveRuntimeAdapter, ProActiveRuntimeAdapterForwarderImpl, ProActiveRuntimeAdapterImpl, ProActiveRuntimeForwarderImpl, ProActiveRuntimeImpl, ProActiveSecurityManager, RmiBodyAdapter, RmiRemoteBodyImpl, SshRmiBodyAdapter, UniversalBodyWrapper

public interface SecurityEntity

SecureEntity defines all security related method a secure generic object must implement. An entity can be an active object, a runtime, a domain.


Method Summary
 java.security.cert.X509Certificate getCertificate()
          entity certificate
 byte[] getCertificateEncoded()
          Entity's X509Certificate as byte array
 java.util.ArrayList<Entity> getEntities()
          Retrieves all the entity's ID which contain this entity plus this entity ID.
 SecurityContext getPolicy(SecurityContext securityContext)
          Ask the entity to fill the securityContext parameters with its own policy according to the communication details contained in the given securityContext
 java.security.PublicKey getPublicKey()
          entity public key
 byte[][] publicKeyExchange(long sessionID, byte[] myPublicKey, byte[] myCertificate, byte[] signature)
          exchange entity certificate and/or public key if certificate are not available
 byte[] randomValue(long sessionID, byte[] clientRandomValue)
          Exchange random value between client and server entity
 byte[][] secretKeyExchange(long sessionID, byte[] encodedAESKey, byte[] encodedIVParameters, byte[] encodedClientMacKey, byte[] encodedLockData, byte[] parametersSignature)
          this method sends encoded secret parameters to the target entity
 long startNewSession(Communication policy)
          start an unvalidated empty session
 void terminateSession(long sessionID)
          terminate a given session
 

Method Detail

getCertificate

java.security.cert.X509Certificate getCertificate()
                                                  throws SecurityNotAvailableException,
                                                         java.io.IOException
entity certificate

Returns:
returns entity certificate
Throws:
SecurityNotAvailableException - if security is not available
java.io.IOException - if communication fails

startNewSession

long startNewSession(Communication policy)
                     throws SecurityNotAvailableException,
                            RenegotiateSessionException,
                            java.io.IOException
start an unvalidated empty session

Parameters:
policy - policy associated to the session
Returns:
session ID
Throws:
SecurityNotAvailableException - if security is not available
RenegotiateSessionException - if the session immediatly expires
java.io.IOException

getPublicKey

java.security.PublicKey getPublicKey()
                                     throws SecurityNotAvailableException,
                                            java.io.IOException
entity public key

Returns:
returns entity public key
Throws:
SecurityNotAvailableException
java.io.IOException

randomValue

byte[] randomValue(long sessionID,
                   byte[] clientRandomValue)
                   throws SecurityNotAvailableException,
                          RenegotiateSessionException,
                          java.io.IOException
Exchange random value between client and server entity

Parameters:
sessionID - the session ID
clientRandomValue - client random value
Returns:
server random value
Throws:
SecurityNotAvailableException - if the security is not available
RenegotiateSessionException - if the session has expired
java.io.IOException

publicKeyExchange

byte[][] publicKeyExchange(long sessionID,
                           byte[] myPublicKey,
                           byte[] myCertificate,
                           byte[] signature)
                           throws SecurityNotAvailableException,
                                  RenegotiateSessionException,
                                  KeyExchangeException,
                                  java.io.IOException
exchange entity certificate and/or public key if certificate are not available

Parameters:
sessionID - the session ID
myPublicKey - encoded public key
myCertificate - encoded certificate
signature - encoded signature of previous paramaters
Returns:
an array containing : - server certificate and/or server public key - encoded signature of these parameters
Throws:
SecurityNotAvailableException - if the security is not available
RenegotiateSessionException - if the session has expired
KeyExchangeException - if a key data/length/algorithm is not supported
java.io.IOException

secretKeyExchange

byte[][] secretKeyExchange(long sessionID,
                           byte[] encodedAESKey,
                           byte[] encodedIVParameters,
                           byte[] encodedClientMacKey,
                           byte[] encodedLockData,
                           byte[] parametersSignature)
                           throws SecurityNotAvailableException,
                                  RenegotiateSessionException,
                                  java.io.IOException
this method sends encoded secret parameters to the target entity

Parameters:
sessionID - session ID
encodedAESKey - the AES key use to exchange secret message
encodedIVParameters - Initilization parameters for the AES key
encodedClientMacKey - MAC key for checking signature of future messages
encodedLockData - random value to prevent message replays by an external attacker
parametersSignature - encoded signature of the previous parameters
Returns:
an array containing : - encoded server AES key - encoded IV parameters - encoded server MAC key - encoded lock data to prevent message replays - encoded signature of previous parameters
Throws:
SecurityNotAvailableException - if this entity does not support security
RenegotiateSessionException - if the session has expired or has been cancelled during this exchange
java.io.IOException - if communication fails

getPolicy

SecurityContext getPolicy(SecurityContext securityContext)
                          throws SecurityNotAvailableException,
                                 java.io.IOException
Ask the entity to fill the securityContext parameters with its own policy according to the communication details contained in the given securityContext

Parameters:
securityContext - communication details allowing the entity to look for a matching policy
Returns:
securityContext filled with this entity's policy
Throws:
SecurityNotAvailableException - thrown the entity doest not support the security
java.io.IOException

getCertificateEncoded

byte[] getCertificateEncoded()
                             throws SecurityNotAvailableException,
                                    java.io.IOException
Entity's X509Certificate as byte array

Returns:
entity's X509Certificate as byte array
Throws:
SecurityNotAvailableException
java.io.IOException

getEntities

java.util.ArrayList<Entity> getEntities()
                                        throws SecurityNotAvailableException,
                                               java.io.IOException
Retrieves all the entity's ID which contain this entity plus this entity ID.

Returns:
returns all the entity's ID which contain this entity plus this entity ID.
Throws:
SecurityNotAvailableException - if the target entity does not support security
java.io.IOException

terminateSession

void terminateSession(long sessionID)
                      throws SecurityNotAvailableException,
                             java.io.IOException
terminate a given session

Parameters:
sessionID -
Throws:
SecurityNotAvailableException - id security is not available
java.io.IOException


Copyright 2001-2007 INRIA All Rights Reserved.