Migration of authorizations into Role-based Authorization


I am using “Project Based Authorization” as “Authorization strategy” in my Jenkins environment.

I will switch to “Role Based Authorization Strategy” since there is no API support.

When I searched, in Jenkins; I saw that I cannot use 2 different Authorization strategies together.

How can I move existing authorizations from “Project Based Authorization”, when I searched for a method, I could not find it.

I plan to export the authorizations in all my jobs and import them using the “Role Based Authorization Strategy” APIs as in the attached image. Is there an easier trick to this process?

Thanks in advance for your comments and feedback.

1 Like

There is no easier way. Beware that role-strategy plugin is not the best choice when you have many folders and you need many roles, you might encounter performance issues when accessing the UI.
And of course before you do anything, first ensure that you know how to setup the rules so everything works as expected. Best is to setup another test Jenkins instance where you test the permission setup, the migration process and the API usage.
And most important take a backup of your JENKINS_HOME before you start migrating the productive instance.