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

Unable to automate configuration of permissions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: envinject-plugin
    • Environment:
      Debian GNU/Linux 9
      Jenkins 2.190.2
      Env Inject Plugin 2.3.0
      Configuration as Code Plugin 1.32
      Role-based Authorization Strategy Plugin 2.15
    • Similar Issues:

      Description

      I'm trying to automate the configuration of the `Enable permissions` EnvInject plugin setting.

       

      I've tried using the Groovy code below: 

       

      import org.jenkinsci.plugins.envinject.EnvInjectPluginConfiguration
      EnvInjectPluginConfiguration config = GlobalConfiguration.all().get(EnvInjectPluginConfiguration.class) 
      config.setEnablePermissions(true) 
      config.save()
      

       

      And the following configuration as code configuration:

       

      security: 
         envinject: 
            hideInjectedVars: false
            enablePermissions: true 
            # Bad idea, see the security advisories 
            enableLoadingFromMaster: false
      

      Both of which tick the `Enable permissions` checkbox on the `Configure Global Security` page.

       

      However when I then go to manage roles I see the column title `Env. Inject` but no check boxes.

        

       

      I've also tried using the configuration as code plugin to enable this permission but that doesn't seem to fix the issue either.

       

      This has left me having to disable anyone from seeing environment variables to stop sensitive environment variables from being visible to anyone. Ideally I'd allow certain groups to see these to aid debugging.

       

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            adamdougal Adam Dougal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: