You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Luigi Bai <lp...@focalpoint.com> on 2004/07/08 23:06:49 UTC

XMLDBSource and credentials

I'd like to modify XMLDBSource to allow the URI to override the 
credential information. This would allow different users to access 
collections/resources as themselves in eXist (http://exist.sf.net).

Any objections? My first thought is to allow URIs of the form:

xmldb:exist://user:pass@host:port/coll/coll/resource.xml

-- 
<A HREF="http://www.focalpoint.com/">Home Page</A>
education is what's left after what is learned is forgotten.
                                -- b f skinner
Luigi P. Bai                   Focal Point Software, Inc.
lpb@focalpoint.com             3701 Kirby Drive, Suite 512
turning data into information  Houston, TX   77098
                                (713) 215-1600 x 33#




Re: XMLDBSource and credentials

Posted by lp...@focalpoint.com.
Patch is at http://issues.apache.org/bugzilla/show_bug.cgi?id=30928

Vadim Gritsenko wrote:

> Luigi Bai wrote:
> 
>>
>> Upayavira wrote:
>>
>>> Luigi Bai wrote:
>>>
>>>> I'd like to modify XMLDBSource to allow the URI to override the 
>>>> credential information. This would allow different users to access 
>>>> collections/resources as themselves in eXist (http://exist.sf.net).
>>>>
>>>> Any objections?
>>>
>>>
> 
> Nope. Go ahead.
> 
> Vadim
> 
> 
>>>> My first thought is to allow URIs of the form:
>>>>
>>>> xmldb:exist://user:pass@host:port/coll/coll/resource.xml
>>>>
>>> I take it there is no such definition of providing user/pass within 
>>> the XMLDB spec?
>>>
>>> Regards, Upayavira
>>>
>>
>> Authentication is handled by username and password parameters to 
>> methods on the org.xmldb.api.base.Database interface. The XMLDB spec 
>> is silent about handling userinfo in the URI itself. The 
>> org.cocoon...XMLDBSource gets around this by configuring 
>> authentication information into the <driver> element, and then passing 
>> that through to the relevant interface methods when necessary (see 
>> Bugzilla for a recent patch of that behaviour). However, that is 
>> static: only one username and password can be configured per protocol 
>> scheme (i.e.; xmldb:).
>>
>> What I'm proposing is effectively allowing just-in-time specification 
>> of username and password in <map:generate src="" /> elements.
> 
> 
> 


-- 
<A HREF="http://www.focalpoint.com/">Home Page</A>
education is what's left after what is learned is forgotten.
                                -- b f skinner
Luigi P. Bai                   Focal Point Software, Inc.
lpb@focalpoint.com             3701 Kirby Drive, Suite 512
turning data into information  Houston, TX   77098
                                (713) 215-1600 x 33#


Re: XMLDBSource and credentials

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Luigi Bai wrote:

>
> Upayavira wrote:
>
>> Luigi Bai wrote:
>>
>>> I'd like to modify XMLDBSource to allow the URI to override the 
>>> credential information. This would allow different users to access 
>>> collections/resources as themselves in eXist (http://exist.sf.net).
>>>
>>> Any objections?
>>

Nope. Go ahead.

Vadim


>>> My first thought is to allow URIs of the form:
>>>
>>> xmldb:exist://user:pass@host:port/coll/coll/resource.xml
>>>
>> I take it there is no such definition of providing user/pass within 
>> the XMLDB spec?
>>
>> Regards, Upayavira
>>
>
> Authentication is handled by username and password parameters to 
> methods on the org.xmldb.api.base.Database interface. The XMLDB spec 
> is silent about handling userinfo in the URI itself. The 
> org.cocoon...XMLDBSource gets around this by configuring 
> authentication information into the <driver> element, and then passing 
> that through to the relevant interface methods when necessary (see 
> Bugzilla for a recent patch of that behaviour). However, that is 
> static: only one username and password can be configured per protocol 
> scheme (i.e.; xmldb:).
>
> What I'm proposing is effectively allowing just-in-time specification 
> of username and password in <map:generate src="" /> elements.



Re: XMLDBSource and credentials

Posted by Luigi Bai <lp...@focalpoint.com>.

Upayavira wrote:

> Luigi Bai wrote:
> 
>> I'd like to modify XMLDBSource to allow the URI to override the 
>> credential information. This would allow different users to access 
>> collections/resources as themselves in eXist (http://exist.sf.net).
>>
>> Any objections? My first thought is to allow URIs of the form:
>>
>> xmldb:exist://user:pass@host:port/coll/coll/resource.xml
>>
> I take it there is no such definition of providing user/pass within the 
> XMLDB spec?
> 
> Regards, Upayavira
> 

Authentication is handled by username and password parameters to methods 
on the org.xmldb.api.base.Database interface. The XMLDB spec is silent 
about handling userinfo in the URI itself. The org.cocoon...XMLDBSource 
gets around this by configuring authentication information into the 
<driver> element, and then passing that through to the relevant 
interface methods when necessary (see Bugzilla for a recent patch of 
that behaviour). However, that is static: only one username and password 
can be configured per protocol scheme (i.e.; xmldb:).

What I'm proposing is effectively allowing just-in-time specification of 
username and password in <map:generate src="" /> elements.

-- 
<A HREF="http://www.focalpoint.com/">Home Page</A>
education is what's left after what is learned is forgotten.
                                -- b f skinner
Luigi P. Bai                   Focal Point Software, Inc.
lpb@focalpoint.com             3701 Kirby Drive, Suite 512
turning data into information  Houston, TX   77098
                                (713) 215-1600 x 33#



Re: XMLDBSource and credentials

Posted by Upayavira <uv...@upaya.co.uk>.
Luigi Bai wrote:

> I'd like to modify XMLDBSource to allow the URI to override the 
> credential information. This would allow different users to access 
> collections/resources as themselves in eXist (http://exist.sf.net).
>
> Any objections? My first thought is to allow URIs of the form:
>
> xmldb:exist://user:pass@host:port/coll/coll/resource.xml
>
I take it there is no such definition of providing user/pass within the 
XMLDB spec?

Regards, Upayavira