OpenNMS API 1.2.9

## org.opennms.netmgt.capsd
Class RadiusAuthPlugin

    java.lang.Object
      org.opennms.netmgt.capsd.AbstractPlugin
          org.opennms.netmgt.capsd.RadiusAuthPlugin

All Implemented Interfaces:
  Plugin

public final class RadiusAuthPlugin
extends AbstractPlugin

This plugin is used to check a host for Radius Authentication support. This is done by sending a radius auth packet to the host. If a valid radius response is received (ACCEPT, REJECT or CHALLENGE) then the host is considered a Radius server. uses the JRadius class library.

Author:
  Jonathan Sartin, OpenNMS

Field Summary
`static int` `DEFAULT_ACCT_PORT` Default radius accounting port
`static int` `DEFAULT_AUTH_PORT` Default radius authentication port
`static java.lang.String` `DEFAULT_AUTH_TYPE` Default radius authentication type
`static java.lang.String` `DEFAULT_PASSWORD` Default pasword
`static int` `DEFAULT_RETRY` Default number of times to retry a test
`static java.lang.String` `DEFAULT_SECRET` Default secret
`static int` `DEFAULT_TIMEOUT` Number of miliseconds to wait before timing out a radius AUTH request
`static java.lang.String` `DEFAULT_USER` Default user
`private static java.lang.String` `PROTOCOL_NAME` The protocol name that is tested by this plugin.

Constructor Summary
`RadiusAuthPlugin()`

Method Summary
`private static byte[]` `chapEncrypt(java.lang.String plainText, byte[] chapChallenge, net.sourceforge.jradiusclient.util.ChapUtil chapUtil)` Encrypt password using chap challenge
`java.lang.String` `getProtocolName()` Returns the name of the protocol that this plugin checks on the target system for support.
`boolean` `isProtocolSupported(java.net.InetAddress address)` Returns true if the protocol defined by this plugin is supported.
`boolean` `isProtocolSupported(java.net.InetAddress address, java.util.Map qualifiers)` Returns true if the protocol defined by this plugin is supported.
`private boolean` `isRadius(java.net.InetAddress host, int authport, int acctport, java.lang.String authType, java.lang.String user, java.lang.String password, java.lang.String secret, int retry, int timeout)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PROTOCOL_NAME

    private static final java.lang.String PROTOCOL_NAME

  The protocol name that is tested by this plugin.

  See Also:
    Constant Field Values

### DEFAULT_TIMEOUT

    public static final int DEFAULT_TIMEOUT

  Number of miliseconds to wait before timing out a radius AUTH request

  See Also:
    Constant Field Values

### DEFAULT_RETRY

    public static final int DEFAULT_RETRY

  Default number of times to retry a test

  See Also:
    Constant Field Values

### DEFAULT_AUTH_PORT

    public static final int DEFAULT_AUTH_PORT

  Default radius authentication port

  See Also:
    Constant Field Values

### DEFAULT_ACCT_PORT

    public static final int DEFAULT_ACCT_PORT

  Default radius accounting port

  See Also:
    Constant Field Values

### DEFAULT_AUTH_TYPE

    public static final java.lang.String DEFAULT_AUTH_TYPE

  Default radius authentication type

  See Also:
    Constant Field Values

### DEFAULT_USER

    public static final java.lang.String DEFAULT_USER

  Default user

  See Also:
    Constant Field Values

### DEFAULT_PASSWORD

    public static final java.lang.String DEFAULT_PASSWORD

  Default pasword

  See Also:
    Constant Field Values

### DEFAULT_SECRET

    public static final java.lang.String DEFAULT_SECRET

  Default secret

  See Also:
    Constant Field Values

Constructor Detail

### RadiusAuthPlugin

    public RadiusAuthPlugin()

Method Detail

### isRadius

    private boolean isRadius(java.net.InetAddress host,
                             int authport,
                             int acctport,
                             java.lang.String authType,
                             java.lang.String user,
                             java.lang.String password,
                             java.lang.String secret,
                             int retry,
                             int timeout)

  Parameters:
    `host` - The address for the radius server test.
    `authport` - Radius authentcation port
    `acctport` - Radius accounting port - required by jradius but not explicitly checked
    `authType` - authentication type - pap or chap
    `user` - user for Radius authentication
    `password` - password for Radius authentication
    `secret` - Radius shared secret
    `timeout` - Timeout in milliseconds
    `retry` - Number of times to retry
  Returns:
    True if server, false if not.

### getProtocolName

    public java.lang.String getProtocolName()

  Returns the name of the protocol that this plugin checks on the target system for support.

  Specified by:
    `getProtocolName` in interface `Plugin`
  Specified by:
    `getProtocolName` in class `AbstractPlugin`
  Returns:
    The protocol name for this plugin.

### isProtocolSupported

    public boolean isProtocolSupported(java.net.InetAddress address)

  Returns true if the protocol defined by this plugin is supported. If the protocol is not supported then a false value is returned to the caller.

  Specified by:
    `isProtocolSupported` in interface `Plugin`
  Specified by:
    `isProtocolSupported` in class `AbstractPlugin`
  Parameters:
    `address` - The address to check for support.
  Returns:
    True if the protocol is supported by the address.

### isProtocolSupported

    public boolean isProtocolSupported(java.net.InetAddress address,
                                       java.util.Map qualifiers)

  Returns true if the protocol defined by this plugin is supported. If the protocol is not supported then a false value is returned to the caller. The qualifier map passed to the method is used by the plugin to return additional information by key-name. These key-value pairs can be added to service events if needed.

  In addition, the input qualifiers map also provides information about how the plugin should contact the remote server. The plugin may check the qualifier map for specific elements and then adjust its behavior as necessary

  Specified by:
    `isProtocolSupported` in interface `Plugin`
  Specified by:
    `isProtocolSupported` in class `AbstractPlugin`
  Parameters:
    `address` - The address to check for support.
    `qualifiers` - The map where qualification are set by the plugin.
  Returns:
    True if the protocol is supported by the address.

### chapEncrypt

    private static byte[] chapEncrypt(java.lang.String plainText,
                                      byte[] chapChallenge,
                                      net.sourceforge.jradiusclient.util.ChapUtil chapUtil)

  Encrypt password using chap challenge

  Parameters:
    `plainText` - plain text password
    `chapChallenge` - chap challenge
    `chapUtil` - ref ChapUtil
  Returns:
    encrypted chap password

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.