Search code examples
jenkinsokta

Okta AD group not matching with Jenkins Role


I have set up the following Okta AD group deployer-beta and assigned myself to this role in Okta.

enter image description here

And have also enabled the group to match regex .* enter image description here

On Jenkins side, I have installed the plugin Role-based Authorization Strategy and configured the same name deployer-beta as an "Item Role" in Jenkins enter image description here

I would expect when I first log in to Jenkins that I am assigned to this role; however, I am not as seen below: enter image description here

What am I missing for the Okta AD role to match my Jenkins role?


Solution

  • I was able to get the role to match by setting up the role deployer_beta_role as an Item Role (this can also be a Global Role) under the "Manage Roles" tab in Jenkins

    enter image description here

    And then in the "Assign Roles" tab, create a group called deployer_beta and assign deployer_beta_role to that group.

    enter image description here

    Now when a user logs in via Okta SAML 2.0 and they are assigned to the deployer_beta Okta AD group, they will automatically log in with the deployer_beta privileges that were set up in Jenkins.