Thanks Quinn for the detailed response. I'll take it item by item.
I can try with our Apple Dev identity. It's more involved with the pipeline builds, but I'll try it if you think it will help.
Also, the com.apple.security.device entitlement isn’t a thing.
Sorry, I made a mistake in my report. It was this entitlement:
com.apple.security.device.usb that you mentioned later. If I run the test using a JDK bundle without that entitlement, then open fails with the same error code in my personal user account the same as the agent account with the com.apple.security.device.usb entitlement.
Here's how it looks in the xml formatted entitlements:
<key>com.apple.security.device.usb</key>
<true/>
So, when you say that you’re running the test logged in as the Jenkins agent, are you actually logged in? Or relying on Jenkins to log you in?
This is through Terminal and sudo su - jenkins-agent. So logged in, but not through the mac login UI.
And, if use the login window to log in as the Jenkins user account on the GUI, does your program work?
I don't have the credentials for this account since they're managed by another group. But I was able to try with a new testuser account with admin privileges and logging in directly succeeds to open HID like my personal account.
If I log in with sudo su - testuser, then it fails with the same error code as the jenkins-agent account. Is there an entitlement that would help in this scenario? Or is it better to just use the Apple Dev identity to sign the JDK?