[jira] Commented: (COUCHDB-321) Futon breaks when used with a reverse proxy

2009-05-14 Thread Jack Moffitt (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709473#action_12709473
 ] 

Jack Moffitt commented on COUCHDB-321:
--

Mike, that looks great.  Perhaps you could attach a modified patch that moved 
the logic to $.ajaxsetup?

> Futon breaks when used with a reverse proxy
> ---
>
> Key: COUCHDB-321
> URL: https://issues.apache.org/jira/browse/COUCHDB-321
> Project: CouchDB
>  Issue Type: Bug
>  Components: Administration Console
>Affects Versions: 0.9
> Environment: Affects all platforms.
>Reporter: Jack Moffitt
>Priority: Minor
> Attachments: futon.patch
>
>
> It is often convenient to reverse proxy CouchDB at a url like /couch.  
> Unfortunately, while CouchDB will work perfectly in this situation, Futon 
> cannot handle it as jquery.couch.js uses absolute URLs to access all CouchDB 
> functions.
> I've attached a small patch that fixes this problem by:
> 1. Adding a urlPrefix attribute to $.couch which it uses to construct its 
> URLs.
> 2. Adding logic to the futon.js constructor that figures out a suitable 
> prefix and sets $.couch.urlPrefix to use this.
> Any client code that makes use of $.couch will need to do something similar.  
> Since only the application and the adminstrator will know what the prefix 
> should be or how to deduce it, I didn't really know of a better way to handle 
> this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (COUCHDB-291) Futon and tests should use relative URLs

2009-04-06 Thread Jack Moffitt (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696281#action_12696281
 ] 

Jack Moffitt commented on COUCHDB-291:
--

I'm not sure that this can be done as stated because Futon uses jquery.couch.js 
to do the functions and it uses absolute URLs.  It's not clear to me how you 
could deduce what the path prefix is automatically (except in the case of an 
application like Futon which has a recognizable URL).

I've attached a patch to fix the issue of Futon working with reverse proxies to 
https://issues.apache.org/jira/browse/COUCHDB-321

> Futon and tests should use relative URLs
> 
>
> Key: COUCHDB-291
> URL: https://issues.apache.org/jira/browse/COUCHDB-291
> Project: CouchDB
>  Issue Type: Bug
>  Components: Administration Console, Documentation, Test Suite
>Affects Versions: 0.8.1
>Reporter: Amos Hayes
>
> The use of relative URLs in Futon and the client side test suite would allow 
> for the whole package to live happily behind a reverse proxy, including while 
> nested under a deeper path than "/".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (COUCHDB-321) Futon breaks when used with a reverse proxy

2009-04-06 Thread Jack Moffitt (JIRA)
Futon breaks when used with a reverse proxy
---

 Key: COUCHDB-321
 URL: https://issues.apache.org/jira/browse/COUCHDB-321
 Project: CouchDB
  Issue Type: Bug
  Components: Administration Console
Affects Versions: 0.9
 Environment: Affects all platforms.
Reporter: Jack Moffitt
Priority: Minor
 Attachments: futon.patch

It is often convenient to reverse proxy CouchDB at a url like /couch.  
Unfortunately, while CouchDB will work perfectly in this situation, Futon 
cannot handle it as jquery.couch.js uses absolute URLs to access all CouchDB 
functions.

I've attached a small patch that fixes this problem by:

1. Adding a urlPrefix attribute to $.couch which it uses to construct its URLs.
2. Adding logic to the futon.js constructor that figures out a suitable prefix 
and sets $.couch.urlPrefix to use this.

Any client code that makes use of $.couch will need to do something similar.  
Since only the application and the adminstrator will know what the prefix 
should be or how to deduce it, I didn't really know of a better way to handle 
this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (COUCHDB-321) Futon breaks when used with a reverse proxy

2009-04-06 Thread Jack Moffitt (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jack Moffitt updated COUCHDB-321:
-

Attachment: futon.patch

Patch attached for jquery.couch.js and futon.js.

> Futon breaks when used with a reverse proxy
> ---
>
> Key: COUCHDB-321
> URL: https://issues.apache.org/jira/browse/COUCHDB-321
> Project: CouchDB
>  Issue Type: Bug
>  Components: Administration Console
>Affects Versions: 0.9
> Environment: Affects all platforms.
>Reporter: Jack Moffitt
>Priority: Minor
> Attachments: futon.patch
>
>
> It is often convenient to reverse proxy CouchDB at a url like /couch.  
> Unfortunately, while CouchDB will work perfectly in this situation, Futon 
> cannot handle it as jquery.couch.js uses absolute URLs to access all CouchDB 
> functions.
> I've attached a small patch that fixes this problem by:
> 1. Adding a urlPrefix attribute to $.couch which it uses to construct its 
> URLs.
> 2. Adding logic to the futon.js constructor that figures out a suitable 
> prefix and sets $.couch.urlPrefix to use this.
> Any client code that makes use of $.couch will need to do something similar.  
> Since only the application and the adminstrator will know what the prefix 
> should be or how to deduce it, I didn't really know of a better way to handle 
> this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (COUCHDB-263) require valid user for all database operations

2009-02-20 Thread Jack Moffitt (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jack Moffitt updated COUCHDB-263:
-

Attachment: couchauth.diff

Patch to add require_valid_user to httpd config section.

> require valid user for all database operations
> --
>
> Key: COUCHDB-263
> URL: https://issues.apache.org/jira/browse/COUCHDB-263
> Project: CouchDB
>  Issue Type: Improvement
>  Components: HTTP Interface
>Affects Versions: 0.9
> Environment: All platforms.
>Reporter: Jack Moffitt
>Priority: Minor
> Attachments: couchauth.diff
>
>
> Admin accounts currently restrict a few operations, but leave all other 
> operations completely open.  Many use cases will require all operations to be 
> authenticated.   This can certainly be done by overriding the 
> default_authentication_handler, but I think this very common use case can be 
> handled in default_authentication_handler without increasing the complexity 
> much.
> Attached is a patch which adds a new config option, "require_valid_user", 
> which restricts all operations to authenticated users only.  Since CouchDB 
> currently only has admins, this means that all operations are restricted to 
> admins.  In a future CouchDB where there are also normal users, the intention 
> is that this would let them pass through as well.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (COUCHDB-263) require valid user for all database operations

2009-02-20 Thread Jack Moffitt (JIRA)
require valid user for all database operations
--

 Key: COUCHDB-263
 URL: https://issues.apache.org/jira/browse/COUCHDB-263
 Project: CouchDB
  Issue Type: Improvement
  Components: HTTP Interface
Affects Versions: 0.9
 Environment: All platforms.
Reporter: Jack Moffitt
Priority: Minor
 Attachments: couchauth.diff

Admin accounts currently restrict a few operations, but leave all other 
operations completely open.  Many use cases will require all operations to be 
authenticated.   This can certainly be done by overriding the 
default_authentication_handler, but I think this very common use case can be 
handled in default_authentication_handler without increasing the complexity 
much.

Attached is a patch which adds a new config option, "require_valid_user", which 
restricts all operations to authenticated users only.  Since CouchDB currently 
only has admins, this means that all operations are restricted to admins.  In a 
future CouchDB where there are also normal users, the intention is that this 
would let them pass through as well.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.