Bug 118545 - Provide authentication ability when monitoring remote windows machine
Summary: Provide authentication ability when monitoring remote windows machine
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP.monitoring (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows All
: P1 enhancement (vote)
Target Milestone: ---   Edit
Assignee: George Christelis CLA
QA Contact:
URL: http://www.eclipse.org/tptp/groups/Ar...
Whiteboard:
Keywords: Documentation, plan, ui
Depends on:
Blocks:
 
Reported: 2005-11-29 19:18 EST by Robert Danek CLA
Modified: 2010-06-03 15:03 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Danek CLA 2005-11-29 19:18:50 EST
Currently in the Perfmon help it says "The Windows Perfmon Agent is able to gather statistics from a remote machine other than the one it (and the Agent Controller) is running on. This requires that the agent controller host has the correct authentication to access the Perfmon data on the remote host (such authetnication can be gained by mapping a network drive to the target machine.)"

It shouldn't be necessary to force the user to do the authentication outside of Eclipse/TPTP. There's a simple Windows API "WnetAddConnection" that allows a connection to be made to a network resource. Perfmon can easily use this this API to programmatically make the connection on behalf of the user (rather than telling the user to go map a network drive).

There would be two parts two this:

1) Adding an additional field for username and password in the profiling configuration UI for the perfmon agent.
2) Providing the API in the agent itself that would execute the WnetAddConnection method. 

#2 would be a very high priority feature for our team.
Comment 1 George Christelis CLA 2005-12-01 04:59:07 EST
Raising to P1 as it is a high priority for us as well.
Comment 2 Dave Smith CLA 2005-12-13 16:28:53 EST
This is a candidate feature to be included in TPTP 4.2 and requires UI and documentation updates.
Comment 3 Robert Danek CLA 2005-12-13 16:52:48 EST
The feature document states:

"There is no additional API in the TPTP client side or remote code. The username and password agent settings would be passed to the agent as a set of agent variables, with (null) representing a default connection. There is no additional API in the remote native agent code since it already stores such variables for other purposes. The agent code will be altered to establish the authenticated connection."

Suppose that instead of using the existing profiling configuration to launch the perfmon agent we decide to develop our own mechanism. We would still like to be able to use this remote authentication feature provided by perfmon, though. Our current worry is that there is no clean API for using perfmon (see our requirement outlined in bug 118547). Will it still be possible to use this functionality "cleanly" without duplicating lots of code that's currently tied to the existing way of launching perfmon? 
Comment 4 George Christelis CLA 2005-12-14 05:20:58 EST
I don't quite see what this has to do with the enhancement in 118547. An agent that implemented a generic variable interface would expose its variables (including variables such as authentication details) through the interface. The variable interface would provide the API that is outlined in 118547. The current perfmon agent does not provide such an interface implementation, and hence it has no generic, standardised API with with you could set such variables.

There is no agent specific API involved. The native agent framework is generic with system specific datacollection libraries, and the only way that agent specific information will be provided to these libraries from the workbench is by setting variables within the agent. Again, the process of setting such variables is not generic. To have a custom API call that is specific to the Windows version of the Perfmon Agent is not a generic agent solution.

Specifying credentials would be performed in the exact same manner as specifying a remote host to connect to and is independent of the other AC launch config code.
Comment 5 George Christelis CLA 2006-01-06 12:16:11 EST
I've checked in changes into HEAD. The Windows Agent attempts to establish a connection to the remote host using the username and password credentials entered in the launch configuration. If this fails, the agent will attempt to establish a connection using the default user name and password.

It will not attempt to establish a connection if one already exists.

I've also checked the relevant launch configuration and doc changes. A binary of the sysperf.dll has been placed into the execution/iac-runtime so as to enable this functionality when using the agent through the IAC.

Plugins changed:
org.eclipse.hyades.perfmon
org.eclipse.tptp.platform.agentcontroller
org.eclipse.hyades.execution
org.eclipse.tptp.platform.doc.user

I will perform more indepth testing of this functionality on the next development build.
Comment 6 Ashish Patel CLA 2006-02-13 15:16:22 EST
Questions/Concerns:

1)  How do I connect to windows machines across two different windows domains?

2)  We need this to be public api and not internal for our product to consume it.

3)  Can you point me to the API in your code please.
Comment 7 Ashish Patel CLA 2006-11-16 14:22:12 EST
Closing.