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 enhancement: Add "kill switch" for strict corporate environments #50

Closed
psimsa opened this issue Aug 16, 2023 · 6 comments
Closed
Labels
enhancement New feature or request

Comments

@psimsa
Copy link

psimsa commented Aug 16, 2023

While I understand and support the motivation behind SponsorLink, in order to be usable in many corporate environments it needs to provide ability to disable the telemetry.

Similar to how this is handled in .Net, where telemetry is on by default and you can disable it by setting environment variable, SL could provide similar functionality.

Proposal:

  • As a first check, verify if there is an environment variable DISABLE_SPONSORLINK set to true. If so, terminate.
  • Optionally, if the environment variable is set, SL can still display a diag message along the lines of "it sucks you don't want SL, but you probably have your reasons. you can still sponsor, btw."

That should satisfy many corporate security departments while still keeping the awareness up.

@psimsa psimsa added the bug Something isn't working label Aug 16, 2023
@iskiselev
Copy link

As currently it works with DOTNET infrastructure, it may be great to first check that customer opt out of DOTNET telemetry: DOTNET_CLI_TELEMETRY_OPTOUT.
If it is set, use opt-in mechanics only, otherwise allow to opt-out of SL.

With it, for most customers it will still be active by default. For customers, that worry about telemetry data enough to opt-out Microsoft telemetry, it will not irritate them unless they explicitly allowed it.

@psimsa
Copy link
Author

psimsa commented Aug 16, 2023

@iskiselev only thing is apparently from .net7 dotnet telemetry is opt-in, not opt-out. However, the analyzer can still display a diagnostics message when opted-out. The least of all evils to just raise the awareness.

@iskiselev
Copy link

iskiselev commented Aug 16, 2023

@psimsa , after more research (https://learn.microsoft.com/en-us/dotnet/core/tools/telemetry, dotnet/sdk#14556, dotnet/sdk#25935) dotnet cli telemetry is still opt-out in all Microsoft builds and for source build (used by OS maintainers) it is disabled.
I've not found any place that will say about opt-in.

@kzu kzu changed the title Enhancement: Add "kill switch" for strict corporate environments Telemetry enhancement: Add "kill switch" for strict corporate environments Aug 17, 2023
@kzu kzu added enhancement New feature or request and removed bug Something isn't working labels Aug 17, 2023
@kzu
Copy link
Member

kzu commented Aug 17, 2023

I agree with @iskiselev that SL should follow whatever is set for DOTNET_CLI_TELEMETRY_OPTOUT first and foremost.

Also, telemetry should be entirely orthogonal with the sponsorship validation/verification. I'd even go as far as saying that telemetry should just follow the dotnet envvar and not even require a separate one (after all, if you don't trust MS for telemetry, why would you trust anyone else?). Although perhaps you might want to disable just SL? In that case, you'd most likely disable it entirely, and not just telemetry though?

So:

  1. If DOTNET_CLI_TELEMETRY_OPTOUT, no SL telemetry whatesoever
  2. If SPONSORLINK_OPTOUT (or similar), no SL telemetry neither sponsorship checking

I don't see a good scenario where you'd opt out of SL telemetry but still want the sponsoring check...

@iskiselev
Copy link

@kzu, if sponsorship validation would be reimplemented to not include any trackable information, it would really be orthogonal to telemetry. While sponsorship check is done by fetching any data from internet in a build, it still too similar to telemetry - just because it is possible to collect some information from network request, even if it does not include any PII. It still include IP address, so it is possible to say how often some IP builds SL-dependent projects - which is, in fact telemetry.

If SL check would be reimplemented (for example, all network request will be done by separately installed tool - while customer build will either use data already provided by tool or log message suggesting to install it) - in that case, telemetry and sponsorship checking would be really separate entities.

@kzu
Copy link
Member

kzu commented Aug 25, 2023

I've decided to drop telemetry for now see #34 (comment). Hopefully this is something nuget itself can do better.

@kzu kzu closed this as completed Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants