Class RadiusConn


  • public class RadiusConn
    extends Object
    This class implements RFC2865 - Remote Authentication Dial In User Service (RADIUS), June 2000.
    • Field Detail

      • DEFAULT_TIMEOUT

        public static final int DEFAULT_TIMEOUT
        The default timeout.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RadiusConn

        public RadiusConn​(Set<RADIUSServer> primaries,
                          Set<RADIUSServer> secondaries,
                          String secret,
                          int timeout,
                          int healthCheckInterval)
                   throws SocketException
        Construct a connection object with a set of primary and seconary servers.
        Parameters:
        primaries - the primary servers to connect to.
        secondaries - the secondary servers to connect to.
        secret - the secret shared between this client and the remote servers.
        timeout - the timeout value.
        healthCheckInterval - the health check interval.
        Throws:
        SocketException - thrown if unable to create a DatagramSocket.
      • RadiusConn

        public RadiusConn​(Set<RADIUSServer> primaries,
                          String secret,
                          byte[] seed,
                          int healthCheckInterval)
                   throws SocketException
        Constructs a connection object with only a set of primary servers.
        Parameters:
        primaries - the primary servers to connect to.
        secret - the secret shared between this client and the remote servers.
        seed - the seed value to be used to create a SecureRandom instance.
        healthCheckInterval - the health check interval.
        Throws:
        SocketException - thrown if unable to create a DatagramSocket.
      • RadiusConn

        public RadiusConn​(Set<RADIUSServer> primaries,
                          Set<RADIUSServer> secondaries,
                          String secret,
                          int timeout,
                          byte[] seed,
                          int healthCheckInterval)
                   throws SocketException
        Construct a connection object primary and secondary servers and seed for generating a SecureRandom.
        Parameters:
        primaries - the primary servers to connect to.
        secondaries - the secondary servers to connect to.
        secret - the secret shared between this client and the remote servers.
        timeout - the timeout value.
        seed - the seed value to be used to create a SecureRandom instance.
        healthCheckInterval - the health check interval.
        Throws:
        SocketException - if a socket exception occurs.
      • RadiusConn

        public RadiusConn​(Set<RADIUSServer> primaries,
                          Set<RADIUSServer> secondaries,
                          String secret,
                          int timeout,
                          byte[] seed,
                          int healthCheckInterval,
                          boolean requireMessageAuthenticator)
                   throws SocketException
        Full-featured constructor that allows the caller to opt-in to the strict RFC 3579 / BlastRADIUS-mitigation profile.
        Parameters:
        primaries - the primary servers to connect to.
        secondaries - the secondary servers to connect to.
        secret - the secret shared between this client and the remote servers.
        timeout - the timeout value, in seconds.
        seed - optional SecureRandom seed; null for default entropy.
        healthCheckInterval - the health check interval, in minutes.
        requireMessageAuthenticator - when true, every Access-Accept/Reject/Challenge received from the server MUST carry a verifiable Message-Authenticator (RFC 3579 attribute 80). This is the fully protected flow recommended by Cisco's BlastRADIUS guidance. When false, the client verifies MA only when the server happens to include it, remaining interoperable with legacy servers.
        Throws:
        SocketException - if a socket exception occurs.