Unable to establish an Application Link in Bamboo with additional XSRF checks failed error

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

    

Summary

When attempting to link an application using the Application Links feature in Bamboo, an error is consistently encountered. The logs found in the <bamboo-home>/logs/atlassian-bamboo.log file reveal instances of the XSRF (Cross-Site Request Forgery) check failure. 

2023-06-28 11:51:55,512 WARN [http-nio-8085-exec-11] [XsrfResourceFilter] Additional XSRF checks failed for request: http://BAMBOO_URL/bamboo/rest/analytics/1.0/publish/bulk , origin: https://BAMBOO_URL, referrer: https://BAMBOO_URL/bamboo/plugins/servlet/applinks/listApplicationLinks , credentials in request: true , allowed via CORS: false 

Other symptoms:

Environment

The issue is seen on Bamboo 9.2.1 but is applicable to any supported version.

Diagnosis

The problem is seen while trying to establish an Application Link via ⚙️ > Overview > Application Links page, there is an error in the UI where you can't establish the link and you see something like this in <bamboo-home>atlassian-bamboo.log file

2023-06-28 11:51:55,512 WARN [http-nio-8085-exec-11] [XsrfResourceFilter] Additional XSRF checks failed for request: http://BAMBOO_URL/bamboo/rest/analytics/1.0/publish/bulk , origin: https://BAMBOO_URL, referrer: https://BAMBOO_URL/bamboo/plugins/servlet/applinks/listApplicationLinks , credentials in request: true , allowed via CORS: false 

Cause

The most common cause for this is a misconfigured server.xml file inside the Bamboo installation folder, with missing proxy properties. You can find more information about the XSRF checks in the following documentation:

Solution

Check the <bamboo-installation>/conf/server.xml and verify if the connector is properly configured, like in the example below. Usually, one of (or all) the following properties are missing: secure, scheme, proxyName, and proxyPort.

<Connector
        port="8085"
        protocol="HTTP/1.1"
 
        maxThreads="150" minSpareThreads="25"
        connectionTimeout="20000"
        disableUploadTimeout="true"
        acceptCount="100"
 
        enableLookups="false"
        maxHttpHeaderSize="8192"
 
        useBodyEncodingForURI="true"
        URIEncoding="UTF-8"
 
        redirectPort="443"
        compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript"
 
 
        secure="true"
        scheme="https"
        proxyName="proxy-bamboo.com"
        proxyPort="443">
    <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
</Connector>



Last modified on Jul 24, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.