|
Novell exteNd Messaging Platform 5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The Security Current interface is used to set/get the Identity of the caller. When the Authenticated Principal is set, and the target Object supports Authentication, then the Authenticated Principal is automatically propagated to the target by the ORB.
The Authenticated Principal objects can be associated at two different levels - thread level, and ORB level.
For example, a client program can Authenticate using the Authenticator, and then set the AuthenticatedPrincipal at the ORB level. Now all invocations from this ORB, will propagate the AuthenticatedPrincipal "on-the-wire".
To make different threads execute with different Identities, set the AuthenticatedPrincipal at the thread level. When both the thread level and ORB level Authenticated Principals are set, the thread level takes precedence.
The SecurityCurrent is obtained from the ORB using the
resolve_initial_references
method.
When using IIOP/SSL, the SucurityCurrent also makes available the negotiated CipherSuite, and the peer Certificate Chain.SecurityCurrent secCurrent = (SecurityCurrent) orb. resolve_initial_references("SecurityCurrent");
Method Summary | |
byte[][] |
getCertificateChain()
Get DER encoded Certificate chain of the client. |
byte[][] |
getCertificateChain(ObjectImpl objref)
Get DER encoded Certificate chain of the given object. |
InetAddress |
getInetAddress()
Get the IP address of the remote client. |
InetAddress |
getLocalAddress()
Get the local IP address. |
int |
getLocalPort()
Get the local IP port. |
CipherSuite |
getNegotiatedCipherSuite()
Get the CipherSuite negotiated with the client. |
CipherSuite |
getNegotiatedCipherSuite(ObjectImpl objref)
Get the CipherSuite negotiated with the given object. |
Principal |
getORBPrincipal()
Deprecated. |
int |
getPort()
Get the port of the remote client. |
Principal |
getPrincipal()
Deprecated. |
Principal |
getPrincipal(Thread thread)
Deprecated. |
Principal |
getThreadPrincipal()
Deprecated. |
Principal |
getThreadPrincipal(Thread thread)
Deprecated. |
void |
setORBPrincipal(AuthenticatedPrincipal principal)
Deprecated. |
void |
stackThreadPrincipal(AuthenticatedPrincipal principal)
Deprecated. |
void |
stackThreadPrincipal(AuthenticatedPrincipal principal,
Thread thread)
Deprecated. |
void |
unsetORBPrincipal(AuthenticatedPrincipal oldPrincipal)
Deprecated. |
void |
unstackThreadPrincipal(AuthenticatedPrincipal oldPrincipal)
Deprecated. |
void |
unstackThreadPrincipal(AuthenticatedPrincipal oldPrincipal,
Thread thread)
Deprecated. |
Methods inherited from interface org.omg.CORBA.Object |
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override |
Method Detail |
public void setORBPrincipal(AuthenticatedPrincipal principal) throws SecurityException
SecurityException
SecurityCurrent.setORBContext(com.sssw.jbroker.api.security.CSIv2.SecurityContext)
public Principal getORBPrincipal()
public void unsetORBPrincipal(AuthenticatedPrincipal oldPrincipal) throws SecurityException
SecurityException
SecurityCurrent.unsetORBContext(com.sssw.jbroker.api.security.CSIv2.SecurityContext)
public void stackThreadPrincipal(AuthenticatedPrincipal principal) throws SecurityException
SecurityException
SecurityCurrent.stackThreadContext(com.sssw.jbroker.api.security.CSIv2.SecurityContext)
public void stackThreadPrincipal(AuthenticatedPrincipal principal, Thread thread) throws SecurityException
SecurityException
SecurityCurrent.stackThreadContext(com.sssw.jbroker.api.security.CSIv2.SecurityContext, java.lang.Thread)
public Principal getThreadPrincipal()
SecurityCurrent.getThreadSecurityContext()
public Principal getThreadPrincipal(Thread thread)
SecurityCurrent.getThreadSecurityContext(java.lang.Thread)
public void unstackThreadPrincipal(AuthenticatedPrincipal oldPrincipal) throws SecurityException
SecurityException
SecurityCurrent.unstackThreadContext(com.sssw.jbroker.api.security.CSIv2.SecurityContext)
public void unstackThreadPrincipal(AuthenticatedPrincipal oldPrincipal, Thread thread) throws SecurityException
SecurityException
SecurityCurrent.unstackThreadContext(com.sssw.jbroker.api.security.CSIv2.SecurityContext, java.lang.Thread)
public Principal getPrincipal()
SecurityCurrent.getThreadSecurityContext(java.lang.Thread)
public Principal getPrincipal(Thread thread)
SecurityCurrent.getThreadSecurityContext(java.lang.Thread)
public InetAddress getInetAddress()
public int getPort()
public InetAddress getLocalAddress()
public int getLocalPort()
public CipherSuite getNegotiatedCipherSuite() throws SecurityException
SecurityException
public CipherSuite getNegotiatedCipherSuite(ObjectImpl objref) throws SecurityException
SecurityException
public byte[][] getCertificateChain() throws SecurityException
On JDK 1.2, you can convert the raw DER encoded certificate bytes to a X509Certificate using:
CertificateFactory cf = CertificateFactory.getInstance("X.509"); byte[][] certs = secCurrent.getCertificateChain(); X509Certificate cert = (X509Certificate) cf.generateCertificate( new ByteArrayInputStream(certs[i]))
SecurityException
public byte[][] getCertificateChain(ObjectImpl objref) throws SecurityException
On JDK 1.2, you can convert the raw DER encoded certificate bytes to a X509Certificate using:
CertificateFactory cf = CertificateFactory.getInstance("X.509"); byte[][] certs = secCurrent.getCertificateChain(); X509Certificate cert = (X509Certificate) cf.generateCertificate( new ByteArrayInputStream(certs[i]))
SecurityException
|
Novell exteNd Messaging Platform 5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |