Skip to content

[fix] basic authentication #3670

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

Merged
merged 1 commit into from
Dec 13, 2020
Merged

[fix] basic authentication #3670

merged 1 commit into from
Dec 13, 2020

Conversation

line-o
Copy link
Member

@line-o line-o commented Dec 12, 2020

A common authentication strategy is the bearer token authentication.

  • The client sends Authorization: Bearer [bearer-token] to the server
  • The server processes the Authorization header contents

At the moment, exist-db throws an error with that header.
The BasicAuthenticator class treats any Authorization header as a basic authentication attempt, regardless of the scheme (Basic, Bearer, ...).

This PR changes BasicAuthenticator to also check if the header value starts with Basic before attempting to authenticate using the Basic Authentication strategy.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@adamretter adamretter left a comment

Choose a reason for hiding this comment

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

LGTM

@adamretter adamretter added this to the eXist-5.2.1 milestone Dec 13, 2020
@adamretter adamretter added the bug issue confirmed as bug label Dec 13, 2020
@dizzzz dizzzz merged commit b0c1536 into eXist-db:develop Dec 13, 2020
@line-o line-o deleted the fix/basic-auth branch April 9, 2022 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue confirmed as bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants