Skip navigation links
TIBCO Enterprise Message Service
com.tibco.tibems.tibemsd.security

Interface ConnectionAttributes

  • All Superinterfaces:
    java.security.Principal


    public interface ConnectionAttributes
    extends java.security.Principal
    The 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 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 Summary

      Nested Classes 
      Modifier and Type Interface and Description
      static class  ConnectionAttributes.Type
      This enumeration describes the type of connection of the ConnectionAttributes object.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      java.net.InetAddress getInetAddress()
      Gets the network address of the client socket.
      ConnectionAttributes.Type getType()
      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.
      boolean isSSL()
      Determine if the connection is using TLS to authenticate.
      • Methods inherited from interface java.security.Principal

        equals, getName, hashCode, implies, toString
    • Method Detail

      • getInetAddress

        java.net.InetAddress getInetAddress()
        Gets the network address of the client socket.
        Returns:
        the inetAddress of the client.
        See Also:
        InetAddress
      • isSSL

        boolean 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.
      • getX509Data

        byte[] 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.
      • getType

        ConnectionAttributes.Type getType()
        Retrieves the type of the client connection.
        Returns:
        the type of the connection.
TIBCO Enterprise Message Service

Copyright © Cloud Software Group, Inc. All rights reserved