-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
9.0.0, 9.4.1
-
None
-
2
-
Severity 3 - Minor
-
Issue Summary
When attempting to save an incoming application link in Bitbucket version 9.X, an error message, "We couldn't save your link," appears. However, this message does not clearly indicate the specific reason for the failure or corrective actions.
This is reproducible on Data Center: yes
Steps to Reproduce
- Install Bitbucket 9.4.1.
- Navigate to the application links section and configure an incoming application link.
- Enter the Name and Redirect URL, then click the Save button.
Expected Results
The error message should clearly state the issue, such as "Please ensure that your server is using HTTPS and that your application base URL is configured appropriately," rather than the generic message "We couldn't save your link."
Actual Results
An error message "We couldn't save your link" appears.
Workaround
In Bitbucket 9.x, application links using OAuth 2 require the Bitbucket base URL to be set to HTTPS and in case of HTTP scheme, app link throws that error. The standard solution is to configure the Bitbucket Base URL to use HTTPS. Alternatively, you can bypass this restriction by adding the -Datlassian.oauth2.provider.skip.base.url.https.requirement property. Please consider the following options:
- Add the property atlassian.oauth2.provider.skip.base.url.https.requirement as described in the OAuth 2.0 provider system properties documentation to the JVM_SUPPORT_RECOMMENDED_ARGS of the <Bitbucket-Installation-Directory>/_start-webapp.sh file and restart the Bitbucket application. An example is mentioned below. If you are already using other JVM arguments in the JVM_SUPPORT_RECOMMENDED_ARGS variable, include atlassian.oauth2.provider.skip.base.url.https.requirement at the end along with the existing arguments.
JVM_SUPPORT_RECOMMENDED_ARGS="-Datlassian.oauth2.provider.skip.base.url.https.requirement=true"
- Change the Bitbucket Base URL to use HTTPS. You can refer to Secure Bitbucket with Tomcat using SSL to set up SSL at the Tomcat level or Proxy and secure Bitbucket to set up SSL at the Proxy/Load Balancer level.