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

Add support for Basic authentication on SonarScanner mirrors #57

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

victor-diez-sonarsource
Copy link

@victor-diez-sonarsource victor-diez-sonarsource commented Aug 30, 2023

Cherry-picked from #44

@sonarcloud
Copy link

sonarcloud bot commented Aug 30, 2023

Kudos, SonarCloud Quality Gate passed!    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
No Duplication information No Duplication information

@interone-ms
Copy link

@victor-diez-sonarsource regarding your documentation change, the password protection in this PR is for the mirror itself (i.e. the Nexus instance), not the proxy - proxy auth is separate, as part of the proxy URL.

@victor-diez-sonarsource
Copy link
Author

victor-diez-sonarsource commented Aug 30, 2023

Thanks @interone-ms. Yes, I understand that. But you mentioned:

Mirror authentication is supported as well, see below.

but there was nothing after that. So I understood you were referring to the authentication for proxies, which was already documented in the first PR.

can you please clarify?

config.httpOptions.httpsRequestOptions = { agent: proxyAgent };
}

if (finalUrl.username !== '' || finalUrl.password !== '') {

Choose a reason for hiding this comment

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

What would happen if one of them is missing? Should the two of them be required?

Choose a reason for hiding this comment

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

should be fine. http basic auth allows for empty usernames or passwords

Choose a reason for hiding this comment

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

👍

Copy link

Choose a reason for hiding this comment

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

LGTM

@victor-diez-sonarsource
Copy link
Author

@interone-ms Please let me know if it's all clear or you meant to say something else in the README. Would like to merge this before next release.

@interone-ms
Copy link

@victor-diez-sonarsource you're right, good catch. Looks like I reordered stuff during writing and didn't update the wording.

@victor-diez-sonarsource victor-diez-sonarsource merged commit ac5d193 into master Aug 30, 2023
6 checks passed
@victor-diez-sonarsource victor-diez-sonarsource deleted the basic-auth branch August 30, 2023 13:55
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.

None yet

4 participants