java.security.AccessControlException: access denied ("java.security.SecurityPermission" "authProvider.SunMSCAPI") java.security.AccessControlException: access denied ("java.security.SecurityPermission" "authProvider.SunMSCAPI") oracle oracle

java.security.AccessControlException: access denied ("java.security.SecurityPermission" "authProvider.SunMSCAPI")


I cannot comment yet so am putting this as an answer instead.

  1. I believe creating the .java.policy file in your applet will be too late - the plugin will have already started up and read the policy files before running any of your code.

  2. You could sign your applet and use a jnlp file to assign permissions in the security element


I know it's pretty late to answer here, but adding my solution as I had a tough time with this:

My Issue: While deploying an application (a WAR file) that has dependencies on Bouncy Castle libraries, I faced this issue: `

cannot create instance oforg.bouncycastle.jcajce.provider.digest.GOST3411$Mappings java.security.AccessControlException: access denied("java.security.SecurityPermission""putProviderProperty.BC")

`

Here is what I did and it worked for me:Go to: {Installed JDK path}\jre\lib\security\Open the file java.policy

Add permission: permission java.security.SecurityPermission "putProviderProperty.BC";

Restart the programs to load the changes.

I am yet to understand how exactly this works or if it is safe to just change java.policy file like this (still looking for other ways to achieve such a configuration).

Do take precautions with such a change. More at Oracle's doc


Issue:

java.security.AccessControlException: access denied ("java.security.SecurityPermission" "authProvider.SunMSCAPI")    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)

It is because we needs permission to access file system resources, but an unsigned applet is denied this permission by default. So, to overcome this, the applet must be signed.

Simply you need to signed your applet jar file.

Signed jar file