|
rmi://localhost:1099/com.sun.jaw.impl.adaptor.rmi.AdaptorServer
|
HTTP/TCP Adaptor
The HTTP/TCP adaptor enables Java managers to access a Java Dynamic Management agent using HTTP over a TCP/IP connection. It also allows these management applications to access an agent across proxy servers. By default, the HTTP/TCP adaptor listens for incoming requests on port 8081. The HTTP/TCP adaptor provides login/password authentication. HTTP/UDP Adaptor
The HTTP/UDP adaptor enables Java managers to access a Java Dynamic Management agent using HTTP over UDP. By default, the HTTP/UDP adaptor listens for incoming requests on port 8083. The HTTP/UDP adaptor provides login/password authentication.
Note - UDP is a lightweight protocol designed to send messages without requiring an extensive protocol mechanism, it does not provide total reliability. UDP does not divide outgoing messages into datagram packets or sequence incoming messages.
HTTP/SSL Adaptor
The HTTP/SSL adaptor enables Java managers to access a Java Dynamic Management agent using HTTP over SSL. It also allows these management applications to access an agent across proxy servers. By default, the HTTP/SSL adaptor listens for incoming requests on port 8084. The HTTP/SSL adaptor provides login/password authentication. The HTTP/SSL adaptor server requires client authentication by default. HTML Adaptor
The HTML adaptor is an HTML server that enables web browsers to access a Java Dynamic Management agent through the HTTP communications protocol. When an HTML adaptor is instantiated, it creates a TCP/IP socket and waits for incoming requests. By default, the HTML adaptor listens for incoming requests on port 8082. The HTML adaptor provides login/password authentication.
IIOP Adaptor
The IIOP adaptor enables CORBA clients to communicate with a Java Dynamic Management agent as if it were a CORBA server. The IIOP adaptor allows CORBA clients to create and delete m-beans, get and set properties of m-beans, and perform actions.
|
% nameserv -ORBInitialPort portNumber
|
CORBA Name
The CORBA name specifies the following properties of the CORBA environment:
|
iiop://nameserver_host:nameserver_port/agent_host/adaptor_name
|
Example CORBA Service
FIGURE 5-1 shows a simple example of a CORBA service. The CORBA client in this example is a third party supplied client, not the IIOP client supplied with the Java Dynamic Management Kit.

FIGURE 5-1 Example CORBA Service
|
% nameserv -ORBInitialPort 9876
|
|
iiop://hawaii:9876/summer/IIOP_adaptor_test
|
The default name of the Java Dynamic Management agent adaptor is:
|
iiop://hawaii:9876/summer/com.sun.jaw.impl.adaptor.iiop.AdaptorServerImpl
|
|
Operating Environment |
Default IDL File location |
|
Solaris |
/etc/opt/SUNWconn/jaw/iiop/AdaptorServer.idl |
|
Windows NT |
C:\Program Files\SUNWconn\jaw\etc\iiop\AdaptorServer.idl |
Where operations are performed on Java and CORBA objects by the same agent, you must ensure that the correct object type is specified. To avoid problems, you should specify objects as instances of either Java objects or CORBA objects.
SNMP Adaptor
The SNMP adaptor enables an SNMP manager to perform management operations on a Java Dynamic Management agent. Before using the SNMP adaptor, you need to configure it for the MIB used by the SNMP manager application. This is explained in Chapter 17 "The mibgen Compiler".
Adding an Adaptor to an Agent
To add an adaptor, create an instance of the Java class that implements the adaptor you want to use.
The Java Dynamic Management Kit provides the following ways to add an adaptor to an agent:
|
% rmiregistry portNumber
|
For information on how to add an SNMP adaptor to an agent, refer to "Loading MIBs Into an SNMP Adaptor" on page 243.
Access to an Adaptor
Access to an adaptor depends on the manager that uses it; there are two types of access:
Operation of the Adaptors
The purpose of an adaptor is to enable a manager to:
Access Control
The Java Dynamic Management Kit provides mechanisms for controlling access by a manager to an agent. The access control methods available depend on the adaptor used.
The HTTP/TCP, HTTP/UDP, and HTTP/SSL adaptors provide login/password authentication based on `CRAM-MD5 (Challenge-Response Authentication Mechanism using MD5)' as specified in RFC2104 and RFC2195.
The HTML adaptor provides login/password authentication, as specified in the `Basic Authentication Scheme,' in RFC1945.
Access Control Using an ACL file
For the SNMP adaptor, the Java Dynamic Management Kit provides access control based on the IP address of the host or proxy machine of the manager. Information on each machine and the access rights it has is stored in an ACL file. Enabling Access Control for the SNMP Adaptor
To enable access control for the SNMP adaptor, ensure that an ACL file exists when any agents are started. The ACL file must be named jaw.acl and must be located in the configuration directory. If the configuration directory is not found in one of the default paths shown in the table, the framework/adaptor uses the CLASSPATH environment variable (see Appendix B "Environment Variables") to determine the correct path. The configuration directory is found in the paths shown in the table unless the Java Dynamic Management Kit was not installed in the default directory.
|
Operating Environment |
Configuration Directory |
|
Solaris |
/etc/opt/SUNWconn/jaw/conf/ |
|
Windows NT |
C:\Program File\SUNWconn\jaw\etc\conf\ |
If an ACL file exists, the access rights it defines apply to all managers or proxy servers that access agents through the SNMP adaptor. The machine of the agent has read-write access. If this file does not exist when the agents are started, all managers are granted access to the agents through the SNMP adaptor.
ACL File Format
An ACL file contains the following groups of configuration variables:
| CODE EXAMPLE 5-2 Format of the acl Configuration Variable Group |
| CODE EXAMPLE 5-3 Format of a List in the acl Group |
The meaning of each item is:
communities = communityList
access = accessCode
managers item. The accessCode keyword is one of the following:|
read-write |
The managers are allowed to get and set properties of m-beans. |
|
read-only |
The managers are allowed only to get properties of m-beans. |
This item specifies the host machines of the managers to be granted the access rights specified in the
access item. The hostList item is a list of hosts. Each host in hostList can be expressed as any one of the following:
Note - To distinguish between IP addresses and subnet masks in an ACL file, each integer in a subnet mask is separated by an exclamation mark instead of a dot.
| CODE EXAMPLE 5-4 Format of the trap Configuration Variable Group |
The trap group contains one or more trap community definitions. Each defines the association between a set of hosts and the SNMP community string in the traps to be sent to them. The format of each list is defined in CODE EXAMPLE 5-5.
| CODE EXAMPLE 5-5 Format of a List in the trap Group |
The meaning of each item is:
trap-community = trapCommunityString
hosts item.
hosts = trapInterestHostList
trap-community item. The trapInterestHostList item is a list of hosts. Each host in trapInterestHostList can be expressed as any one of the following:
| CODE EXAMPLE 5-6 Example ACL File |
The trap group in this example specifies that the agent will send:
| CODE EXAMPLE 5-7 Formal Grammar Definition of an ACL File |
Access Control Using an ACL object
For the SNMP adaptor, you can create a class that implements a com.sun.jaw.reference.agent.services.IPAclSrvIf interface. An instance of that class enables you to enable access control in the same way as with an ACL file in applications that do not use a file system. Access Control for the RMI Adaptor
The Java Dynamic Management Kit does not provide an access control mechanism for the RMI adaptor. To enable the RMI adaptor to provide secure data transfer you have to implement an access control mechanism using a network security application, such as SunScreenTM SKIP.
Implementing an Adaptor
An adaptor is an abstraction of a communications protocol. This means that the communication mechanism between agent and manager is hidden. The adaptors provided by the Java Dynamic Management Kit are implemented as m-beans. This enables them to be managed. The Java Dynamic Management Kit does not require an adaptor to conform to a specific interface definition or implementation. However, an adaptor must be able to access the framework to retrieve and change information in m-beans in an agent.