Synaptic doesn't play nicely with proxy-auth

Bug #56293 reported by robc
4
Affects Status Importance Assigned to Milestone
synaptic (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: synaptic

Synaptic (and, as far as I can tell, apt-get) doesn't use the "Acquire::http::proxy" settings in apt.conf when proxy details are set up in System->Preferences->Network Proxy.

Neither the system preferences nor synaptic preferences allow for proxy username/passwords to be entered. The synaptic connection preferences don't have any option to use or override the system settings.

I need to set the system preferences to "direct connection" for apt-get to work.

In breezy and earlier, it was simple enough to coerce apt and synaptic to DTRT.

Revision history for this message
Roland Kruse (rkruse) wrote :

I also got bitten by this. I also think I found the reason for this confusing behaviour.

The system preferences proxy setting (System -> preferences -> Network Proxy) has the effect of setting the http_proxy environment variable, to be inherited by all programs started subsequently. You can confirm this by starting a terminal after setting the proxy, and type 'echo http_proxy' (or 'env | grep proxy').

The bug is that any authentication tokens you set in system preferences (by pressing the 'Details' button to the right of the http proxy in the network proxy window) are *not* reflected in the http_proxy environment variable. And, the http_proxy environment variable *overrides* any "Acquire::http::proxy" settings you have in apt.conf (see apt.conf manpage).

This only becomes a problem when the proxy requires authentication. It affects (at least) apt-get, synaptic, the upgrade manager, and wget (by http_proxy also overriding /etc/wgetrc).

Interestingly, if you start gconf-editor, you'll see that the authentication tokens are stored (system->http_proxy), the problem being only that they are not exported in the http_proxy environment variable.

As you point out, the only workaround is to set up direct internet access in the system proxy settings, and edit in proxy settings in apt.conf and wgetrc manually (the latter is required for some of the non-free packages using wget to get stuff from the 'net).

Coming from Debian, I am used to edit .conf files and can live with this, but I'd hate to have to explain this to a newly converted Windows user. Adding to the confusion is that there are also proxy settings in Synaptic (as you point out) and Firefox. The FIrefox setting is completely unrelated, but adds to the confusion for ex-Windows users because they are used to set proxy settings in only one place - Internet explorer.

Revision history for this message
robc (robc-nudepenguins) wrote :

Aha, this all makes sense. I can work around it, but you're right, it's horribly confusing for new users.

What would be best IMHO, is if the suite of apt frontends (synaptic, update-manager, etc) handled the "407 Proxy auth required" response gracefully and prompted for credentials.

Revision history for this message
Roland Kruse (rkruse) wrote :

I agree with this, I am a quite uncomfortable with the security aspects of storing the proxy credentials in plain text in a file. Particularly in a corporate setting, which is where this is most likely to be a problem.

Anyway, this seems to have been addressed already. I searched a bit more and found Bug #48332 and Bug #48329, the latter says the same I did above in a more concise manner, and has been reported upstream to gnome.

http://bugzilla.gnome.org/show_bug.cgi?id=339134

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.