Lion PAC proxy asking for authentication reapeatedly

Hello, Can some bro help with this problem which never happens with the same PAC proxy on Snow Leopard, like title says, Lion (10.7.2) frequently pops up the dialog asking for the authentication for the proxy server.


User uploaded file

System Preferences-OTHER, Mac OS X (10.7.2)

Posted on Nov 30, 2011 10:13 PM

Reply
15 replies

Dec 7, 2011 9:24 AM in response to xiao zhong

The prompt appears because you are configured to use a proxy that requires authentication yet you have not configured your system with the proper credentials for said proxy.



Just as you have to enter your credentials in Safari, all other processes that generate network traffic through your proxy must also have these same credentials. The prompt is generated by AuthBrokerAgent, and it is attempting to do just that.



So, you can:



1) when entering credentials in Safari, check the box to save them to your keychain



2) enter your credentials in the prompt



3) enter your credentials in System Preferences -> Network -> Advanced -> Proxies



While Xiao's solution will work to stop the dialog, unfortunately all background processes that must use the proxy or any other App that does not handle proxy authentication will either not work, or worse, silently fail.

Dec 7, 2011 7:59 PM in response to 0xBA5ECA5E

Yes, the proxy server needs authentication.

On the prompt, entering creadentials for .PAC proxy does not work well, thouth it is saved in Keychain, sometimes it still pops up frequently, which annoys the users' experience, and we dont encoruage the users save the password into the Keychian, as the user need change their password every 45 days, so we let a script automatically clear out the password items of Keychain in case old password saved in Keychian locks the user account.


Thanks for reply.

And now I am using the way I tested:


Remove /System/Library/LaunchAgents/com.apple.cfnetwork.AuthBrokerAgent.plist and reboot the Mac.

Nov 19, 2013 5:26 PM in response to xiao zhong

Do not use the suggestion to unload the notification center. That does not fix the problem.


This post provides the correct solution.

Usually a proxy authentication dialog allows the user the option to 'allow once' or 'always' etc, and to save the proxy login details to the user's login keychain.

But under both 10.8 and in particular 10.9 whenever a proxy is in use, the user gets bombarded with multiple recurrent proxy authentication dialogs without any save options and without any identifier.

Using the terminal command nettop, I discovered that the offending dialogs come from system processes, most notably syncdefaultsd. (How to do this at the end of the post)

The problem is that syncdefaultsd is not keychain aware. It needs access to the user's proxy settings at regular intervals, but can't get them from the user's login keychain. It's proxy request dialog does not have the option to save the details to the user's keychain, and worse still does not identify syncdefaultsd as the requesting process. Even if you open your login keychain to allow any application access to your proxy, syncdefaultsd will still keep asking for your proxy details.

The solution is to ensure that you have working proxy settings saved in the *system* keychain, not just your personal login keychain.

So when you next get one of these dialogs:

1. Note the server name that is requesting authentication, the port (usually 8080) and if it is an http or https request. Typically it will be something in the form https://someproxyserver.someorganization.com:8080

2. See if you already have an entry for that server in your login keychain. If not, make one manually, (being sure to enter the whole thing as per the example above with the :8080 at the end). Typically that there needs to be two separate keychain entries per proxy server, one for http and a second for https, though syncdefaultsd only uses https.

3. Once you have login keychain entries for the proxy server, double-click them and ensure that under Access all applications are allowed, and that your user name is saved.

4. Now for the fun bit. Option-drag and drop these entries into your system keychain. Click on the system keychain, and confirm that they are there, and that all the settings are exactly right.

For good measure, do a shift-restart then a normal restart.

You should now get no more annoying dialogs for that particular proxy server. If your proxy server has more than one alias, or if you have several, then whenever you get a new unidentified dialog, repeat the above.

I discovered it using the terminal command nettop, typing into the terminal:

nettop -m tcp

This lists all active network processes. If you quit all apps you should still see quite a few network processes. If you see syncdefaultsd, wait for it to go away, or kill it via the Activity Monitor. If you haven't done the fix as above, and you open Safari, you'll see syncdefaultsd open shortly after Safari, and the annoying dialog immediately appears. After the fix is implemented, the dialogs don't appear when syncdefaultsd tries to start up.

Hope this helps someone, and that Apple fixes it in 10.9.1

Cheers

Chris.

Jan 16, 2014 5:55 AM in response to ctzsnooze

Hello Chris.

Wonderful instructions, they helped me on an iMac with OS X 10.8 (I believe to remember, not sure).

Now, I'm facing the problem that Google Chrome doesn't care about the changes I made: every time I reboot the system, I have to authenticate on the proxy. Which is not happening anymore on Safari...


Any help on this?


Kind regards,

Flavio.

Jan 24, 2014 4:42 PM in response to FlavioB

@FlabioB: I don't use Chrome so I can't help much with your specific issue. If Chrome is reconfigured to use system proxy settings and to store passwords in the keychain, that may solve the issue (ie make it work like Safari). If not, run nettop as suggested, and watch closely for the names of the processes that appear in nettop when the dialog appears after launching Chrome. This will help identify the source of the dialog. From that you may be able to use the technique above to solve the problem. Note that nettop is only needed for dialogs that do not identify the name of the process requesting access to the proxy; if your Chrome dialog says which process is asking for the proxy password, then find a way of saving the password in Chrome or in your keychain.

That's all I can suggest, sorry if it isn't enough to help.

Chris.

Jan 13, 2015 2:23 PM in response to ctzsnooze

The solution to resolve the proxy issue gives quite a few details, however I'm not quite understanding how to create the proxy settings and save them in the "system keychain." Is there a specific tool or utility that's used so that I can create the settings that I'd like to configure in reference to my proxy? Or is this done through creating a cert for the keychain?


Thanks in advance.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Lion PAC proxy asking for authentication reapeatedly

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.