Skip to content

Conversation

@aikebah
Copy link
Collaborator

@aikebah aikebah commented Dec 15, 2024

Make the HTTP-Client use pre-emptive authentication for configured server credentials and extend HTTPClient usage to Nexus search

Fixes #7108
Fixes #7253

Description of Change

Use pre-emptive authentication for the servers for which credentials are configured.

And add usage of the Apache HTTPClient for the web requests from Nexus search.

Related issues

Fixes #7108

Fixes #7253

Have test cases been added to cover the new functionality?

no;
Nexus search locally manually tested against private instances of Nexus v2 and Nexus v3 including access via a local squid proxy container.

…ed server credentials and extend HTTPClient usage to Nexus search

Fixes #7108
Fixes #7253
@boring-cyborg boring-cyborg bot added core changes to core documentation site documentation maven changes to the maven plugin utils changes to utils labels Dec 15, 2024
@aikebah aikebah marked this pull request as ready for review December 22, 2024 11:34
jeremylong
jeremylong previously approved these changes Dec 23, 2024
Copy link
Collaborator

@jeremylong jeremylong left a comment

Choose a reason for hiding this comment

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

LGTM

@aikebah aikebah marked this pull request as draft December 29, 2024 16:11
@aikebah
Copy link
Collaborator Author

aikebah commented Dec 29, 2024

Marked draft pending inclusion of improvements from #7268 (adding configurability for hosted suppressions and support for Bearer Authentication + exposure of credential configuration for hostedSuppressions)

@aikebah
Copy link
Collaborator Author

aikebah commented Dec 30, 2024

Might be better to do the remainder in a separate PR, marking this one as ready for review/merge. PR for extending auth to various integrations and enabling bearer auth to follow in a separate PR.

final String artifactId = xpath.evaluate(
"/org.sonatype.nexus.rest.model.NexusArtifact/artifactId",
try {
// JSON would be more elegant, but there's not currently a dependency
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, it was very tempting to change its behavior while sifting through the code, but thought it would be better to first cleanly fix authentication and leave the TODO-ish comment in as is for another time.

Copy link
Collaborator

@jeremylong jeremylong left a comment

Choose a reason for hiding this comment

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

LGTM

@jeremylong
Copy link
Collaborator

@aikebah see my one comment - but you don't have to change anything. I'm fine if you just want to merge the PR.

@aikebah aikebah merged commit f2093dd into main Dec 31, 2024
9 checks passed
@jeremylong jeremylong deleted the fix/httpclient5 branch December 31, 2024 11:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

core changes to core documentation site documentation maven changes to the maven plugin utils changes to utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend HTTPClient usage for downloads to NexusSearch Authentication failure after upgrade to 11.0.0 with Maven

3 participants