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

Do not show stack traces on authorization errors

    Details

    • Similar Issues:

      Description

      Some stack traces displayed on permission issues

      • Lack of write permissions to access the S3 bucket in the same region
        Fails on unarchive
        hudson.remoting.ProxyException: org.jclouds.aws.AWSResponseException: request GET [https://xxxx.s3.amazonaws.com/?prefix=write-only/test-small-file/8/artifacts/] HTTP/1.1 failed with code 403, error: AWSError\{requestId='7788EC7DC0E96A05', requestToken='P6K/2IT0Jsqst4s71Pb/PD2NLeDSYHQUGsH7Cu5kIW95erWA8c0cUTHYqejt/iYalc6/IyfRJrQ=', code='AccessDenied', message='Access Denied', context='\{HostId=P6K/2IT0Jsqst4s71Pb/PD2NLeDSYHQUGsH7Cu5kIW95erWA8c0cUTHYqejt/iYalc6/IyfRJrQ=\}'\}
        at org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:75)
        Caused: hudson.remoting.ProxyException: org.jclouds.rest.AuthorizationException: Access Denied
        at org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.refineException(ParseAWSErrorFromXmlContent.java:122)
        at org.jclouds.s3.handlers.ParseS3ErrorFromXmlContent.refineException(ParseS3ErrorFromXmlContent.java:97)
        at org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:89)
        at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
        at org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:138)
        at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:107)
        at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:91)
        at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:74)
        at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:45)
        at org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156)
        at org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123)
        at com.sun.proxy.$Proxy128.listBucket(Unknown Source)
        at org.jclouds.s3.blobstore.S3BlobStore.list(S3BlobStore.java:177)
        at org.jclouds.blobstore.BlobStores$1$1.computeNext(BlobStores.java:86)
        at org.jclouds.blobstore.BlobStores$1$1.computeNext(BlobStores.java:73)
        at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
        at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:313)
        Caused: hudson.remoting.ProxyException: java.io.IOException: org.jclouds.rest.AuthorizationException: Access Denied
        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:321)
        at jenkins.util.VirtualFile.list(VirtualFile.java:195)
        at jenkins.util.VirtualFile.list(VirtualFile.java:178)
        at org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.run(ArtifactUnarchiverStepExecution.java:45)
        at org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.run(ArtifactUnarchiverStepExecution.java:20)
        at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)
        at hudson.security.ACL.impersonate(ACL.java:290)
        at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
        
      • Lack of Delete permissions to access the S3 bucket in the same region - (with delete stashes enabled)
        hudson.remoting.ProxyException: org.jclouds.aws.AWSResponseException: request GET [https://xxxx.s3.amazonaws.com/?prefix=no-deletion/test-stashing/27/artifacts/] HTTP/1.1 failed with code 403, error: AWSError\{requestId='CF3DAFB1969B4ADE', requestToken='YB4dJIUd1udFbaWVwnPA6XFkaWczMpGKoUM9xvkNWp3Pn69uT0UduN+MVJ6lY4TkGd0JBA/Ik8k=', code='AccessDenied', message='Access Denied', context='\{HostId=YB4dJIUd1udFbaWVwnPA6XFkaWczMpGKoUM9xvkNWp3Pn69uT0UduN+MVJ6lY4TkGd0JBA/Ik8k=\}'\}
        at org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:75)
        Caused: hudson.remoting.ProxyException: org.jclouds.rest.AuthorizationException: Access Denied
        at org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.refineException(ParseAWSErrorFromXmlContent.java:122)
        at org.jclouds.s3.handlers.ParseS3ErrorFromXmlContent.refineException(ParseS3ErrorFromXmlContent.java:97)
        at org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:89)
        at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
        at org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:138)
        at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:107)
        at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:91)
        at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:74)
        at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:45)
        at org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156)
        at org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123)
        at com.sun.proxy.$Proxy126.listBucket(Unknown Source)
        at org.jclouds.s3.blobstore.S3BlobStore.list(S3BlobStore.java:177)
        at org.jclouds.blobstore.BlobStores$1$1.computeNext(BlobStores.java:86)
        at org.jclouds.blobstore.BlobStores$1$1.computeNext(BlobStores.java:73)
        at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
        at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:313)
        Caused: hudson.remoting.ProxyException: java.io.IOException: org.jclouds.rest.AuthorizationException: Access Denied
        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:321)
        at jenkins.util.VirtualFile.list(VirtualFile.java:195)
        at jenkins.util.VirtualFile.list(VirtualFile.java:178)
        at org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.run(ArtifactUnarchiverStepExecution.java:45)
        at org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.run(ArtifactUnarchiverStepExecution.java:20)
        at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)
        at hudson.security.ACL.impersonate(ACL.java:290)
        at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
        Finished: FAILURE
        

        Attachments

          Activity

          Hide
          csanchez Carlos Sanchez added a comment -

          New error is

          ERROR: Authorization failed: Access Denied request GET https://xxxx.s3.amazonaws.com/?prefix=no-deletion/test-stashing/32/artifacts/ HTTP/1.1 failed with code 403, error: AWSError{requestId='2F2475B3E1494964', requestToken='xxx, code='AccessDenied', message='Access Denied', context='{HostId=xxx'}
          
          Show
          csanchez Carlos Sanchez added a comment - New error is ERROR: Authorization failed: Access Denied request GET https: //xxxx.s3.amazonaws.com/?prefix=no-deletion/test-stashing/32/artifacts/ HTTP/1.1 failed with code 403, error: AWSError{requestId= '2F2475B3E1494964' , requestToken= 'xxx, code=' AccessDenied ', message=' Access Denied ', context=' {HostId=xxx'}

            People

            • Assignee:
              csanchez Carlos Sanchez
              Reporter:
              csanchez Carlos Sanchez
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: