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

Replace Bearer authentication with HTTP Basic for SQ 9.9 support #55

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

fourls
Copy link
Collaborator

@fourls fourls commented Jun 28, 2024

When a token is provided, DelphiLint currently uses the Bearer authentication scheme to authenticate with the SonarQube server. This is apparently not supported by SonarQube 9.9, see 9.9 docs:

The token is sent via the login field of HTTP basic authentication, without any password.

This PR alters the server to use HTTP Basic auth instead. This is possible as the latest version still supports the HTTP Basic scheme, see 10.6 docs:

when invoking web services, pass the token using the bearer or basic HTTP authentication scheme

@fourls fourls requested a review from Cirras June 28, 2024 03:08
Copy link
Collaborator

@Cirras Cirras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was initially a bit hesitant about switching to basic authentication when the documentation for newer SonarQube versions clearly leans towards bearer authentication, but the official SonarLint implementations also use basic authentication in their HTTP client so that's good enough for me.

@fourls fourls merged commit ef833a7 into master Jun 28, 2024
4 checks passed
@fourls fourls deleted the auth-token branch June 28, 2024 03:26
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.

2 participants