You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Kees van Veen <ke...@kewill.com> on 2010/07/16 13:41:39 UTC
Dynamic realms
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
Re: Dynamic realms
Posted by Kees van Veen <ke...@kewill.com>.
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
> <ma...@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
>> <ma...@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
Re: Dynamic realms
Posted by Ivan <xh...@gmail.com>.
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 <ke...@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 <ke...@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
Re: Dynamic realms
Posted by Kees van Veen <ke...@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
> <ma...@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
Re: Dynamic realms
Posted by Ivan <xh...@gmail.com>.
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.
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.
2010/7/19 Kees van Veen <ke...@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
Re: Dynamic realms
Posted by Kees van Veen <ke...@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
>>
>
Re: Dynamic realms
Posted by David Jencks <da...@yahoo.com>.
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