ch.ethz.prose
Class SecureLocalAspectManager

java.lang.Object
ch.ethz.prose.LocalAspectManager
ch.ethz.prose.SecureLocalAspectManager
- All Implemented Interfaces:
- AspectManager, ch.ethz.prose.engine.ClassLoadListener
- public class SecureLocalAspectManager
- extends LocalAspectManager
Class SecureLocalAspectManager extends LocalAspectManager. It recognizes
SignedExtensions in insertExtension and performs the insertion
under the permissions granted to the SecureLocalAspectManager class, in case
that the signature is valid and the signer is trusted to insert extensions.
- Version:
- $Revision: 1.1.1.1 $
| Methods inherited from class ch.ethz.prose.LocalAspectManager |
abort, classLoaded, commit, createJoinPointManager, doInsertExtension, doWithdrawExtension, finalize, getAllAspects, getJoinPointManager, insert, isConnectedToVM, startup, teardown, withdraw, withdraw |
keyStore
private java.security.KeyStore keyStore
certTable
private java.util.Hashtable certTable
SecureLocalAspectManager
public SecureLocalAspectManager(boolean isConnectedToVM,
ch.ethz.jvmai.JVMAspectInterface ai)
- Constructs an extension manager that inserts SignedExtensions under privileged rights
validateKey
protected boolean validateKey(java.security.PublicKey key)
- Decides whether a key is valid and trusted to insert an extension
under the privileged permissions of this class.
The actual implementation is very restricted: accepts if a trusted
certificate exists in the keystore defined by the system properties
ch.ethz.prose.keystore.location and
ch.ethz.prose.keystore.password. (ATTENTION: THIS
IS A HUGE SECURITY HOLE!!!). Feel free to build a
subclass with a better implementation.
It was thought to attach certificates to signed extensions to help
the target system to make its decision. As in JDK 1.2.2 the class
java.security.cert.Certificate is not Serializable, this feature is
unluckily not yet implemented.
insert
public void insert(Aspect ext)
throws AspectManagerException
- Insert the extension
ext into the extension
manager. If ext is of type SignedAspect,
the signature is verified and if the key is known to be trusted to
insert extensions, the insertion is performed exclusively under the rights
granted to this class.
If the extension fails the verification or the key is not trusted, it is attempted
to install the extension in the usual way (without privileged permissions).
- Specified by:
insert in interface AspectManager- Overrides:
insert in class LocalAspectManager
superInsertExtension
private void superInsertExtension(Aspect ext)
throws AspectManagerException
getKeyStore
private java.security.KeyStore getKeyStore()
throws java.security.KeyStoreException,
java.security.NoSuchAlgorithmException,
java.io.IOException,
java.security.cert.CertificateException
isTrusted
private boolean isTrusted(java.security.PublicKey key)
throws java.security.KeyStoreException,
java.security.NoSuchAlgorithmException,
java.io.IOException,
java.security.cert.CertificateException