Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Bitbucket server URL validation endpoint to support bitbucket 9+ #3369

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LividSquid
Copy link

@LividSquid LividSquid commented Oct 24, 2024

This PR contains changes that I believe will address the issues in these community posts: SonarQube with Bitbucket 9.0 and Sonarqube is missing the Authorization token for Bitbucket DC.

I changed the validateUrl function to use the /status endpoint. This endpoint returns a json object containing the current state of Bitbucket (e.g. {"state":"RUNNING"}), so I created the State class to read that into. Lastly, I updated the validate_url_success test to test against an expected response.

Since I started working on this, SONAR-23470 has been created to address the issue internally within SonarSource.

I built the application twice: once directly from the master branch with no changes, and once with my changes. I then configured the Bitbucket integration using the same token on both.

Master:
DevOps Platform Integrations

==> /Users/lividsquid/sq/sonarqube/sonar-application/build/distributions/sonarqube-10.8-SNAPSHOT/logs/web.log <==
2024.10.24 17:18:00 INFO  web[b75b4eae-a2c6-4250-af7f-f970b4c54add][o.s.a.c.b.BitbucketServerRestClient] Unable to contact Bitbucket server: 401 com.atlassian.plugins.rest.api.security.exception.AuthenticationRequiredException You are not permitted to access this resource

This branch:
DevOps Platform Integrations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant