title: Why does XRay Scan for jFrog Artifacts triggered from Jenkins returns a forbidden response?
body: <p>I tried triggering the Xray Scan from Jenkins through the jFrog server as specified in their documentation. </p>
  
  <p>The pipeline code used is as follows:</p>
  
  <pre><code>node {
          stage('XRAY Scan') { 
              def server = Artifactory.server('jFrogServer')    
              def buildInfo = Artifactory.newBuildInfo()
  
              buildInfo.env.capture = true
  
              def scanConfig = [
                  'buildName'      : buildInfo.name,
                  'buildNumber'    : buildInfo.number,
                  'failBuild'      : true
                  ]    
              def scanResult = server.xrayScan(scanConfig)
              echo scanResult as String
          }
  } 
  </code></pre>
  
  <p>When this pipeline is executed, I get the following response in the console:</p>
  
  <p><code>Xray scan connection lost: Artifactory response: Forbidden, attempting to reconnect...</code></p>