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

RejectedAccessException thrown but no pending script approval added

    Details

    • Similar Issues:
    • Released As:
      workflow-cps 2.67

      Description

      When using

      new GetMethod(url)

      from

      import org.apache.commons.httpclient.HttpClient
      import org.apache.commons.httpclient.methods.GetMethod

      directly in a Workflow script pasted into the UI, everything works as expected.

      When the script is loaded with the file loader plugin during the Workflow script, the following error occurs:

      org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use new org.apache.commons.httpclient.methods.GetMethod java.lang.String

      No pending script approval is generated.

        Attachments

          Issue Links

            Activity

            tobilarscheid Tobias Larscheid created issue -
            tobilarscheid Tobias Larscheid made changes -
            Field Original Value New Value
            Description When using

            {{new GetMethod(url)}}

            from

            {{import org.apache.commons.httpclient.HttpClient
            import org.apache.commons.httpclient.methods.GetMethod}}

            directly in a Workflow script pasted into the UI, everything works as expected.

            When the script is loaded with the file loader plugin during the Workflow script, the following error occurs:

            {{org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use new org.apache.commons.httpclient.methods.GetMethod java.lang.String}}

            No pending script approval is generated.
            When using

            {{new GetMethod(url)}}

            from

            {{import org.apache.commons.httpclient.HttpClient}}
            {{import org.apache.commons.httpclient.methods.GetMethod}}

            directly in a Workflow script pasted into the UI, everything works as expected.

            When the script is loaded with the file loader plugin during the Workflow script, the following error occurs:

            {{org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use new org.apache.commons.httpclient.methods.GetMethod java.lang.String}}

            No pending script approval is generated.
            jglick Jesse Glick made changes -
            Summary Workflow scripts not permitted to use apache http client get method RejectedAccessException thrown but no pending script approval added
            jglick Jesse Glick made changes -
            Epic Link JENKINS-35391 [ 171184 ]
            marcus_phi Marcus Philip made changes -
            Comment [ I have same problem using groovy.json.JsonSlurper().parse(url).
            How am I supposed to do that? ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 171177 ] JNJira + In-Review [ 184209 ]
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]
            jglick Jesse Glick made changes -
            Component/s workflow-cps-plugin [ 21713 ]
            Component/s pipeline [ 21692 ]
            jglick Jesse Glick made changes -
            Component/s script-security-plugin [ 18520 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-41571 [ JENKINS-41571 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-35199 [ JENKINS-35199 ]
            jglick Jesse Glick made changes -
            Link This issue relates to SECURITY-405 [ SECURITY-405 ]
            jglick Jesse Glick made changes -
            Component/s script-security-plugin [ 18520 ]
            Assignee Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Component/s script-security-plugin [ 18520 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-40333 [ JENKINS-40333 ]
            abayer Andrew Bayer made changes -
            Link This issue is duplicated by JENKINS-37378 [ JENKINS-37378 ]
            abayer Andrew Bayer made changes -
            Link This issue is duplicated by JENKINS-48765 [ JENKINS-48765 ]
            abayer Andrew Bayer made changes -
            Assignee Andrew Bayer [ abayer ]
            jamesdumay James Dumay made changes -
            Remote Link This issue links to "CloudBees Internal CD-445 (Web Link)" [ 20558 ]
            jglick Jesse Glick made changes -
            Assignee Andrew Bayer [ abayer ] Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-cps #280 (Web Link)" [ 22559 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-33614 [ JENKINS-33614 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "script-security #243 (Web Link)" [ 22560 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jglick Jesse Glick made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Released As workflow-cps 2.67
            brianeray Brian Ray made changes -
            Link This issue causes JENKINS-57171 [ JENKINS-57171 ]

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                tobilarscheid Tobias Larscheid
              • Votes:
                10 Vote for this issue
                Watchers:
                29 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: