opentelemetry-dotnet-instrumentation icon indicating copy to clipboard operation
opentelemetry-dotnet-instrumentation copied to clipboard

OpenTelemetry.DotNet.Auto.psm1 script digitally signed error

Open arfffus opened this issue 2 years ago • 4 comments

Bug Report

Seems that OpenTelemetry.DotNet.Auto.psm1 script is not signed

Symptom

I used Windows PowerShell (5.1 version as recommended) to execute the script and make auto instrumentation my Windows service. But PowerShell raised an exception on Import-Module command: "Import-Module : File ...\OpenTelemetry.DotNet.Auto.psm1 cannot be loaded. The file ..\OpenTelemetry.DotNet.Auto.psm1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170." So I was forced to change PowerShell execution policy to "unrestricted" value for execute that command but it's security violence (Of course I turned it back after execution).

Could you please sign OpenTelemetry.DotNet.Auto.psm1 script and add to documentation a warning about this issue for same future cases.

Thank you in advance!

Runtime environment:

  • OpenTelemetry Automatic Instrumentation version: v1.0.0-rc.1 (the script was downloaded by path "https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet-instrumentation/v1.0.0-rc.1/OpenTelemetry.DotNet.Auto.psm1")
  • OS: Windows 10 Enterprise 22H2
  • Windows PowerShell 5.1.19041.3031
  • .NET version: .NET Framework 4.8, .NET Core 6, .NET Core 7

Steps to reproduce the behavior:

Just try to reproduce instructions from manual for PowerShell module (Windows): https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation#powershell-module-windows. The exception is raised on "Import-Module $download_path" command.

arfffus avatar Jul 26 '23 14:07 arfffus

For now, OpenTelemetry does not have possibility to sign anything (nor scripts, nor libraries). Postponing to post-1.0.0

Kielek avatar Jul 26 '23 16:07 Kielek

Got it, thank you.

arfffus avatar Jul 28 '23 06:07 arfffus

I created https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/2821

pellared avatar Aug 09 '23 16:08 pellared

Related to https://github.com/open-telemetry/community/issues/1672.

pellared avatar Sep 21 '23 12:09 pellared