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

PagerDuty Integration Does Not Respect HTTP_PROXY Environment Variables #47604

Open
programmerq opened this issue Oct 15, 2024 · 0 comments · May be fixed by #47663
Open

PagerDuty Integration Does Not Respect HTTP_PROXY Environment Variables #47604

programmerq opened this issue Oct 15, 2024 · 0 comments · May be fixed by #47663
Labels
bug c-do Internal Customer Reference teleport-plugin Tickets related to Teleport Plugins https://github.com/gravitational/teleport-plugins

Comments

@programmerq
Copy link
Contributor

Expected behavior:

PagerDuty integration should successfully communicate with the PagerDuty API using the configured HTTP proxy settings (HTTP_PROXY and HTTPS_PROXY environment variables) when making outbound network requests.

Current behavior:

PagerDuty integration attempts to reach the PagerDuty API directly, ignoring the configured HTTP proxy settings. This results in a network timeout due to the integration not utilizing the HTTP proxy for egress traffic, causing failures in establishing communication.

Bug details:

Teleport version: v15.x, but v16.4.2 also appears to be affected.

Recreation steps:

  1. Configure a Teleport cluster with PagerDuty integration in an environment that utilizes an HTTP proxy for outbound traffic.
  2. Set HTTP_PROXY and HTTPS_PROXY environment variables for the Teleport process.
  3. Set up integration with PagerDuty the Teleport UI.
  4. Observe network timeout errors indicating a failure to pass the traffic through the HTTP proxy.

Debug logs:

2024-10-15T13:04:59Z ERRO [PAGERDUTY] Plugin instance delegate failed. error:[
   ERROR REPORT:
   Original Error: *url.Error Get "https://api.pagerduty.com/abilities": context deadline exceeded
   Stack Trace:
   github.com/gravitational/teleport/integrations/access/pagerduty/client.go:156 github.com/gravitational/teleport/integrations/access/pagerduty.Pagerduty.HealthCheck
   github.com/gravitational/teleport/integrations/access/pagerduty/app.go:172 github.com/gravitational/teleport/integrations/access/pagerduty.(*App).init
   github.com/gravitational/teleport/integrations/access/pagerduty/app.go:109 github.com/gravitational/teleport/integrations/access/pagerduty.(*App).run
   github.com/gravitational/teleport/integrations/lib/process.go:234 github.com/gravitational/teleport/e/lib/plugins.pagerDutyInstanceFactory.NewApp.NewServiceJob.func2
   github.com/gravitational/teleport/integrations/lib/process.go:255 github.com/gravitational/teleport/integrations/lib.(*serviceJob).DoJob
   github.com/gravitational/teleport/integrations/lib/process.go:101 github.com/gravitational/teleport/integrations/lib.NewProcess.func2.1
   runtime/asm_amd64.s:1695 runtime.goexit
   User Message: api health check failed. check your credentials and service_id settings
   Get "https://api.pagerduty.com/abilities": context deadline exceeded] plugin_name:pagerduty plugin_type:pagerduty plugins/manager.go:361 

PagerDuty integration appears to instantiate an http Transport for use with go-resty. I think that it will need to use http.ProxyFromEnvironment on that instance in order for environment proxy settings to work.

@programmerq programmerq added bug c-do Internal Customer Reference teleport-plugin Tickets related to Teleport Plugins https://github.com/gravitational/teleport-plugins labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug c-do Internal Customer Reference teleport-plugin Tickets related to Teleport Plugins https://github.com/gravitational/teleport-plugins
Projects
None yet
1 participant