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

EnvInject-Permission not shown/maintainable (after restart) correctly

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • envinject-plugin
    • Jenkins 2.47 (on Windows Server 2008 R2 x64),
      envinject 1.93.1,
      role-strategy 2.3.2, matrix-auth 1.4

      Hi!

      Since we have enabled permissions-check for the Environment Injector Plugin (note: the additional option 'Do not show injected variables' is not set), the 'Env. Inject' permission (ViewVars) is not shown/maintainable (in Manage and assign roles) after a restart of our Jenkins-master.
      [see attached image 'Sample1.png']

      Additionally, If I would save/apply the configured permissions (in this state), all envinject-related permissions were lost (I.e., all "org.jenkinsci.plugins.envinject.EnvInjectPlugin.ViewVars" permission-entries in config.xml are removed)!

      As work-around, I have to uncheck and check (and apply afterwards) the 'Enable permissions' (for Environment Injector Plugin) in 'Configure System' to restore the expected 'normal' behavior (within time after a restart).

      Best regards from Salzburg,
      Markus

          [JENKINS-42460] EnvInject-Permission not shown/maintainable (after restart) correctly

          Oleg Nenashev added a comment -

          Will check it, but I didn't see it on my instance

          Oleg Nenashev added a comment - Will check it, but I didn't see it on my instance

          Alvin Huang added a comment -

          I am seeing this as well just spinning up bare Jenkins with Docker. 

           

          Reproduction steps: 

          • Spin up a docker jenkins instance the same as the docs
          docker run -p 8080:8080 -p 50000:50000 jenkins

          Alvin Huang added a comment - I am seeing this as well just spinning up bare Jenkins with Docker.    Reproduction steps:  Spin up a docker jenkins instance the same as the docs docker run -p 8080:8080 -p 50000:50000 jenkins Install the default plugins, login, and install the envinject plugin from the plugin manager (2.11) Go to Manage Jenkins > Configure Global Security  > under 'Authorization', select 'Matrix-based security' look at the table that shows up and see that there is no check box for ViewVars as specified at https://github.com/jenkinsci/envinject-plugin/blob/master/src/main/java/org/jenkinsci/plugins/envinject/EnvInjectPlugin.java#L56 Attached screenshot of HTML rendering as well (envinject_column0.jpeg)

          oleg_nenashev, which part did you not see on your instance?

          I'm having the same behaviour as described by ahuang on the latest version of Jenkins (v2.108).

          Fresh install from Docker with the jenkins/jenkins container, if you install EnvInject and set matrix based permissions you will see an extra box come up to allow/deny permissions for both Anonymous and Authenticated users.

          You can setup whatever config you prefer then whenever you do a safe/clean reboot, when Jenkins comes back up the EnvInject permissions box does not appear until you click Save in the "Configure Global Security" page and then reapply your settings again.

          Amir Zarrinkafsh added a comment - oleg_nenashev , which part did you not see on your instance? I'm having the same behaviour as described by ahuang on the latest version of Jenkins (v2.108). Fresh install from Docker with the jenkins/jenkins container, if you install EnvInject and set matrix based permissions you will see an extra box come up to allow/deny permissions for both Anonymous and Authenticated users. You can setup whatever config you prefer then whenever you do a safe/clean reboot, when Jenkins comes back up the EnvInject permissions box does not appear until you click Save in the "Configure Global Security" page and then reapply your settings again.

          Oleg Nenashev added a comment -

          You are responding to 1y old thread, so I would need to revover the context.

          Oleg Nenashev added a comment - You are responding to 1y old thread, so I would need to revover the context.

          Happy to provide any additional detail if required, however ahuang sums up the steps rather succinctly.

          Amir Zarrinkafsh added a comment - Happy to provide any additional detail if required, however ahuang sums up the steps rather succinctly.

          Oleg Nenashev added a comment -

          Unfortunately I will not have time to work on EnvInject issues for a while. I decided to unassign all issues so that somebody can take them and finalize.

          Context: The plugin has been waiting for adoption for ~2 years. During all this time I was trying to keep this plugin afloat by reviewing the incoming pull requests, fixing defects and keeping the codebase up to date to simplify the handover. But I have not been using this plugin on my own so that such maintenance was a bit lame. I invite all active users to contribute to the plugin by taking ownership of this plugin and of EnvInject API. I am happy to provide any required knowledge transfers and do some assistance during the first months of maintenance

          Oleg Nenashev added a comment - Unfortunately I will not have time to work on EnvInject issues for a while. I decided to unassign all issues so that somebody can take them and finalize. Context: The plugin has been waiting for adoption for ~2 years. During all this time I was trying to keep this plugin afloat by reviewing the incoming pull requests, fixing defects and keeping the codebase up to date to simplify the handover. But I have not been using this plugin on my own so that such maintenance was a bit lame. I invite all active users to contribute to the plugin by taking ownership of this plugin and of EnvInject API. I am happy to provide any required knowledge transfers and do some assistance during the first months of maintenance

            Unassigned Unassigned
            gmc_devel GMC Software Development B&R Corporate
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: