Return-Path: X-Original-To: apmail-cxf-users-archive@www.apache.org Delivered-To: apmail-cxf-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 88FEFD528 for ; Mon, 8 Oct 2012 10:54:54 +0000 (UTC) Received: (qmail 8390 invoked by uid 500); 8 Oct 2012 10:54:53 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 7997 invoked by uid 500); 8 Oct 2012 10:54:49 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 7950 invoked by uid 99); 8 Oct 2012 10:54:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2012 10:54:47 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of glen.mazza@gmail.com designates 209.85.216.48 as permitted sender) Received: from [209.85.216.48] (HELO mail-qa0-f48.google.com) (209.85.216.48) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2012 10:54:41 +0000 Received: by mail-qa0-f48.google.com with SMTP id c11so2303535qad.0 for ; Mon, 08 Oct 2012 03:54:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=XtDIO6hiLGRRLJzuLn/y0l8XYG0wum0lFgMJBFFqcOU=; b=0CJsvo4fuIugn9leVYjruauUOOqw1/Sx0H/CHolYp4e7ueoRmb7WMNQyhmjsAAPDfF 70ffIA7PFIh8wR0cEVTeaQvPuzRVJXC0zgFTlM9c6WSU9kVA1pQ1HYzsujpMBna4boxd 3Yn/DJaxGxUIaatA5k24rAAaJItuq1fBUwN7i6NMSEkx8u26b82+CsYetitgEXr5vdNu G2GNLG2lTdLbh/f39/QUSB3wu5BSJOvp6mYdahF5VAMz2YvRRUGftQhM2VsCDM34Ioj0 867jv2D3YEVumDTvIuoQ/vevVFw0EAGSleQJrxnB341I92nZ+/yKq7hQJxFol0KDEBKo U93A== Received: by 10.49.104.194 with SMTP id gg2mr40589640qeb.6.1349693660486; Mon, 08 Oct 2012 03:54:20 -0700 (PDT) Received: from [192.168.1.45] (pool-74-96-49-193.washdc.east.verizon.net. [74.96.49.193]) by mx.google.com with ESMTPS id gx8sm17744154qab.12.2012.10.08.03.54.19 (version=SSLv3 cipher=OTHER); Mon, 08 Oct 2012 03:54:20 -0700 (PDT) Message-ID: <5072B0DB.3020208@talend.com> Date: Mon, 08 Oct 2012 06:54:19 -0400 From: Glen Mazza User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: users@cxf.apache.org Subject: Re: Basic authentication works only for the first deployed application References: <1349683463553-5715963.post@n5.nabble.com> In-Reply-To: <1349683463553-5715963.post@n5.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I may be wrong here, but I think basic auth is for the server itself, not the individual web service endpoints, so whenever you validate the first time (whether to your first or second endpoint), the subsequent call to the other web service endpoint should work fine. Glen On 10/08/2012 04:04 AM, gasius wrote: > Hi, > > I use CXF (2.4.6) over Jetty (7.4.5.v20110725) on ServiceMix 4.4.2. I need > to expose some web services secured with basic authentication. So I created > such bus configuration (only engine-factory part posted): > > / > > > class="org.eclipse.jetty.security.ConstraintSecurityHandler"> > ref="securityLoginService" /> > > > > > > > > > > class="org.eclipse.jetty.security.HashLoginService"> > > > > > class="org.eclipse.jetty.http.security.Constraint"> > > > > > > class="org.eclipse.jetty.security.ConstraintMapping"> > > > / > > And register it in OSGi service registry using name cxf-bus. Later in my > Camel routes I set bus on endpoints like this: > > in first bundle: > /cxf:bean:myFirstEndpoint?bus=#cxf-bus/ > > in second bundle: > /cxf:bean:mySecondEndpoint?bus=#cxf-bus/ > > When I deploy first bundle and try to access endpoint basic authentication > credentials are requested. But when I deploy second bundle I can access > mySecondEndpoint without any authentication. If I uninstall both bundles and > switch order of deployment then basic authentication works for the second > bundle but do not for the first. What am I doing wrong? Is there some way to > refresh security handler after I do subsequent deployments? > > > > -- > View this message in context: http://cxf.547215.n5.nabble.com/Basic-authentication-works-only-for-the-first-deployed-application-tp5715963.html > Sent from the cxf-user mailing list archive at Nabble.com.