Class AllowAllInternodeAuthenticator

    • Constructor Detail

      • AllowAllInternodeAuthenticator

        public AllowAllInternodeAuthenticator()
    • Method Detail

      • authenticate

        public boolean authenticate​(java.net.InetAddress remoteAddress,
                                    int remotePort,
                                    java.security.cert.Certificate[] certificates,
                                    IInternodeAuthenticator.InternodeConnectionDirection connectionType)
        Description copied from interface: IInternodeAuthenticator
        Decides whether a peer is allowed to connect to this node. If this method returns false, the socket will be immediately closed.

        Default implementation calls authenticate method by IP and port method

        1. If it is IP based authentication ignore the certificates & connectionType parameters in the implementation of this method. 2. For certificate based authentication like mTLS, server's identity for outbound connections is verified by the trusted root certificates in the outbound_keystore. In such cases this method may be overridden to return true when certificateType is OUTBOUND, as the authentication of the server happens during SSL Handshake.

        Specified by:
        authenticate in interface IInternodeAuthenticator
        Parameters:
        remoteAddress - ip address of the connecting node.
        remotePort - port of the connecting node.
        certificates - peer certificates
        connectionType - If the connection is inbound/outbound connection.
        Returns:
        true if the connection should be accepted, false otherwise.