RBAC Groups REST API fails with NotExportableException when Accessed from a Connected Master item

Issue

  • I want to get the RBAC configuration of a connected master using the RBAC REST API, with for example $CJOC_URL/job/$MASTER_NAME/groups/api/json but it fails with:
org.kohsuke.stapler.export.NotExportableException: class com.cloudbees.opscenter.server.rbac.ConnectedMasterProxyGroupContainer doesn't have @ExportedBean
	at org.kohsuke.stapler.export.ModelBuilder.get(ModelBuilder.java:58)
	at org.kohsuke.stapler.export.ModelBuilder.get(ModelBuilder.java:47)
	at org.kohsuke.stapler.ResponseImpl.writeOne(ResponseImpl.java:286)
	at org.kohsuke.stapler.ResponseImpl.serveExposedBean(ResponseImpl.java:278)
	at org.kohsuke.stapler.ResponseImpl.serveExposedBean(ResponseImpl.java:234)
	at hudson.model.Api.doJson(Api.java:223)
	[...]
Caused: javax.servlet.ServletException

Environment

Related Issue(s)

  • CTR-535 - RBAC REST API fails when accessed from Connected Master item at CJOC

Resolution

The issue is fixed in version 2.235.0.3 of the Operations Center RBAC plugin included in version 2.235.4.1 of CloudBees CI. The solution is to:

  • Upgrade CloudBees CI to version 2.235.4.1 or later.

Workaround

There is no workaround using the Jenkins REST API. Alternatively, the Jenkins CLI can be used to access the RBAC configuration of a Connected Master item. See Scripting RBAC with CLI commands.

Have more questions?

0 Comments

Please sign in to leave a comment.