Return-Path: Delivered-To: apmail-incubator-esme-dev-archive@minotaur.apache.org Received: (qmail 36372 invoked from network); 16 Jul 2010 12:45:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Jul 2010 12:45:48 -0000 Received: (qmail 94356 invoked by uid 500); 16 Jul 2010 12:45:48 -0000 Delivered-To: apmail-incubator-esme-dev-archive@incubator.apache.org Received: (qmail 94288 invoked by uid 500); 16 Jul 2010 12:45:46 -0000 Mailing-List: contact esme-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: esme-dev@incubator.apache.org Delivered-To: mailing list esme-dev@incubator.apache.org Received: (qmail 94280 invoked by uid 99); 16 Jul 2010 12:45:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jul 2010 12:45:45 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of esjewett@gmail.com designates 209.85.160.175 as permitted sender) Received: from [209.85.160.175] (HELO mail-gy0-f175.google.com) (209.85.160.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jul 2010 12:45:35 +0000 Received: by gya6 with SMTP id 6so1273367gya.6 for ; Fri, 16 Jul 2010 05:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=VkCUWbkaZTlkUmRUV3i5dVDijdGAwqWROhqsxymHGXA=; b=XIc7u2P1Nm2sWPL0+RU54oF0ZXo1FPeYvFyRBPKs3GeTkAlhIqPVEZS27oImFT5d1n XqIFgtZfVG7wc6l0u5gfkR5nF+RnzWEeVnKLFRIsrqspBbiFgoPXO71RXpL8riGtsYew rIyz1J1ObZIE3p6oVmWP8QDX4Y3drDfYOtm5I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=NPhFr3/hM9N/0ceCHWxvwDrEn5G4cZUW+FZ2GVGjXa3zcv9f9naxGNC0GKc/DYL+qA mCsfR7rhuTdSapfjjG5TbXi4WqD5iiYdtkhJzGwyEuEMwxUtFUft65XMSqABG0EJpe15 IcM3q4gqmZfgeSE9sJt+mHqIGN5snxsW/Ncbc= MIME-Version: 1.0 Received: by 10.150.58.20 with SMTP id g20mr1431255yba.84.1279284309437; Fri, 16 Jul 2010 05:45:09 -0700 (PDT) Received: by 10.42.2.80 with HTTP; Fri, 16 Jul 2010 05:45:09 -0700 (PDT) In-Reply-To: References: <157D40E877E54553B775B56DA6767C5D@imtiaz20100131> <35CFE4AC34CB4DCEAACB18B87095A4A9@imtiaz20100131> Date: Fri, 16 Jul 2010 14:45:09 +0200 Message-ID: Subject: Re: integration-admin role required for api2 calls ? From: Ethan Jewett To: "esme-dev@incubator.apache.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Specifically, look in the test.default.props file (src/main/resources/props/test.default.props). It has the line: role.api_test=3Dintegration-admin This assigns the "integration-admin" role to the "api_test" user. This .props file is only used when the tests are run, so by default there is no user with this role. This is as it should be, as this user is extremely powerful and should only be used by a system that wishes to integrate with ESME and have full control over user and token creation/deletion. Ethan On Fri, Jul 16, 2010 at 12:59 PM, Ethan Jewett wrote: > Yay! Not a problem at all - please do not hesitate to ask if you have > any questions. I've been pretty busy lately with other things, but > I'll usually answer within a day. > > Regarding the integration-admin role, this is not something you > normally need, but if you want to see an example of assigning the role > to a user, then take a look in the test configuration (.props ?) > files. > > Ethan > > On Friday, July 16, 2010, Imtiaz Ahmed H E wrote: >> Thanks ! >> >> Ethan, I have it going... Thanks for the hand-holding and patience...and= sorry for the trouble... >> >> With mvn jetty:run and token created with that I have... >> >> imtiaz@imtiaz-20100131 /cygdrive/d/temp >> $ curl --dump-header headers -d "token=3DRKATUYRPVMTG5MVRVKGSXDFS4CH5ZRO= O" http:/ >> /localhost:8080/api2/session >> >> 1imtiaz_jrNone<= /image> >> whole_name>I A =A0H E jr >> >> imtiaz@imtiaz-20100131 /cygdrive/d/temp >> $ cat headers >> HTTP/1.1 200 OK >> Expires: Thu, 15 Jul 2010 22:23:48 UTC >> Set-Cookie: JSESSIONID=3Dqvaftwfikare1k05t6aiie2wn;Path=3D/ >> Content-Length: 182 >> Date: Thu, 15 Jul 2010 22:23:48 UTC >> Pragma: no-cache >> Content-Type: text/xml; charset=3Dutf-8 >> Cache-Control: no-cache; private; no-store >> X-Lift-Version: 2.0-SNAPSHOT >> Server: Jetty(6.1.24) >> >> >> imtiaz@imtiaz-20100131 /cygdrive/d/temp >> $ ~ >> ----- Original Message ----- From: "Richard Hirsch" >> To: >> Sent: Thursday, July 15, 2010 11:05 PM >> Subject: Re: integration-admin role required for api2 calls ? >> >> >> 2010/7/15 Imtiaz Ahmed H E : >> >> Also, Ethan, I seem to recall Dick Hirsch telling me you need to be have= an >> integration-admin role to create tokens or whatever? How do I manage tha= t ? >> >> >> This is just if you use the api2 interface to create a new user + tokens= . >> >> >> >> ----- Original Message ----- From: "Imtiaz Ahmed H E" >> To: >> Sent: Thursday, July 15, 2010 7:55 PM >> Subject: Re: integration-admin role required for api2 calls ? >> >> >> >> Makes sense. >> >> For a quick try-out of this would you tell me >> 1. How to create a user/login...user is 'imtiaz2', lets say... >> and >> 2. Create a token through the api with mvn jetty:run of esme... >> >> I guess that's it for now and I'll try it out. Looks like that will solv= e >> this conundrum(!) of mine which seems to be born out of my ignorance ! := ( >> >> Imtiaz >> >> ----- Original Message ----- From: "Ethan Jewett" >> To: >> Sent: Thursday, July 15, 2010 7:44 PM >> Subject: Re: integration-admin role required for api2 calls ? >> >> >> Hi Imtiaz, >> >> It looks like it's not finding the token when you are running using >> Jetty. Since I believe ESME will use a different datastore when >> running under Tomcat than it uses when running under Jetty, I think >> you will need to create a user and a token under Jetty, then use that >> token. >> >> Does that sound right to you? I could be totally off-base here, but >> that would be the first thing to check. >> >> If the token really does exist under Jetty, then can you change your >> println statement to the following and we'll go from there: >> >> auth <- { println("****token =3D " + token) >> >> Thanks, >> Ethan >> >> 2010/7/15 Imtiaz Ahmed H E : >> >> >> Ethan, hopefully you will be able to point me the way here... >> >> I have included in this mail at the end, addSession() in API2.scala with >> some debug println's introduced. With this here's what I get---- >> >> >> ------------------------------------------------------------------------= ------------------- >> ------------------With mvn install and executing Esme in Tomcat curl >> output >> is --------------------- >> >> imtiaz@imtiaz-20100131 /cygdrive/d/temp >> $ curl --dump-header headers -d "token=3DHEZTQKM525SAMIPN4EDVRUOGHI40AKB= L" >> http:/ >> /localhost:8080/esme-server-apache-esme-1.0-RC1-incubating/api2/session >> >> >> 3imtiaz2None> ole_name>I A 2 H E >> >> imtiaz@imtiaz-20100131 /cygdrive/d/temp >> $ cat headers >> HTTP/1.1 200 OK >> Server: Apache-Coyote/1.1 >> Set-Cookie: JSESSIONID=3DC60F80AD16EFD5BE6E55231EE6C7651D; >> Path=3D/esme-server-apac >> e-esme-1.0-RC1-incubating >> Expires: Thu, 15 Jul 2010 13:44:35 UTC >> Date: Thu, 15 Jul 2010 13:44:35 GMT >> Pragma: no-cache >> Cache-Control: no-cache; private; no-store >> X-Lift-Version: 2.0-SNAPSHOT >> Content-Type: text/xml;charset=3Dutf-8 >> Content-Length: 178 >> >> >> imtiaz@imtiaz-20100131 /cygdrive/d/temp >> $ >> >> -------------------------and in the Tomcat log >> window....------------------------------ >> >> INFO: Server startup in 25875 ms >> ****auth =3D >> Full(org.apache.esme.model.AuthToken=3D{user=3D3,uniqueId=3DHEZTQKM525SA= MIP >> N4EDVRUOGHI40AKBL,createdDate=3DSun, 11 Jul 2010 11:47:30 >> UTC,id=3D2,description=3DMyS >> econdToken}) >> ****user =3D >> Full(org.apache.esme.model.User=3D{validated=3Dfalse,uniqueId=3D0ZYRGE1W= UDQ >> 5EZJTPZBAV5OIB5AHX0PK,nickname=3Dimtiaz2,firstName=3DI A 2,lastName=3DH >> E,imageUrl=3D,ti >> mezone=3DAsia/Calcutta,superUser=3Dfalse,locale=3Den_US,id=3D3}) >> INFO - Service request (POST) >> /esme-server-apache-esme-1.0-RC1-incubating/api2/s >> ession took 218 Milliseconds >> WARN - Going to buffer response body of large or unknown size. Using >> getResponse >> BodyAsStream instead is recommended. >> >> >> ------------------------------------------------------------------------= ------ >> ----------------- >