-
Bug
-
Resolution: Fixed
-
P2
-
8, 11, 14, 15
-
b24
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8245114 | 14u-cpu | Erik Joelsson | P3 | Resolved | Fixed | master |
JDK-8245315 | 14.0.2 | Erik Joelsson | P2 | Resolved | Fixed | b07 |
JDK-8247356 | 13.0.4 | Erik Joelsson | P2 | Resolved | Fixed | b05 |
JDK-8245115 | 11.0.9-oracle | Erik Joelsson | P3 | Resolved | Fixed | b01 |
JDK-8245316 | 11.0.8-oracle | Erik Joelsson | P2 | Resolved | Fixed | b08 |
JDK-8245746 | 11.0.8 | Erik Joelsson | P2 | Resolved | Fixed | b05 |
JDK-8245116 | 8u271 | Erik Joelsson | P3 | Resolved | Fixed | b01 |
JDK-8245292 | 8u261 | Erik Joelsson | P2 | Resolved | Fixed | b08 |
JDK-8251634 | emb-8u271 | Erik Joelsson | P2 | Resolved | Fixed | team |
JDK-8248752 | emb-8u261 | Erik Joelsson | P2 | Resolved | Fixed | team |
---
Since upgrading to the hardened runtime version of the JDK, I can no longer access microphone input using the standard Java Sound API, only silence is captured when running my .jar file using the command line. While checking Console.app, I found that TCC is blocking microphone access in the background because of a missing entitlement:
Prompting policy for hardened runtime; service: kTCCServiceMicrophone requires entitlement com.apple.security.device.audio-input but it is missing for ACC:{ID: net.java.openjdk.cmd, PID[2161], auid: 501, euid: 501, binary path: '/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/java'}, REQ:{ID: com.apple.tccd, PID[154], auid: 0, euid: 0, binary path: '/System/Library/PrivateFrameworks/TCC.framework/Versions/A/Resources/tccd'}
This causes microphone access to be blocked without any user action:
Policy disallows prompt for ACC:{ID: net.java.openjdk.cmd, PID[2161], auid: 501, euid: 501, binary path: '/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/java'}, REQ:{ID: com.apple.tccd, PID[154], auid: 0, euid: 0, binary path: '/System/Library/PrivateFrameworks/TCC.framework/Versions/A/Resources/tccd'}; access to kTCCServiceMicrophone denied
This does not happen with file access: a dialog to provide access to "Documents" and "Downloads" appears when trying to access a file there.
---
We need to add some more entitlements to the java launcher. It seems these will only be needed for the main java launcher and none of the others. The same should also be added to the launcher jpackage bundles into jpackaged applications.
The question is which other entitlements may be needed.
https://developer.apple.com/documentation/security/hardened_runtime
- backported by
-
JDK-8245292 Missing entitlements for hardened runtime
- Resolved
-
JDK-8245315 Missing entitlements for hardened runtime
- Resolved
-
JDK-8245316 Missing entitlements for hardened runtime
- Resolved
-
JDK-8245746 Missing entitlements for hardened runtime
- Resolved
-
JDK-8247356 Missing entitlements for hardened runtime
- Resolved
-
JDK-8248752 Missing entitlements for hardened runtime
- Resolved
-
JDK-8251634 Missing entitlements for hardened runtime
- Resolved
-
JDK-8245114 Missing entitlements for hardened runtime
- Resolved
-
JDK-8245115 Missing entitlements for hardened runtime
- Resolved
-
JDK-8245116 Missing entitlements for hardened runtime
- Resolved
- relates to
-
JDK-8246094 [macos] Sound Recording and playback is not working
- Resolved