|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jini.jeri.BasicJeriTrustVerifier
public class BasicJeriTrustVerifier
Trust verifier for dynamic proxies and object endpoints used in Jini
extensible remote invocation (Jini ERI). This class is intended to be
specified in a resource to configure the operation of Security.verifyObjectTrust
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.jini.security.TrustVerifier |
---|
TrustVerifier.Context |
Constructor Summary | |
---|---|
BasicJeriTrustVerifier()
Creates an instance. |
Method Summary | |
---|---|
protected static boolean |
checkInvocationHandlerContent(BasicInvocationHandler handler,
TrustVerifier.Context ctx)
Returns true if the specified invocation handler's
constraints and object endpoint are trusted; returns
false otherwise. |
protected boolean |
hasTrustedClassLoader(Object proxy,
TrustVerifier.Context ctx)
Returns true if the class loader of the specified dynamic
proxy's class is trusted by this verifier; returns false
otherwise. |
protected boolean |
hasTrustedProxyClass(Object proxy,
TrustVerifier.Context ctx)
Returns true if the specified dynamic proxy's class is
trusted by this verifier; returns false otherwise. |
protected boolean |
isTrustedInvocationHandler(InvocationHandler handler,
TrustVerifier.Context ctx)
Returns true if the specified invocation
handler is trusted by this trust verifier; returns
false otherwise. |
boolean |
isTrustedObject(Object obj,
TrustVerifier.Context ctx)
Returns true if the specified object is a trusted
Jini ERI dynamic proxy or a trusted Jini ERI object endpoint;
returns false otherwise. |
protected boolean |
isTrustedProxyInterface(Class intf,
TrustVerifier.Context ctx)
Returns true if the specified dynamic proxy interface is
trusted by this verifier; returns false otherwise. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicJeriTrustVerifier()
Method Detail |
---|
public boolean isTrustedObject(Object obj, TrustVerifier.Context ctx) throws RemoteException
true
if the specified object is a trusted
Jini ERI dynamic proxy or a trusted Jini ERI object endpoint;
returns false
otherwise.
For the purposes of this verifier, the specified object is a trusted Jini ERI dynamic proxy if all of the following are true:
RemoteMethodControl
.
Proxy
.
hasTrustedProxyClass
with the specified object and the specified
trust verifier context returns true
.
isTrustedInvocationHandler
with the InvocationHandler
contained in the dynamic proxy and
the specified trust verifier context returns true
.
For the purposes of this verifier, the specified object is a trusted
Jini ERI object endpoint if the object is an instance of
BasicObjectEndpoint
and its transport endpoint is
trusted; that is, calling the specified context's
isTrustedObject
method with the transport endpoint returns
true
.
isTrustedObject
in interface TrustVerifier
obj
- the object in which to verify trustctx
- the trust verifier context, to aid in verification of
the specified object and its components
true
if the specified object is known to be
trusted to correctly implement its contract; false
otherwise
SecurityException
- if a security exception occurs
NullPointerException
- if any argument is null
RemoteException
- if a communication-related exception occursprotected boolean hasTrustedProxyClass(Object proxy, TrustVerifier.Context ctx) throws RemoteException
true
if the specified dynamic proxy's class is
trusted by this verifier; returns false
otherwise. The
isTrustedObject
method calls this method to verify that
the proxy's class is trusted.
BasicJeriTrustVerifier
implements this method to
return true
if all of the following are true:
Remote
.
hasTrustedClassLoader
with the specified proxy and the specified
trust verifier context returns true
.
isTrustedProxyInterface
with the interface and the specified trust
verifier context returns true
.
A subclass can override this method to augment the set of trusted proxy classes for Jini ERI proxies.
proxy
- the dynamic proxyctx
- the trust verifier context, to aid in verification of
the specified proxy's class
true
if the specified dynamic proxy's class is
trusted by this verifier; returns false
otherwise
RemoteException
- if a communication-related exception occurs
SecurityException
- if a security exception occurs
NullPointerException
- if any argument is null
protected boolean hasTrustedClassLoader(Object proxy, TrustVerifier.Context ctx) throws RemoteException
true
if the class loader of the specified dynamic
proxy's class is trusted by this verifier; returns false
otherwise. The default implementation of
hasTrustedProxyClass
calls this method to verify
that the proxy's class loader is trusted.
BasicJeriTrustVerifier
implements this method to
return true
if the specified proxy is an instance of a
dynamic proxy class and the class loader of the specified proxy's
class is either equal to or an ancestor of the class loader returned
by the trust verifier context's getClassLoader
method (or the current context class loader, if that
method returns null
).
A subclass can override this method to augment the set of trusted loaders for Jini ERI proxies.
proxy
- the dynamic proxyctx
- the trust verifier context, to aid in verification of
the class loader of the specified proxy's class
true
if the class loader of the specified dynamic
proxy's class is trusted by this verifier; returns false
otherwise
RemoteException
- if a communication-related exception occurs
SecurityException
- if a security exception occurs
IllegalArgumentException
- if the proxy is not an
instance of a dynamic proxy class
NullPointerException
- if any argument is null
protected boolean isTrustedProxyInterface(Class intf, TrustVerifier.Context ctx) throws RemoteException
true
if the specified dynamic proxy interface is
trusted by this verifier; returns false
otherwise. The
default implementation of hasTrustedProxyClass
calls
this method to verify that the dynamic proxy's interfaces are trusted.
BasicJeriTrustVerifier
implements this method to
return true
if the specified class is
RemoteMethodControl
, TrustEquivalence
, or a
well-formed remote interface (one that extends Remote
and for
which all methods declare RemoteException
or a superclass in
their throws
clause).
A subclass can override this method to augment the set of trusted proxy interfaces for Jini ERI proxies.
intf
- the dynamic proxy interfacectx
- the trust verifier context, to aid in verification of
the specified proxy interface
true
if the specified dynamic proxy interface is
trusted by this verifier; returns false
otherwise
RemoteException
- if a communication-related exception occurs
SecurityException
- if a security exception occurs
NullPointerException
- if any argument is null
protected boolean isTrustedInvocationHandler(InvocationHandler handler, TrustVerifier.Context ctx) throws RemoteException
true
if the specified invocation
handler is trusted by this trust verifier; returns
false
otherwise. The isTrustedObject
method calls this method to verify trust in the invocation handler.
BasicJeriTrustVerifier
implements this method to
return true
if all of the following are true:
BasicInvocationHandler
.
checkInvocationHandlerContent
method with the specified handler
and the specified context returns true
.
A subclass can override this method to verify that the invocation
handler's class is a trusted subclass of
BasicInvocationHandler
and to verify the contents of
the invocation handler. A subclass implementation of this method
can invoke the checkInvocationHandlerContent
static
utility method to verify that the invocation handler's constraints
and object endpoint are trusted.
handler
- the invocation handlerctx
- the trust verifier context, to aid in verification of
the specified handler
true
if the specified invocation
handler is trusted by this trust verifier; returns
false
otherwise
RemoteException
- if a communication-related exception occurs
SecurityException
- if a security exception occurs
NullPointerException
- if any argument is null
protected static boolean checkInvocationHandlerContent(BasicInvocationHandler handler, TrustVerifier.Context ctx) throws RemoteException
true
if the specified invocation handler's
constraints and object endpoint are trusted; returns
false
otherwise. The
isTrustedInvocationHandler
method calls this utility
method to check that the invocation handler's constraints and object
endpoint are trusted.
The specified invocation handler's constraints and object endpoint are trusted if all of the following are true:
isTrustedObject
method with the object endpoint returns
true
.
isTrustedObject
method with the server constraints
returns true
.
handler
- the invocation handlerctx
- the trust verifier context, to aid in verification of
the specified handler
true
if the specified invocation
handler's constraints and object endpoint are trusted by this method;
returns false
otherwise
RemoteException
- if a communication-related exception occurs
SecurityException
- if a security exception occurs
NullPointerException
- if any argument is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |