Return-Path: X-Original-To: apmail-archiva-users-archive@www.apache.org Delivered-To: apmail-archiva-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E7C821051C for ; Wed, 4 Jun 2014 19:45:44 +0000 (UTC) Received: (qmail 16915 invoked by uid 500); 4 Jun 2014 19:45:44 -0000 Delivered-To: apmail-archiva-users-archive@archiva.apache.org Received: (qmail 16858 invoked by uid 500); 4 Jun 2014 19:45:44 -0000 Mailing-List: contact users-help@archiva.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@archiva.apache.org Delivered-To: mailing list users@archiva.apache.org Received: (qmail 16848 invoked by uid 99); 4 Jun 2014 19:45:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jun 2014 19:45:44 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of stallard@oclc.org designates 132.174.29.209 as permitted sender) Received: from [132.174.29.209] (HELO mshieldserver1.oclc.org) (132.174.29.209) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 04 Jun 2014 19:45:38 +0000 Received: From na01-bn1-obe.outbound.protection.outlook.com ([207.46.163.143]) by mshieldserver1.oclc.org (WebShield SMTP v4.5 MR3) id 1401911104471; Wed, 4 Jun 2014 15:45:04 -0400 Received: from BLUPR06MB113.namprd06.prod.outlook.com (10.242.187.20) by BLUPR06MB513.namprd06.prod.outlook.com (10.141.204.16) with Microsoft SMTP Server (TLS) id 15.0.954.9; Wed, 4 Jun 2014 19:45:02 +0000 Received: from BLUPR06MB114.namprd06.prod.outlook.com (10.242.187.25) by BLUPR06MB113.namprd06.prod.outlook.com (10.242.187.20) with Microsoft SMTP Server (TLS) id 15.0.954.9; Wed, 4 Jun 2014 19:45:00 +0000 Received: from BLUPR06MB114.namprd06.prod.outlook.com ([169.254.1.216]) by BLUPR06MB114.namprd06.prod.outlook.com ([169.254.1.212]) with mapi id 15.00.0949.001; Wed, 4 Jun 2014 19:45:00 +0000 From: "Stallard,David" To: "users@archiva.apache.org" Subject: Re: 401 Unauthorized during upload to Archiva 2.0.1 Thread-Topic: 401 Unauthorized during upload to Archiva 2.0.1 Thread-Index: AQHPfzn2pSgkAvIZOUqe9spfHFqajpthGWSA Date: Wed, 4 Jun 2014 19:45:00 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.9.131030 x-originating-ip: [132.174.20.164] x-microsoft-antispam: BL:0;ACTION:Default;RISK:Low;SCL:0;SPMLVL:NotSpam;PCL:0;RULEID: x-forefront-prvs: 0232B30BBC x-forefront-antispam-report: SFV:NSPM;SFS:(428001)(377454003)(199002)(189002)(377424004)(164054003)(54356999)(83322001)(76176999)(92726001)(86362001)(81542001)(85852003)(76482001)(99286001)(77982001)(15202345003)(92566001)(80022001)(66066001)(21056001)(83506001)(4396001)(74662001)(74502001)(46102001)(64706001)(50986999)(81342001)(36756003)(101416001)(16236675002)(20776003)(19580405001)(85806002)(79102001)(2656002)(87936001)(15975445006)(31966008)(19580395003)(99396002);DIR:OUT;SFP:;SCL:1;SRVR:BLUPR06MB113;H:BLUPR06MB114.namprd06.prod.outlook.com;FPR:;MLV:sfv;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (: oclc.org does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=stallard@oclc.org; Content-Type: multipart/alternative; boundary="_000_CFB4EF0234D4Cstallardoclcorg_" MIME-Version: 1.0 X-Microsoft-Antispam: BL:0;ACTION:Default;RISK:Low;SCL:0;SPMLVL:NotSpam;PCL:0;RULEID: X-OriginatorOrg: oclc.org X-Virus-Checked: Checked by ClamAV on apache.org --_000_CFB4EF0234D4Cstallardoclcorg_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable We determined that the issue below was caused by the fact that the in = the settings.xml and the in the distributionManagement section of the = pom.xml were mismatched. Once we made sure they had the same name, our bui= ld was able to upload successfully. So this is resolved, please disregard= . Thanks, David From: , "Stallard,David" > Date: Tuesday, June 3, 2014 at 10:41 AM To: "users@archiva.apache.org" > Subject: 401 Unauthorized during upload to Archiva 2.0.1 When our test maven build tries to upload an artifact to our Archiva 2.0.1 = instance, we are getting a 401 as seen here: 09:51:56,991 ERROR - Failed to execute goal org.apache.maven.plugins:maven-= deploy-plugin:2.5:deploy (default-deploy) on project my-app: Failed to depl= oy artifacts: Could not transfer artifact org.oclc.middleware:my-app:pom:1.= 85-20140603.135156-1 from/to snapshots (http://host:port/repository/snapsho= ts): Failed to transfer file: http://host:port/repository/snapshots/org/ocl= c/middleware/my-app/1.85-SNAPSHOT/my-app-1.85-20140603.135156-1.pom. Return= code is: 401 -> [Help 1] If I look in archiva.log, I find the following corresponding message: 2014-06-03 09:51:56,915 [qtp96083163-25] INFO org.apache.archiva.security.= ArchivaServletAuthenticator [] - Authorization Denied [ip=3D[ip address],pe= rmission=3Darchiva-upload-repository,repo=3Dsnapshots] : no matching permis= sions But if I check the user which we have set up in our settings.xml file, it h= as the role "Repository Manager - snapshots" which does include the archiva= -upload-repository permission. Thinking that perhaps this user is not actually the one doing the upload, I= gave every available role to the 'guest' user and tried again, but got the= same result. It appears that Archiva 2.0.1 does not generate an audit log in the way tha= t 1.3.5 used to, so I'm not sure how to verify which user is actually attem= pting the upload. There is a new log file, request-[timestmap].log which s= eems to serve a similar purpose to the old audit log, but it doesn't show a= ny user information. Here is what I can find in the request log which corr= esponds to the upload attempt: [ip address] - - [03/Jun/2014:13:51:56 +0000] "PUT /repository/snapshots/= org/oclc/middleware/my-app/1.85-SNAPSHOT/my-app-1.85-20140603.135156-1.pom = HTTP/1.1" 401 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_37; Linux 2.6.18-308.el= 5)" Any idea why I am getting 401 on upload, or how I can get more information = on which user is actually doing the upload so I can see why its roles don't= include archiva-upload-repository permission? Thanks, David --_000_CFB4EF0234D4Cstallardoclcorg_--