Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-73294

Role-based Authorization Strategy running very slow

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • role-strategy-plugin
    • None
    • Jenkins version : 2.440.2
      Plugin Version: 717.v6a_69a_fe98974

      Role-based Authorization Strategy running very slow 

      Jenkins version : 2.440.2
      Plugin Version: 717.v6a_69a_fe98974

       

      when i try to add the users/groups to manage role or assigned role taking more time some time not openning proprly 

          [JENKINS-73294] Role-based Authorization Strategy running very slow

          Markus Winter added a comment -

          Please provide more details.

          What exactly is slow and what you mean with not opening properly?

          The page to assign users to roles should load fast. What might be slow is resolving the user/group id and getting the actual displayname of a user/group. The plugin asks the security realm for this information and when running without http2 this is done serially so it strongly depends how fast the security realm is. With http2 enabled this will be much faster as those requests are done in parallel

           

          Markus Winter added a comment - Please provide more details. What exactly is slow and what you mean with not opening properly? The page to assign users to roles should load fast. What might be slow is resolving the user/group id and getting the actual displayname of a user/group. The plugin asks the security realm for this information and when running without http2 this is done serially so it strongly depends how fast the security realm is. With http2 enabled this will be much faster as those requests are done in parallel  

          Manjunatha added a comment -

          Manage and Assign Roles page is opening fine but add user or group is taking huge time in manage roles and assign roles , also selecting check box in assign roles is taking time 

          Manjunatha added a comment - Manage and Assign Roles page is opening fine but add user or group is taking huge time in manage roles and assign roles , also selecting check box in assign roles is taking time 

          Markus Winter added a comment -

          How many roles do you have defined and how many users/groups you already added? The things where you see slow down are pure javascript related and the only explanation I could see is if the number of roles is huge. 

          Markus Winter added a comment - How many roles do you have defined and how many users/groups you already added? The things where you see slow down are pure javascript related and the only explanation I could see is if the number of roles is huge. 

          Manjunatha added a comment -

          Hi Markus ,

          we have 90 roles and user groups added already 

           

           

          Manjunatha added a comment - Hi Markus , we have 90 roles and user groups added already     

          Markus Winter added a comment -

          I'm not able to reproduce the problem

           

          Jenkins setup:

          Jenkins 2.440.3

          rolestrategy plugin: 727.vd344b_eec783d

          Active Directory plugin: 3.25

          Security realm: Active directory

          With the following script I created 100 project roles and assigned 1 user to each role via the rest api

           

          for i in $(seq 1 100);
          do
            curl -X POST -i -u user:token http://localhost:8080/jenkins/role-strategy/strategy/addRole --data "type=projectRoles&roleName=role-$i&permissionIds=hudson.model.Item.Read&overwrite=true&pattern=test-$i"
            curl -X POST -i -u user:token http://localhost:8080/jenkins/role-strategy/strategy/assignUserRole --data "type=projectRoles&roleName=role-$i&user=user-$i"
          done

          I then visited the assign roles pages http://localhost:8080/jenkins/manage/role-strategy/assign-roles

          When moving with the mouse over the matrix with the item roles and users I can notice a minimal delay (<0.5s) for the row/column highlighting compared to when there are only a few roles and users. Enabling the filters for roles/users speeds up the rendering of the highlighting.

          Similarly adding a user seems to take a bit longer (~1s) than with only few roles/users but in no way this makes the UI unusable.

          During my tests the loading of the user details was running in the background, so this has no influence.

          I tested with both Chrome and Firefox latest versions

          Which browser in which version are you using?

           

           

           

           

          Markus Winter added a comment - I'm not able to reproduce the problem   Jenkins setup: Jenkins 2.440.3 rolestrategy plugin: 727.vd344b_eec783d Active Directory plugin: 3.25 Security realm: Active directory With the following script I created 100 project roles and assigned 1 user to each role via the rest api   for i in $(seq 1 100); do   curl -X POST -i -u user:token http: //localhost:8080/jenkins/role-strategy/strategy/addRole --data "type=projectRoles&roleName=role-$i&permissionIds=hudson.model.Item.Read&overwrite= true &pattern=test-$i"   curl -X POST -i -u user:token http: //localhost:8080/jenkins/role-strategy/strategy/assignUserRole --data "type=projectRoles&roleName=role-$i&user=user-$i" done I then visited the assign roles pages http://localhost:8080/jenkins/manage/role-strategy/assign-roles When moving with the mouse over the matrix with the item roles and users I can notice a minimal delay (<0.5s) for the row/column highlighting compared to when there are only a few roles and users. Enabling the filters for roles/users speeds up the rendering of the highlighting. Similarly adding a user seems to take a bit longer (~1s) than with only few roles/users but in no way this makes the UI unusable. During my tests the loading of the user details was running in the background, so this has no influence. I tested with both Chrome and Firefox latest versions Which browser in which version are you using?        

          Manjunatha added a comment - - edited

          please find below details

          Jenkins version : 2.440.2
          Plugin Version: 717.v6a_69a_fe98974

          SAML Plugin : 4.464.vea_cb_75d7f5e0 https://plugins.jenkins.io/saml/

          Security realm: Saml 2.0 (Okta)

          Browser : google chrome Version 125.0.6422.142 (Official Build) (64-bit)

          Manjunatha added a comment - - edited please find below details Jenkins version : 2.440.2 Plugin Version: 717.v6a_69a_fe98974 SAML Plugin : 4.464.vea_cb_75d7f5e0 https://plugins.jenkins.io/saml/ Security realm: Saml 2.0 (Okta) Browser : google chrome Version 125.0.6422.142 (Official Build) (64-bit)

          Markus Winter added a comment -

          I have no idea what could be causing the slowness. At the moment I would suspect that this is specific to your machine, maybe some browser plugin.

          Markus Winter added a comment - I have no idea what could be causing the slowness. At the moment I would suspect that this is specific to your machine, maybe some browser plugin.

            mawinter69 Markus Winter
            manjunatha_ns Manjunatha
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: