Interface ConnectionAttributes
- 
- All Superinterfaces:
- java.security.Principal
 
 public interface ConnectionAttributes extends java.security.PrincipalThe ConnectionAttributes interface provides access to connection related information. An object of this class can be retrieved from the LoginModule Subject when JAAS login modules are used with EMS, and in that context represents the connection associated with a client.From within the initialization method of a LoginModule, one can retrieve this with the following code: Set<ConnectionAttributes> ciSet = subject.getPrincipals(ConnectionAttributes.class); ConnectionAttributes connectionAttributes = ciSet.iterator().next(); - See Also:
- LoginModule.initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map),- Subject
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classConnectionAttributes.TypeThis enumeration describes the type of connection of the ConnectionAttributes object.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.net.InetAddressgetInetAddress()Gets the network address of the client socket.ConnectionAttributes.TypegetType()Retrieves the type of the client connection.byte[]getX509Data()If TLS is enabled, retrieve the x509 certificate of the remote end of the TLS connection, if one is available.booleanisSSL()Determine if the connection is using TLS to authenticate.
 
- 
- 
- 
Method Detail- 
getInetAddressjava.net.InetAddress getInetAddress() Gets the network address of the client socket.- Returns:
- the inetAddress of the client.
- See Also:
- InetAddress
 
 - 
isSSLboolean isSSL() Determine if the connection is using TLS to authenticate.Note: This does not necessarily mean the connection data is encrypted; Refer to the EMS User Guide documentation regarding "TLS Authentication Only" for more information. - Returns:
- true if the connection is using TLS, false otherwise.
 
 - 
getX509Databyte[] getX509Data() If TLS is enabled, retrieve the x509 certificate of the remote end of the TLS connection, if one is available. This will only be set if isSSL() returns true, the remote client or server has provided a certificate, and that certificate has met the validation requirements set in this server's configuration. The bytes returned are suitable as input for the java.security.cert.Certificate.generateCertificate() method.- Returns:
- the x509 certificate of the remote end of the TLS connection.
 
 - 
getTypeConnectionAttributes.Type getType() Retrieves the type of the client connection.- Returns:
- the type of the connection.
 
 
- 
 
-