You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2024/02/13 08:03:00 UTC
[jira] [Commented] (MRESOLVER-495) Provide AuthenticationSelector based on host instead of repository id
[ https://issues.apache.org/jira/browse/MRESOLVER-495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17816888#comment-17816888 ]
Michael Osipov commented on MRESOLVER-495:
------------------------------------------
I believe that this is ill-designed here. There is a ticket to properly rework the Maven settings to decouple credentials from servers to be better reusable...I might be wrong.
> Provide AuthenticationSelector based on host instead of repository id
> ---------------------------------------------------------------------
>
> Key: MRESOLVER-495
> URL: https://issues.apache.org/jira/browse/MRESOLVER-495
> Project: Maven Resolver
> Issue Type: Improvement
> Components: Resolver
> Reporter: Konrad Windszus
> Priority: Major
>
> Currently the [{{DefaultAuthenticationSelector}}|https://github.com/apache/maven-resolver/blob/master/maven-resolver-util/src/main/java/org/eclipse/aether/util/repository/DefaultAuthenticationSelector.java#L56] only returns authentication info based on the repository id. In order to reuse the same authentication for multiple repositories (on the same or even on different servers) it should be possible to add authentication for a host (and potentially port/realm/scheme).
> Apache HttpClient uses the {{AuthScope}} class (https://hc.apache.org/httpcomponents-client-4.5.x/current/httpclient/apidocs/org/apache/http/auth/AuthScope.html) to bind credentials to requests.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)