Jira (PUP-2172) Add exceptions to http_proxy_{port,host}

0 views
Skip to first unread message

Aaron Armstrong (JIRA)

unread,
Dec 29, 2014, 1:56:31 PM12/29/14
to puppe...@googlegroups.com
Aaron Armstrong updated an issue
 
Puppet / Bug PUP-2172
Add exceptions to http_proxy_{port,host}
Change By: Aaron Armstrong
Component/s: Networking Services
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a)
Atlassian logo

Moses Mendoza (JIRA)

unread,
May 18, 2017, 2:03:54 PM5/18/17
to puppe...@googlegroups.com
Moses Mendoza updated an issue
Change By: Moses Mendoza
Labels: triaged
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

James Ralston (JIRA)

unread,
Mar 13, 2018, 12:36:05 PM3/13/18
to puppe...@googlegroups.com
James Ralston updated an issue
Change By: James Ralston
Affects Version/s: PUP 5.4.0
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

James Ralston (JIRA)

unread,
Mar 13, 2018, 1:54:05 PM3/13/18
to puppe...@googlegroups.com
James Ralston commented on Bug PUP-2172
 
Re: Add exceptions to http_proxy_{port,host}

I'm re-opening this ticket, because I believe the severity of the problem hasn't been fully appreciated.

Any security-competent site that requires outbound HTTP[S] traffic to use a network proxy will have configured the proxy to deny all requests for internal resources. (Otherwise, internal users can bypass internal network ACLs by routing requests through the proxy.)

This means that any application that is proxy-aware must implement an exception list for the proxy. Without this exception list, the application is essentially offering its users two choices:

  • You can access foreign resources, but not local resources.
  • You can access local resources, but not foreign resources.

We see this in the applications that rely on the curl-style (http_proxy, https_proxy, and no_proxy) environment variables. E.g.:

$ set | grep proxy
http_proxy=http://proxy.example.org:8080
https_proxy=http://proxy.example.org:8080
no_proxy=localhost,.example.org

The no_proxy setting is not optional: without this, applications will not be able to access local resources.

As a real-world example of just how critical the no_proxy list is, consider this example:

package { 'r10k':
  ensure   => present,
  provider => puppet_gem,
}

This cannot be implemented with sites that use a proxy.

If I do not configure the agent to use the proxy, then the agent will fail to install the gem:

Error: Execution of '/opt/puppetlabs/puppet/bin/gem install --no-rdoc --no-ri r10k' returned 2: ERROR:  Could not find a valid gem 'r10k' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - Errno::ENETUNREACH: Failed to open TCP connection to api.rubygems.org:443 (Network is unreachable - connect(2) for "api.rubygems.org" port 443) (https://api.rubygems.org/specs.4.8.gz)

But if I configure the agent to use the proxy, the agent will attempt to use the proxy to connect to the Puppet server, which fails:

Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: SSL_connect returned=1 errno=0 state=error: certificate verify failed: [unable to get local issuer certificate for /CN=puppetserver.example.org]

To put it as bluntly as possible: without the ability to add exception lists, Puppet's proxy handling is fundamentally broken, and for Puppet users who have to use a (properly-configured) proxy server, Puppet's broken proxy handling breaks core features of Puppet.

(The only reason why Puppet has been usable for us until now is because up to this point, we have haven't needed to set proxy settings for Puppet, because we have only used package resources to install RPM packages, and we mirror all yum repositories locally. But we have customers who want to use Puppet package resources with other providers, and mirroring all of rubygems.org, pypi.python.org, et. al. locally just to work around Puppet's broken proxy handling is a really tough sell.)

Josh Cooper (JIRA)

unread,
Mar 29, 2019, 12:43:03 PM3/29/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Team: Coremunity

Josh Cooper (JIRA)

unread,
Aug 7, 2019, 7:59:04 PM8/7/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Platform Core KANBAN

Josh Cooper (JIRA)

unread,
Aug 7, 2019, 8:00:05 PM8/7/19
to puppe...@googlegroups.com
Josh Cooper assigned an issue to Josh Cooper
Change By: Josh Cooper
Assignee: Josh Cooper

Josh Cooper (JIRA)

unread,
Aug 7, 2019, 8:26:02 PM8/7/19
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-2172
 
Re: Add exceptions to http_proxy_{port,host}

Tickets PUP-9942 and PUP-9316 allow a proxy exception list to be specified via NO_PROXY environment variable or Puppet[:no_proxy] puppet setting respectively, which I think addresses most of the concerns in this ticket.

Ticket PUP-8027 covers the gem provider issue.

The remaining issue is whether puppet should not use a proxy for some hosts by default. Skipping localhost is easy enough, but I don't think we should skip hosts in the same domain by default. That could be a breaking change for some, and be highly dependent on the network environment. For this ticket, I'm thinking we should just skip localhost by default.

Josh Cooper (JIRA)

unread,
Aug 7, 2019, 8:27:03 PM8/7/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 6.8.0
Fix Version/s: PUP 6.4.4
Fix Version/s: PUP 6.0.11
Fix Version/s: PUP 5.5.17
Reply all
Reply to author
Forward
0 new messages