-
Notifications
You must be signed in to change notification settings - Fork 191
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
Authentication fails when trying to resolve a target platform over an authenticated mirror that is a composite repository #3521
Conversation
bb05a8d
to
4e4df3d
Compare
3eebbca
to
df0fd65
Compare
The problem lied in the fact that RemoteMetadataRepositoryManager was passing the original location to the MavenAuthenticator, instead of the effective one: Line 66 in 9920425
On the other hand, RemoteArtifactRepositoryManager was already passing the effective URI instead of the original one, so no change was needed there: Line 139 in 9920425
|
@@ -63,7 +63,7 @@ public IMetadataRepository loadRepository(URI location, IProgressMonitor monitor | |||
public IMetadataRepository loadRepository(URI location, int flags, IProgressMonitor monitor) | |||
throws ProvisionException, OperationCanceledException { | |||
URI effectiveLocation = translateAndPrepareLoad(location); | |||
authenticator.enterLoad(location); | |||
authenticator.enterLoad(effectiveLocation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
RemoteMetadataRepositoryManager now passes the effective URI to the MavenAuthenticator instead of the original one. This fixes eclipse-tycho#3501. This commit also includes the test that was used to reproduce the bug: - testTargetDefinitionAuthMirror: tries to resolve a target definition from a composite p2 repository accessed over an authenticated composite mirror. Also, several other tests have been created just for completion: - testAuthMirror: tries to access a composite p2 repository over an authenticated composite mirror. - testMirror: tries to access a composite p2 repository over a composite mirror with no authentication. - testRepositoryEncrypted: tries to access an authenticated composite p2 repository whose password is encrypted. - testTargetDefinition: tries to resolve a target platform from a composite p2 repository. - testTargetDefinitionEncrypted: tries to resolve a target definition from an authenticated composite p2 repository whose password is encrypted. - testTargetDefinitionMirror: tries to resolve a target definition from a composite p2 repository accessed over a composite mirror with no authentication.
df0fd65
to
2c51b36
Compare
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
Test created for reproducing the bug as described in #3501:
On the other hand, the following tests pass and have been created just for completion: