Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telemetry #529

Merged
merged 42 commits into from
Oct 11, 2021
Merged

Telemetry #529

merged 42 commits into from
Oct 11, 2021

Conversation

tgauth
Copy link
Collaborator

@tgauth tgauth commented Sep 15, 2021

PowerShell/Win32-OpenSSH#1907

  • adds functions to send Microsoft Telemetry on product service and usage, such as connection success or failure, only for OpenSSH versions that are released with Windows.
  • requires win 10 SDK, or greater, due to the inclusion of the Tracelogging headers.

Note:

  • The telemetry will be optional. The telemetry will only be sent for OpenSSH versions that are released with Windows. Users have the option to configure their telemetry preference in Settings. In Windows 10, it's under Privacy-->Diagnostic & Usage Data. OpenSSH telemetry will only send when diagnostic & usage data is set to "optional" (previously known as full).

OpenSSH versions released to GitHub will not have the telemetry sent to Microsoft.

@NoMoreFood
Copy link

This commit hardcodes the SDK version. I believe that should be set in paths.targets instead. Or, alternatively, one could consider removing references to $WindowsSDKVersion and switch to using "10.0" which I believe uses the latest 10.0 version installed on the system.

@impeeza
Copy link

impeeza commented Sep 16, 2021

That telemetry will be optional or obligated to all users?

@tgauth
Copy link
Collaborator Author

tgauth commented Sep 16, 2021

That telemetry will be optional or obligated to all users?

The telemetry will be optional. The telemetry code will only be enabled for OpenSSH versions that are released with Windows. Users have the option to configure their telemetry preference in Settings. In Windows 10, it's under Privacy-->Diagnostic & Usage Data. OpenSSH telemetry will only send when diagnostic & usage data is set to "optional" (previously known as full).

OpenSSH versions released to GitHub will not have the telemetry code enabled.

contrib/win32/openssh/OpenSSHBuildHelper.psm1 Outdated Show resolved Hide resolved
contrib/win32/openssh/OpenSSHBuildHelper.psm1 Outdated Show resolved Hide resolved
contrib/win32/openssh/OpenSSHBuildHelper.psm1 Outdated Show resolved Hide resolved
contrib/win32/openssh/OpenSSHBuildHelper.psm1 Outdated Show resolved Hide resolved
contrib/win32/openssh/telemetry.c Outdated Show resolved Hide resolved
free(auth_buffer);
}

void send_startup_telemetry(const char* ssh_version, const char* peer_version,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename it to send_ssh_version_telemetry

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a common code for both client and server. See if you can add it's coming from client or server

contrib/win32/openssh/telemetry.h Outdated Show resolved Hide resolved
contrib/win32/openssh/win32iocompat.vcxproj Outdated Show resolved Hide resolved
kex.c Outdated Show resolved Hide resolved
kex.c Show resolved Hide resolved
@tgauth tgauth requested a review from bagajjal October 4, 2021 20:33
"SSHD",
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage),
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
TraceLoggingInt32Array(ports, num_ports, "Port"),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to capture the port numbers.. We want to know if the customer is using default port (22) or custom port

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. I removed the configured ports array from the sshd event, and instead send the port number from the ssh connection event. Is sending the port number sufficient, or do we want to explicitly send "default" or "custom"?

sshconnect2.c Outdated Show resolved Hide resolved
sshconnect2.c Show resolved Hide resolved
@tgauth tgauth requested a review from bagajjal October 11, 2021 14:14
@bagajjal bagajjal merged commit 904470d into PowerShell:latestw_all Oct 11, 2021
@tgauth tgauth deleted the telemetry-stubbed-header branch October 12, 2021 19:14
@tgauth tgauth mentioned this pull request Oct 30, 2023
anmenaga added a commit to anmenaga/openssh-portable that referenced this pull request Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants