Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 893 invoked from network); 19 Jul 2010 10:48:21 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Jul 2010 10:48:21 -0000 Received: (qmail 2322 invoked by uid 500); 19 Jul 2010 10:48:21 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 1851 invoked by uid 500); 19 Jul 2010 10:48:18 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 1843 invoked by uid 99); 19 Jul 2010 10:48:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jul 2010 10:48:17 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kees.vanveen@kewill.com designates 87.213.107.180 as permitted sender) Received: from [87.213.107.180] (HELO fiat.kewill.nl) (87.213.107.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jul 2010 10:48:10 +0000 Received: from scania.interchain.nl (scania.kewill.nl [172.19.0.43]) by fiat.kewill.nl (8.13.8/8.13.8) with ESMTP id o6JAlnni022718 for ; Mon, 19 Jul 2010 12:47:49 +0200 Received: from [172.19.0.112] ([172.19.0.112]) by scania.interchain.nl with Microsoft SMTPSVC(6.0.3790.4675); Mon, 19 Jul 2010 12:47:04 +0200 Message-ID: <4C442D55.1080609@kewill.com> Date: Mon, 19 Jul 2010 12:47:49 +0200 From: Kees van Veen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100527 Lightning/1.0b1 Thunderbird/3.0.5 MIME-Version: 1.0 To: user@geronimo.apache.org Subject: Re: Dynamic realms References: <4C404573.6030300@kewill.com> <93A1ACC3-61CB-4733-A223-9FB26986DD0A@yahoo.com> <4C43F0B3.2000904@kewill.com> <4C4415D6.7070105@kewill.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------020706090306060509050908" X-OriginalArrivalTime: 19 Jul 2010 10:47:05.0000 (UTC) FILETIME=[BA231A80:01CB272F] X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------020706090306060509050908 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Thanks Ivan for the reply. That's indeed exactly what I want to achieve: a deploy time security realm. I have a maven project, but then still I have to build ears for all contexts used. I was hoping to be able to overrule the in web.xml at deploy time. But ... after fiddling around I found 2 ways to get it to work: * if I edit the deployed geronimo-web.xml and web.xml (under the repository tree), and run deploy.sh restart app * using 'jar' on the ear extracting the war, extracting web.xml and geronimo-web.xml from the war, edit that and update the war, and then the ear, and deploy that one Regards, Kees Ivan wrote: > Not sure I understand your question correctly, if you mean that a > generic name like "security" is used in the geronimo-web.xml for the > realm name, and in the deployment time, you wish that the real > security realm will be changed with the current web context name, I am > afraid that it is impossible. might be other guys could have good ideas. > > If your project is built with maven, I think that you might use > placeholder in the xml file, maven plugin could help you to update > those values while assembling the web application. > > 2010/7/19 Kees van Veen > > > Ivan wrote: >> In the geronimo-web.xml file, there is a xml entry named >> security-realm-name, which is used to specify which realm will be >> used for the web application, it should be the gbean name of the >> realm. > It is, in my case, but that lists the 'generic' realm for my > application. But deploy time I would like that realm to be > specific to my deployed context. > >> Yes, there is also a xml entry named realm-name of the >> login-config, AFAIK, it will only used to show on the popping >> logon window of the browser. > Is that the realm-name of the web.xml you're referring to ? I've > set that to the 'generic' name as well. How can I get that to be > context specific ? > > > >> >> 2010/7/19 Kees van Veen > > >> >> I'm using basic authentication. >> >> Regards, >> Kees >> >> >> David Jencks wrote: >> >> Are you using basic, form, or some other kind of auth? >> >> david jencks >> >> On Jul 16, 2010, at 4:41 AM, Kees van Veen wrote: >> >> >> Hi, >> >> How can I get a security realm name per deployed >> context ? We deploy several versions/instances of our >> software on the same Geronimo server, and want the >> browser to remember username/password per url. >> >> When deploying a web app we create a security realm >> name (in the plan) containing the context to which we >> deploy, e.g. secure-context1, secure-context2. In the >> Geronimo console I can see all the realms created, so >> that seems to be fine. >> >> My web.xml (and geronimo-web.xml) contain 'secure' as >> (generic) realm name, and that is what the browser >> reports when I connect. >> >> Maybe a bigger question (for me) is: how does the >> security definition in the plan.xml link back to the >> (geronimo-)web.xml or how can I link my >> web.xml/geronimo-web.xml to the realms available ? >> >> Thanks in advance. >> >> Regards, >> Kees >> >> >> >> >> >> >> -- >> Ivan > > > > > -- > Ivan --------------020706090306060509050908 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Thanks Ivan for the reply.

That's indeed exactly what I want to achieve: a deploy time security realm.

I have a maven project, but then still I have to build ears for all contexts used.

I was hoping to be able to overrule the <realm-name> in web.xml at deploy time.

But ... after fiddling around I found 2 ways to get it to work:
  • if I edit the deployed geronimo-web.xml  and web.xml (under the repository tree), and run deploy.sh restart app
  • using 'jar' on the ear extracting the war, extracting web.xml and geronimo-web.xml from the war, edit that and update the war, and then the ear, and deploy that one
Regards,
Kees

Ivan wrote:
Not sure I understand your question correctly, if you mean that a generic name like "security" is used in the geronimo-web.xml for the realm name, and in the deployment time, you wish that the real security realm will be changed with the current web context name, I am afraid that it is impossible. might be other guys could have good ideas.

If your project is built with maven, I think that you might use placeholder in the xml file, maven plugin could help you to update those values while assembling the web application.

2010/7/19 Kees van Veen <kees.vanveen@kewill.com>
Ivan wrote:
In the geronimo-web.xml file, there is a xml entry named security-realm-name, which is used to specify which realm will be used for the web application, it should be the gbean name of the realm.
It is, in my case, but that lists the 'generic' realm for my application. But deploy time I would like that realm to be specific to my deployed context.

Yes, there is also a xml entry named realm-name of the login-config, AFAIK, it will only used to show on the popping logon window of the browser.
Is that the realm-name of the web.xml you're referring to ? I've set that to the 'generic' name as well. How can I get that to be context specific ?




2010/7/19 Kees van Veen <kees.vanveen@kewill.com>
I'm using basic authentication.

Regards,
Kees


David Jencks wrote:
Are you using basic, form, or some other kind of auth?

david jencks

On Jul 16, 2010, at 4:41 AM, Kees van Veen wrote:

 
Hi,

How can I get a security realm name per deployed context ? We deploy several versions/instances of our software on the same Geronimo server, and want the browser to remember username/password per url.

When deploying a web app we create a security realm name (in the plan) containing the context to which we deploy, e.g. secure-context1, secure-context2. In the Geronimo console I can see all the realms created, so that seems to be fine.

My web.xml (and geronimo-web.xml) contain 'secure' as (generic) realm name, and that is what the browser reports when I connect.

Maybe a bigger question (for me) is: how does the security definition in the plan.xml link back to the (geronimo-)web.xml or how can I link my web.xml/geronimo-web.xml to the realms available ?

Thanks in advance.

Regards,
Kees
   
 




--
Ivan




--
Ivan

--------------020706090306060509050908--