Adapter request and response for the Kerberized SSH adapter for a Java client


The Kerberized SSH adapter does not use an action. To configure an adapter request to communicate with a host that is not defined in the adapter configuration, you can designate a dynamic target by assigning values for the required configuration elements. These elements work as a set. Partial information cannot be retrieved from the configuration node.

You can omit the <targets> block from the adapter request. In the absence of a <targets> block, the default target from the adapter configuration is used.

When you use a context item as an input for an adapter request, you must enclose the adapter request in the <request-data> elements. However, when you create a static request, <request-data> is not required and the adapter request starts with the <adapterName-adapter-request> element.

BMC recommends that you do not include unused elements in the adapter request because they might cause errors.

The following table describes the elements of an adapter request for the Kerberized SSH adapter.

 Elements of an adapter request for the Kerberized SSH adapter for a Java client

The following figure, shows an XML sample request for the Kerberized SSH adapter with a Java client. Use the adapter request XML when you create a custom process by using the Call Adapter activity in TrueSight Orchestration Development Studio.

In this case, the first target references the adapter configuration and the second target is a dynamic target.

XML sample of the Kerberized SSH adapter request for a Java client


<krb-request>
<targets>
<target>
<user-name>krbuser</user-name>
<password encryption-type="Plain">admin123</password>
 {{<verify-os></verify-os>}}
<krb-realm>ABC.COM</krb-realm>
<ktgt-cache-file-name>/tmp/krb5cc_515</ktgt-cache-file-name>
<kdc-name>matrix-old.abc.com</kdc-name>
<host>matrix-old.abc.com</host>
<prompt>$</prompt>
</target>
</targets>
<commands>
<command>cd /tmp</command>
<command>pwd</command>
<command>ls -la</command>
<command>pwd</command>
</commands>
</krb-request>

The following table describes the elements of a Kerberized SSH adapter response.

 Elements of a Kerberized SSH adapter response to a request with a Java client

The following figure illustrates the adapter response for the Kerberized SSH adapter for a Java client.

XML sample of the Kerberized SSH adapter response for a Java client


<metadata>
   <status>success</status>
 </metadata>
 <targets-output>
   <target-output host="matrix-old.abc.com">
     <metadata>
        <os-id>Linux</os-id>
        <os-version>2.6.18-8.el5</os-version>
        <status>success</status>
     </metadata>
     <commands-output>
       <command-output>
          <metadata>
           <command>cd /tmp</command>
           <line-count>1</line-count>
           <execution-milliseconds>220</execution-milliseconds>
           <exit-code>0</exit-code>
           <status>success</status>
         </metadata>
    <commands-output>
       <command-output>
         <metadata>
        <command>cd /tmp</command>
        <line-count>1</line-count>
           <execution-milliseconds>220</execution-milliseconds>
           <exit-code>0</exit-code>
           <status>success</status>
         </metadata>
         <output>
           <line index="1">[krbuser@matrix-old tmp]$</line>
         </output>
       </command-output>
       <command-output>
         <metadata>
           <command>pwd</command>
           <line-count>2</line-count>
           <execution-milliseconds>233</execution-milliseconds>
           <exit-code>0</exit-code>
           <status>success</status>
         </metadata>
         <output>
           <line index="1">/tmp</line>
           <line index="2">[krbuser@matrix-old tmp]$</line>
         </output>
       </command-output>
       <command-output>
         <metadata>
           <command>ls -la</command>
           <line-count>14</line-count>
           <execution-milliseconds>239</execution-milliseconds>
           <exit-code>0</exit-code>
           <status>success</status>
</metadata>
    <output>
           <line index="1">[00mtotal 48</line>
           <line index="2">drwxrwxrwt  6 root    root    4096 Aug 19 04:02               [30;42m.[00m</line>
           <line index="3">drwxr-xr-x 25 root    root    4096 Jul 19 14:06               [01;34m..[00m</line>
           <line index="4">drwxrwxrwt  2 root    root    4096 Jul 14 14:03 [30;42m.font-              unix[00m</line>
           <line index="5">srw-rw-rw-  1 root    root       0 Jul 14 14:03               [01;35m.gdm_socket[00m</line>
           <line index="6">drwxrwxrwt  2 root    root    4096 Jul 14 14:03 [30;42m.ICE-              unix[00m</line>
           <line index="7">-rw-------  1 root    root     929 Aug 17 16:11               [00mkrb5cc_0[00m</line>
           <line index="8">-rw-------  1 ranjana ranjana  946 Aug 16 18:41               [00mkrb5cc_504[00m</line>
           <line index="9">-rw-------  1 krbuser krbuser  946 Aug 17 17:00               [00mkrb5cc_515[00m</line>
           <line index="10">drwxrwxrwx  2 root    root    4096 Aug 17 16:24               [34;42m.pk11ipc1[00m</line>
           <line index="11">srwxrwxrwx  1 root    root       0 Aug  5 18:10               [01;35mSTAFIPC_STAF[00m</line>
           <line index="12">-r--r--r--  1 root    root      11 Jul 14 14:03 [00m.X0-              lock[00m</line>
            <line index="13">drwxrwxrwt  2 root    root    4096 Jul 14 14:03 [30;42m.X11-              unix[00m</line>
             <line index="14">[m[krbuser@matrix-old tmp]$</line>
         </output>
       </command-output>
       <command-output>
         <metadata>
           <command>pwd</command>
                <line-count>2</line-count>
                <execution-milliseconds>116</execution-milliseconds>
<exit-code>0</exit-code>
           <status>success</status>
         </metadata>
         <output>
           <line index="1">/tmp</line>
           <line index="2">[krbuser@matrix-old tmp]$</line>
         </output>
       </command-output>
     </commands-output>
   </target-output>
 </targets-output>
</kerberos-ssh2-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Orchestration Content 20.19.01