Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1051515

Summary: KIE-CI cannot download artifacts from secured KIE-WB M2 repo
Product: [Retired] JBoss BRMS Platform 6 Reporter: Marek Winkler <mwinkler>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED CURRENTRELEASE QA Contact: Marek Winkler <mwinkler>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.0.0CC: etirelli, rrajasek, rzhang
Target Milestone: CR1   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:16:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
settings.xml none

Description Marek Winkler 2014-01-10 13:50:26 UTC
Created attachment 848207 [details]
settings.xml

Description of problem:

KIE-CI is unable to download artifacts from KIE-WB maven repo secured by authentication. KIE-CI is able to download artifacts from unsecured KIE-WB repo. It is possible to download KIE-WB artifacts, even from a secured repo, via Maven using the steps described in BZ 1037556.

This problem has been originally found by ddoyle.

Version-Release number of selected component (if applicable):

BRMS 6.0.0 ER7

Steps to Reproduce:

You can use the reproducer from Comment 8 at BZ 1039016 combined with the attached settings.xml.

Actual results:

The artifact is not downloaded.

Expected results:

The artifact is downloaded and KieModule accessible.

Comment 1 Marek Winkler 2014-01-10 13:57:43 UTC
I have investigated a bit more and found that KIE-CI uses org.sonatype.maven.wagon.AhcWagon implementation for downloading artifacts (if I am not mistaken). The method AhcWagon.openConnectionInternal() contains the following code

realmBuilder = (new Realm.RealmBuilder())
                .setPrincipal( username )
                .setPassword( password )
                .setUsePreemptiveAuth( false )
                .setEnconding( credentialEncoding );

which always disables preemptive authentication. However, porcelli suggested to turn it on in his comment to BZ 1037556, and I was unable to download the artifact by Maven until preemptive authentication was enabled.

Comment 2 Mario Fusco 2014-01-10 18:29:15 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/8f322ace2

Comment 3 Marek Winkler 2014-01-23 18:10:28 UTC
Verified on BRMS 6.0.0 CR1.