SSH
From GEANT2-JRA1 Wiki
Contents |
Telnet/SSH MP
Responsible: Stijn Verstichel (Stijn.Vestichel at intec.UGent.be)
Introduction
This document provides a detailed overview of the architecture used to implement a Telnet/SSH Measurement Point (MP) webservice for the perfSONAR project. The purpose of this document is to describe the inside architectural construction of the webservice. It should also provide some point for discussion about the architecture. These will merely be situated around the choice of XML (eXtensible Markup Language) schema, which has now been updated, but also concerning other aspects of the architecture, such as the balance between genericness and specific hard-coded functionality.
Objectives
The purpose of and the desired functionality expected from the SSH/Telnet MP is that it should be able to contact underlying hardware devices, and execute show-like commands on. It should primarily serve NOC's, whom would be able to use a Looking Glass-style client to request real-time configuration information about those devices.
Achievements
Global view of the architecture
- [Telnet/SSH MP Webservice Telnet/SSH MP Webservice Presentation Cambridge]
- [Telnet/SSH MP Webservice Telnet/SSH MP Webservice Presentation Berlin]
The architecture is constructed using multiple levels of indirection and abstraction. The existing code for the perfSONAR project was used as a starting basis. Much of the supporting functionality has already been implemented, and therefore forms the ideal starting point for the extension towards a Telnet/SSH MP. In developing the architecture, much emphasis has been laid into the generic concept and easy adaptation and extension of the webservice.
WebServiceEngineAdapter
The entry point for the Telnet/SSH MP webservice is the WebserviceEngineAdapter, which is an extension of the RequestHandler, as already implemented in the perfSONAR project. The RequestHandler is responsible for the first processing and filtering of the incoming request messages. Based upon the subject of the request message arriving, the RequestHandler decides which underlying ServiceEngine is capable of answering the incoming request. The underlying ServiceEngine for the Telnet/SSH MP, as previously mentioned, is the WebserviceEngineAdapter. This means that all requests arriving at the RequestHandler, addressing Telnet/SSH MP functionality are forwarded by the RequestHandler to an instance of the WerserviceEngineAdapter. The WebserviceEngineAdapter is then responsible for handling the request and returning an answer back to the RequestHandler, which is then in its turn responsible to encapsulate it in a SOAP message and returning it to the original querying actor.
[...]Adapter
Next in line is the Adapter. This Adapter is a class holding all business logic specific to a particular device. So, in the first implementation, there was an Adapter for a Quagga device and for a Cisco Router. At the moment Juniper devices are supported as well. More specifically Telnet based login to quagga and cisco using username and password is supported. More secure login on juniper is provided as well. Juniper access can be username/password based and usename/public-key based. One of the key things the Adapter is responsible thus for, and has the knowledge of, is the actual information for addressing and connecting to the underlying device.
[...]IP/IPv6/BGP/STATUSAdapter
The last level in the top-down breakdown of this architecture is the SubAdapter. This SubAdapter is responsible for a specific subset of queries supported. The current supported subsets are IP information, IPv6 information, BGP information and Status information. There is a specific reason why these subsets are created. At the moment, it doesn't seem useful to do so, and indeed there is very little difference between the implementation of these Adapters for all subsets. But, if some compulsory functionality is required for a given subset of information, then this can be stated in the interface of each of the several SubAdapters. As will be explained in the next chapter, the current implementation leaves much room for providing specific functionality of each individual Telnet/SSH MP. If some functionality is required to be provided by every implementation of a Telnet/SSH MP webservice, then this class is the place to enforce such obligation. Inside the SubAdapter, there is a list of available Commands. These will be discussed in the next chapter.
Command
The Command is merely, as it is at the moment, a placeholder for all information necessary, to be able to fetch the information from the underlying device. The information concerned is:
- The corresponding EventType
- The device specific command to be executed on the underlying device
- A list of parameters
- The result.
At the moment the result is just a container with the cleaned up output the Device returns after executing the Command. If desired, some more intelligent functionality on the result could be provided, e.g. parsing of the output into some more meaningful classes.
Communication with the device
The actual communication with the device is at the moment provided by a java-package, implementing the SSH/Telnet protocol. It uses standard Input/Output Streams to transmit commands to the device, and to collect the ouput from the device. It also provides functionality for scripting, where one can specify a sequence of expected commands and results from the device.
XML-schema
After some discussion and exchange of ideas a new schema has been established for the Telnet SSH MP. The description can be found here.
XML-schema (current version)
XML-schema (first version)
We would like to welcome all suggestions for the XML-schema to be used. Currently a derivation of existing schema is used. Four things in the XML-document that make sure that the webservice can answer the incoming request are:
- MessageType (--> MakeMeasurement)
- MetaData Subject ID --> specifies what device is to queried. Using this, one single WebServiceEngineAdapter can serve request covering multiple underlying devices.
- MetaData nmwg:evnttype --> used to specify the exact information needed from the device
- Data nmwg:parameters --> to specify any parameters needed to request the correct information
References
Installation
For further information about Installing, Stitching and Testing the SSHTELNET MP, please refer to the perfSONAR-MDM-3.0 Admin Guide, page 67 and beyond.
Downloads
For downloads of the SSHTELNET MP, please follow this link:
- Subversion repository available at https://svn.internet2.edu/svn/perfsonar/branches/new-structure/trunk/geant2_java-sshtelnet-mp/
Resources
Client Application v. 0.5 can be downloaded here ! Alternatively, you can use the Java Web Start page here Username: geant2 Password: geant2
- Deployed SSH Telnet MP endpoint (uses Authentication) -- Please note that this is an old version of the SSHTELNET MP
- http://chaos169.test.atlantis.ugent.be:8080/JAVA-SSHTELNET-MP-1.2.1/services/TelnetSSH
- Deployed SSH Telnet MP endpoint (does not use Authentication) -- Please note that this is an old version of the SSHTELNET MP
- http://chaos169.test.atlantis.ugent.be:8080/JAVA-SSHTELNET-MP-1.2.1-NoAuthN/services/TelnetSSH
- Traceroute/Looking Glass website
- Configuration and stitching tools can also be found on the download page.
The latest version of the MP is deployed here (http://mdm-1.par.fr.geant2.net:8090/geant2-java-sshtelnet-mp/services/TelnetSSH).
Future work
Future improvements and enhancements will be implemented in the Telnet/SSH MP webservice, keeping in mind suggestions ans remarks returned.
Contact
IBBT - Belnet - IBCN (UGent)
Stijn Verstichel Stijn.Verstichel@intec.UGent.be (http://ibcn.intec.ugent.be)
Stijn Melis Stijn.Melis@intec.UGent.be (http://ibcn.intec.UGent.be)
IBBT (http://www.ibbt.be)
