Hi!
I have a security problem with an Java agent that need to use proxy authentication with HttpURLConnection.
I receive this message on the java console when agent run on local client :
java.security.AccessControlException: access denied (java.net.NetPermission setDefaultAuthenticator)
the Exception is thrown on this line :
Authenticator.setDefault(new ProxyAuthenticator (proxyUser,proxyPwd));
One way to solve the problem is to edit manualy the file $LOTUS_INSTALL_DIR\lotus\notes\jvm\lib\security\java.policy
by adding the following code:
grant {
permission java.net.NetPermission
"setDefaultAuthenticator";
permission java.net.NetPermission
"requestPasswordAuthentication";
};
This works fine… but I don’t want to modify this file on all clients !
Is there any other solution ?
Because if I test my Java code on my Eclipse framework it works without editing the java.policy.
-
My agent is set to “Allow restricted operations”
-
Manager Access, ECL all operation …
Any Ideas ???
Thanks in advance
Fabian
Click the link below to test the agent, it’s an openntf project called Peanuts Translator, release 1.0.3 :