JDK-8075602 : Applet throws java.security AccessControlException in java console when playing it
  • Type: Bug
  • Component: deploy
  • Affected Version: 8u45,8u60
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_7
  • CPU: x86
  • Submitted: 2015-01-24
  • Updated: 2016-02-05
  • Resolved: 2015-04-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u51 b08Fixed 9Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Description
Testsuite:set1 in applet
Test name(s):byart_Sudoku
Product(s) tested:Jre8u45b04 32bit  
OS/architecture:windows7 sp1 x86
Reproducible: Always
Reproducible on machine: egtc

Is it a Regression:Yes

[If Regression] Regression introduced in release/build: Jre8u45b02
(Jre 8u45b01 32bit+Windows7 sp1 x86+IE11:Pass) 
(Jre 8u45b02 32bit+Windows7 sp1 x86+IE11:Failed, it's the same issue) 

Test result on the last GAed release for this train: Pass
(Jre 8u31b13 32bit+Windows7 sp1 x86+IE11:Pass) 

[if Fail] Test result on FCS:
(Jre 8b132 32bit+Windows7 sp1 x86+IE11:Pass) 

Is it a platform specific issue:No
(Jre 8u45b04 32bit+Mac10.9+Safari7: Failed,it is the same issue)
(Jre 8u45b04 32bit+Oel6.4 x86+FF36: Failed,it is the same issue)

Exception/Error from Log:http://scaaa008.us.oracle.com:9502/runs%2F706004.ManualSubmit-1/workDir/set1/byart_Sudoku.jtr

Copy applet workspace,install test jre,and run this case
Steps to reproduce:
1. Add "http://www.by-art.com/" to ESL (Exception Site List).
2. Browse http://www.by-art.com. 
3. Select to play "Sudoku" game. 
4. Review "How to play Sudoku" if needed. 
5. Click "Run" in the applet.

The actual result:
Step 4: applet throws java.security AccessControlException in java console when playing it, please refer to byart_Sudoku.html.jpg and byart_Sudoku.html.txt.
Comments
Same bug: http://aurora.ru.oracle.com/functional/faces/RunDetails.xhtml?names=966733.ManualSubmit-1 RULE set2/brainjar_SnakePit any any Steps to reproduce: 1. Add http://www.brainjar.com to ESL. 2. Browse http://www.brainjar.com/java/games/snakepit/ 3. Applet should be loaded 4. Check the Java Console for warnings, errors network: Cache entry not found [url: http://www.brainjar.com/crossdomain.xml, version: null] network: Connecting http://www.brainjar.com/crossdomain.xml with proxy=DIRECT network: Connecting http://www.brainjar.com:80/ with proxy=DIRECT java.security.AccessControlException: access denied ("java.net.SocketPermission" "www.brainjar.com" "resolve") at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkConnect(Unknown Source) at sun.plugin2.applet.SecurityManagerHelper.checkConnectHelper(Unknown Source) at sun.plugin2.applet.AWTAppletSecurityManager.checkConnect(Unknown Source) at java.net.InetAddress.getAllByName0(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getByName(Unknown Source) at com.sun.deploy.net.CrossDomainXML.addAccess(Unknown Source) at com.sun.deploy.net.CrossDomainXML.allowNoAccess(Unknown Source) at com.sun.deploy.net.CrossDomainXML.check(Unknown Source) at sun.plugin2.applet.SecurityManagerHelper.checkConnectHelper(Unknown Source) at sun.plugin2.applet.AWTAppletSecurityManager.checkConnect(Unknown Source) at java.net.InetAddress.getAllByName0(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getByName(Unknown Source) at java.net.URLStreamHandler.getHostAddress(Unknown Source) at java.net.URLStreamHandler.hashCode(Unknown Source) at java.net.URL.hashCode(Unknown Source) at java.util.HashMap.hash(Unknown Source) at java.util.HashMap.get(Unknown Source) at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter$AppletContextImpl.getAudioClip(Unknown Source) at java.applet.Applet.getAudioClip(Unknown Source) at SnakePit.loadSounds(SnakePit.java:491) at SnakePit.run(SnakePit.java:416) at java.lang.Thread.run(Unknown Source)
19-06-2015

Test passed in 8u51 b08: http://www.by-art.com/sudoku/sudoku.php cache: Read manifest for http://www.by-art.com/sudoku/sudoku.zip: read=82 full=82 security: Grant connect perm for http://www.by-art.com/sudoku/sudoku.zip : java.security.Permissions@228a93 ( ("java.net.URLPermission" "http://www.by-art.com:80/-" "*:*") ("java.net.URLPermission" "http://www.by-art.com:80" "*:*") ) security: Accessing keys and certificate in Mozilla user profile: null
14-04-2015

Fixed with a changset JDK-8077254
08-04-2015

SQE OK to defer it from CPU15_02
25-03-2015

grant { permission java.net.SocketPermission "www.by-art.com:80", "accept,connect,resolve"; }; helps too. Note that SocketPermission shouldn't contain protocol prefix. Looks like there is an issue when deployment should add items from ESL to the permissions table.
23-03-2015

FULL TRACE: basic: Applet loaded. basic: Applet resized and added to parent container preloader: Delivering: AppletInitEvent[type=CallInit] preloader: Enqueue: com.sun.javaws.progress.PreloaderDelegate$4@e843dd ui: missing resource: java.util.MissingResourceException: Can't find resource for bundle com.sun.deploy.resources.Deployment, key PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 280145 us, pluginInit dt 999751 us, TotalTime: 1279896 us basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 280145 us, pluginInit dt 999751 us, TotalTime: 1279896 us network: Cache entry not found [url: http://www.by-art.com/crossdomain.xml, version: null] network: Connecting http://www.by-art.com/crossdomain.xml with proxy=HTTP @ www-proxy-ukc1.uk.oracle.com/10.254.202.93:80 java.security.AccessControlException: access denied ("java.net.SocketPermission" "www.by-art.com" "resolve") at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkConnect(Unknown Source) at sun.plugin2.applet.SecurityManagerHelper.checkConnectHelper(Unknown Source) at sun.plugin2.applet.AWTAppletSecurityManager.checkConnect(Unknown Source) at java.net.InetAddress.getAllByName0(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getByName(Unknown Source) at com.sun.deploy.net.CrossDomainXML.addAccess(Unknown Source) at com.sun.deploy.net.CrossDomainXML.allowNoAccess(Unknown Source) at com.sun.deploy.net.CrossDomainXML.check(Unknown Source) at sun.plugin2.applet.SecurityManagerHelper.checkConnectHelper(Unknown Source) at sun.plugin2.applet.AWTAppletSecurityManager.checkConnect(Unknown Source) at java.net.InetAddress.getAllByName0(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getByName(Unknown Source) at java.net.URLStreamHandler.getHostAddress(Unknown Source) at java.net.URLStreamHandler.hashCode(Unknown Source) at java.net.URL.hashCode(Unknown Source) at java.util.HashMap.hash(Unknown Source) at java.util.HashMap.get(Unknown Source) at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter$AppletContextImpl.getImage(Unknown Source) at java.applet.Applet.getImage(Unknown Source) at java.applet.Applet.getImage(Unknown Source) at Sudoku.init(Unknown Source) at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) cache: Clean up the reference queue: http://www.by-art.com/sudoku/sudoku.zip cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@3cfba07c: 2 basic: Loaded image: http://www.by-art.com/sudoku/b2.jpg basic: Applet initialized basic: Starting applet basic: completed perf rollup preloader: Delivering: AppletInitEvent[type=CallStart] preloader: Enqueue: com.sun.javaws.progress.PreloaderDelegate$4@1d170e basic: Applet made visible basic: Applet started basic: Told clients applet is started preloader: Stop progressCheck thread queue.size()=0 basic: Starting applet teardown preloader: Delivering: ApplicationExitEvent preloader: Enqueue: com.sun.javaws.progress.PreloaderDelegate$4@18f8e0d basic: Finished applet teardown preloader: Start progressCheck thread preloader: Stop progressCheck thread queue.size()=0 basic: Removed progress listener: sun.plugin.util.ProgressMonitorAdapter@1bec648 basic: PluginMain.unregisterApplet: 1 from mananger sun.plugin2.applet.Applet2Manager@132e575 ui: plugin2manager.parentwindowDispose preloader: Construct preloader delegate preloader: Construct preloader delegate adapter=class com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter preloader: Setting default preloader and progress monitor for non JNLP applets basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@1263e86 preloader: Installing progress monitor true security: Expected Main URL: http://www.by-art.com/sudoku/sudoku.zip preloader: Using preloader class: null com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter@8e5ba4 preloader: Using default preloader preloader: Requested to use preloader class: null preloader: Skipped all (0) download events prior to null preloader: GrayBox: parent = sun.plugin2.main.client.PluginEmbeddedFrame[frame1,0,0,500x380,layout=java.awt.BorderLayout,title=,resizable,normal] basic: Plugin2ClassLoader.addURL parent called for http://www.by-art.com/sudoku/sudoku.zip ruleset: Non-jnlp appRef: type: HTML title: SudokuApp location: http://www.by-art.com/sudoku/sudoku.php htmlLocation: http://www.by-art.com/sudoku/sudoku.php jnlpLocation: null anchorURL: null ruleset: Non-jnlp codeRef: jar location: http://www.by-art.com/sudoku/sudoku.zip jar version: null ruleset: Non-jnlp appRef: type: HTML title: SudokuApp location: http://www.by-art.com/sudoku/sudoku.php htmlLocation: http://www.by-art.com/sudoku/sudoku.php jnlpLocation: null anchorURL: null ruleset: Non-jnlp codeRef: jar location: http://www.by-art.com/sudoku/ jar version: null security: SSV validation: running: 1.8.0_45 requested: null range: null javaVersionParam: null Rule Set version: null network: Created version ID: 1.8.0.45 network: Created version ID: 1.8.0.45 security: continue with running version network: Created version ID: 1.8.0.45 network: Created version ID: 1.8 network: Created version ID: 8.0.45 preloader: Delivering: AppletInitEvent[type=CallConstructor] preloader: Enqueue: com.sun.javaws.progress.PreloaderDelegate$4@4f9f24 preloader: Start progressCheck thread basic: Applet loaded.
23-03-2015

Probably caused by https://bugs.openjdk.java.net/browse/JDK-8066486
23-03-2015

WORKAROUND I add "deployment.security.use.user.home.java.policy=true" to C:\Windows\Sun\Java\Deployment\deployment.properties and add ".java.policy" to USERPROFILE (user home): grant { permission java.net.SocketPermission "*:*", "accept, connect, listen, resolve"; }; And I have: security: Grant connect perm for http://www.by-art.com/sudoku/sudoku.zip : java.security.Permissions@7d7d5e ( ("java.net.URLPermission" "http://www.by-art.com:80/-" "*:*") ("java.net.URLPermission" "http://www.by-art.com:80" "*:*") ) ruleset: Non-jnlp appRef: type: HTML title: SudokuApp location: http://www.by-art.com/sudoku/sudoku.php htmlLocation: http://www.by-art.com/sudoku/sudoku.php jnlpLocation: null anchorURL: null ruleset: Non-jnlp codeRef: jar location: http://www.by-art.com/sudoku/sudoku.zip jar version: null ruleset: finding Deployment Rule Set for appRef= type: HTML title: SudokuApp location: http://www.by-art.com/sudoku/sudoku.php htmlLocation: http://www.by-art.com/sudoku/sudoku.php jnlpLocation: null anchorURL: null, codeRef = jar location: http://www.by-art.com/sudoku/sudoku.zip jar version: null ruleset: RuleId compare: (http, www.by-art.com, -1, ) to url: http://www.by-art.com/sudoku/sudoku.php
23-03-2015

Any workaround for this? Have you tried add permissions in .java.policy?
23-03-2015

8u31 b13: network: Created version ID: 1.8 network: Created version ID: 8.0.31 basic: Applet loaded. basic: Applet resized and added to parent container basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 283330 us, pluginInit dt 3013718 us, TotalTime: 3297048 us cache: Clean up the reference queue: http://www.by-art.com/sudoku/sudoku.zip cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@3cfba07c: 2 basic: Loaded image: http://www.by-art.com/sudoku/b2.jpg
20-03-2015

8u45 b13 (spb23112.ru.oracle.com): basic: Applet loaded. basic: Applet resized and added to parent container basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 375424 us, pluginInit dt 1161606 us, TotalTime: 1537030 us network: Cache entry not found [url: http://www.by-art.com/crossdomain.xml, version: null] network: Connecting http://www.by-art.com/crossdomain.xml with proxy=HTTP @ www-proxy.ru.oracle.com/10.254.202.93:80 java.security.AccessControlException: access denied ("java.net.SocketPermission" "www.by-art.com" "resolve") at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkConnect(Unknown Source) at sun.plugin2.applet.SecurityManagerHelper.checkConnectHelper(Unknown Source) at sun.plugin2.applet.AWTAppletSecurityManager.checkConnect(Unknown Source) at java.net.InetAddress.getAllByName0(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getByName(Unknown Source) at com.sun.deploy.net.CrossDomainXML.addAccess(Unknown Source) at com.sun.deploy.net.CrossDomainXML.allowNoAccess(Unknown Source) at com.sun.deploy.net.CrossDomainXML.check(Unknown Source) at sun.plugin2.applet.SecurityManagerHelper.checkConnectHelper(Unknown Source) at sun.plugin2.applet.AWTAppletSecurityManager.checkConnect(Unknown Source) at java.net.InetAddress.getAllByName0(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getByName(Unknown Source) at java.net.URLStreamHandler.getHostAddress(Unknown Source) at java.net.URLStreamHandler.hashCode(Unknown Source) at java.net.URL.hashCode(Unknown Source) at java.util.HashMap.hash(Unknown Source) at java.util.HashMap.get(Unknown Source) at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter$AppletContextImpl.getImage(Unknown Source) at java.applet.Applet.getImage(Unknown Source) at java.applet.Applet.getImage(Unknown Source) at Sudoku.init(Unknown Source) at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) basic: Loaded image: http://www.by-art.com/sudoku/b2.jpg basic: Applet initialized basic: Starting applet
20-03-2015

This issue can be reproduced using JRE8u45b10 on SLES11 sp1 x86 FF36. RULE set2/bodo_Puzzle any any RULE set2/brainjar_Asteroids any any RULE set2/brainjar_TailGunner any any RULE set2/dropbox_RockPaperScissors any any RULE set2/gamesiwon_PyramidSolitaire any any RULE set2/otherwise_ExponentialGrowth any any RULE set2/pivotApacheOrg_Kitchen-sink any any RULE set2/spaceflight_nasa_SkyWatch any any RULE set2/vatican_VaticanMuseums any any
04-03-2015

RULE set1/byart_Sudoku any any RULE set1/crystalsquid_MonkeyTrouble any any RULE set1/crystalsquid_TrafficJammer any any RULE set1/ericharshbarger_BreakAway any any RULE set1/freearcade_SuperDunkBasketball any any RULE set1/lectureonline_PianoSound any any RULE set1/playfreegame_AkimoTequilaWorm any any RULE set1/playfreegame_JavaIceHockey any any RULE set1/smiliegames_BugBuster any any RULE set1/thejmaker_ThreeDimView any any RULE set1/radicalplay_NeedforMadness any any RULE set1/toytoygames_AstroCrusher any any RULE set1/wildsnake_SoccerStartsOnline any any RULE set1/wolvesden_3DDriver any any RULE set1/wolvesden_SkeetShoot any any RULE set1/wolvesden_SnakePit any any RULE set1/wolvesden_TuxOnTheRun any any RULE set1/wolvesden_UFOAttack any any RULE set1/crystalsquid_BeeMania any any RULE set1/vredungmand_MrHopwitMysterious any any RULE set1/vredungmand_SpaceraceTimbuktu any any
10-02-2015

This issue can be reproduced using JRE8u45b05 on MacOS10.9 x64 Safari7.0. RULE set1/javaonthebrain_Rubik any any
03-02-2015

This issue can be reproduced using JRE8u45b05 on Windows XP SP3 x86 32bit IE8.
29-01-2015

Confirmed in 8u45 b04
26-01-2015