Repository-stored Specs thread permission

Symptom

By design of thread security, Bamboo does not permit the access of thread externally.

When a repository stored spec tries to perform an operation that requires thread access, an exception similar to this is thrown.

Exception
oracle.jdbc.driver.OracleDriver registerMBeans
WARNING: Error while registering Oracle JDBC Diagnosability MBean.java.security.AccessControlException: access denied ("javax.management.MBeanServerPermission" "createMBeanServer")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
	at java.security.AccessController.checkPermission(AccessController.java:884)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
	at com.atlassian.bamboo.specs.maven.sandbox.AbstractThreadPermissionVerifier.checkPermission(AbstractThreadPermissionVerifier.java:18)
	at com.atlassian.bamboo.specs.maven.sandbox.BambooSpecsSecurityManager.checkPermission(BambooSpecsSe      curityManager.java:37)
	at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:465)
	at oracle.jdbc.driver.OracleDriver.registerMBeans(OracleDriver.java:365)
	at oracle.jdbc.driver.OracleDriver$1.run(OracleDriver.java:241)
	at java.security.AccessController.doPrivileged(Native Method)
	at oracle.jdbc.driver.OracleDriver.<clinit>(OracleDriver.java:237)
	at Main.main(Main.java:43)

Workaround

Bamboo Repository-Stored Specs can be set to not use the Security Manager using the following JVM argument:

-Dbamboo.repository.stored.specs.security.manager.enabled=false
Last modified on Jul 19, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.