Skip to content

JIRA integration doesn't use the authentication for the proxy provided .

Summary

One of our customers encountered a Net::HTTPServerException (407 "Proxy Authentication Required"): when trying JIRA integration. It seems that they are using a proxy which requires authentication.

Looking at the jira-ruby entry in the Gemfile, it seems that we are using 1.7. Authentication support for proxy was added during the 1.8 release of the library: https://github.com/sumoheavy/jira-ruby/pull/333

Steps to reproduce

  1. Setup a proxy server with authentication.
  2. Configure GitLab to use that proxy.
  3. Try to setup JIRA integration.

What is the current bug behavior?

Returns a Net::HTTPServerException (407 "Proxy Authentication Required"):.

What is the expected correct behavior?

Connects to JIRA properly.

Relevant logs and/or screenshots

  "exception.class": "Net::HTTPServerException",
  "exception.message": "407 \"Proxy Authentication Required\"",
  "exception.backtrace": [
    "lib/gitlab/http.rb:24:in `perform_request'",
    "lib/gitlab/jira/http_client.rb:44:in `public_send'",
    "lib/gitlab/jira/http_client.rb:44:in `make_request'",
    "lib/gitlab/jira/http_client.rb:13:in `request'",
    "app/models/project_services/jira_service.rb:223:in `block in test_settings'",
    "app/models/project_services/jira_service.rb:361:in `jira_request'",
    "app/models/project_services/jira_service.rb:223:in `test_settings'",
    "app/models/project_services/jira_service.rb:196:in `test'",
    "app/controllers/projects/services_controller.rb:60:in `service_test_response'",
    "app/controllers/projects/services_controller.rb:46:in `test'",
    "ee/lib/gitlab/ip_address_state.rb:10:in `with'",
    "ee/app/controllers/ee/application_controller.rb:43:in `set_current_ip_address'",
    "app/controllers/application_controller.rb:479:in `set_current_admin'",
    "lib/gitlab/session.rb:11:in `with_session'",
    "app/controllers/application_controller.rb:470:in `set_session_storage'",
    "app/controllers/application_controller.rb:464:in `set_locale'",
    "lib/gitlab/error_tracking.rb:48:in `with_context'",
    "app/controllers/application_controller.rb:559:in `sentry_context'",
    "lib/gitlab/application_context.rb:52:in `block in use'",
    "lib/gitlab/application_context.rb:52:in `use'",
    "lib/gitlab/application_context.rb:20:in `with_context'",
    "app/controllers/application_controller.rb:455:in `set_current_context'",
    "ee/lib/gitlab/jira/middleware.rb:19:in `call'"
  ],

Possible fixes

Update jira-ruby to at least 1.8.

Customer info

Items

Edited by Arturo Herrero