You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Luis Carlos Junges <lu...@gmail.com> on 2011/10/10 20:27:36 UTC

Imagens on Couchdb

Hi,

I have an application with around 100k documents of products. Each one as an
attachment with the photo of the product.

i already put a password to access the database, which is located at a
different machine from my server. BUt obviously it will block the img
request i made directly to my couchdb server. Now i would like to know if
there is a way to give permissions just for those images files on the
couchdb server? Otherwise, i think i will need to encode the images to
base64 and store them on the couchdb.

any suggestions?

-- 
"A realidade de cada lugar e de cada época é uma alucinação coletiva."


Bloom, Howard

Re: Imagens on Couchdb

Posted by Robert Newson <rn...@apache.org>.
Add a validate_doc_update function to any design document in that
database (or create a new one) and test for the _admin role before
allowing an update. Ensure that your single user is not an admin then
any attempted writes will be rejected. If you cannot create admins,
then use a custom role (e.g, 'writer') and ensure your read-only user
is not assigned that role.

Alternatively you could just have a single admin user (so that you are
not in 'admin party mode') and set require_valid_user to false.
Everyone can then read but only the admin can write. For hosted
solutions like IrisCouch or Cloudant, you may not be able to set ths
value, so the first solution is the safest.

B.

On 10 October 2011 22:04, Luis Carlos Junges <lu...@gmail.com> wrote:
> i just need a user with single read access to couchdb database and that does
> not have write permission to any document.
>
> from couch wiki:
>
> database readers - Defined per database. They can read all types of
> documents from the DB, and they can *write (and edit*) documents to the DB
> except for design documents.
>
>
>> Is your CouchDB service on a server with a routable address?
> using iriscouch.com for tests now.
>
>>What do you mean by "password"? On CouchDB?
> yes. A password on couchdb database as a reader.
>
>
>
> On Mon, Oct 10, 2011 at 3:36 PM, Aurélien Bénel <au...@utt.fr>wrote:
>
>> Hi Luis,
>>
>> > i already put a password to access the database, which is located at a
>> different machine from my server. BUt obviously it will block the img
>> request i made directly to my couchdb server.
>>
>> What do you mean by "password"? On CouchDB? On a reverse proxy?
>> Is it a password to prevent admin commands? edits? reads?
>>
>> Is your CouchDB service on a server with a routable address?
>>
>> We need more information to help you...
>>
>>
>> Regards,
>>
>> Aurélien
>
>
>
>
> --
> "A realidade de cada lugar e de cada época é uma alucinação coletiva."
>
>
> Bloom, Howard
>

Re: Imagens on Couchdb

Posted by Luis Carlos Junges <lu...@gmail.com>.
i just need a user with single read access to couchdb database and that does
not have write permission to any document.

from couch wiki:

database readers - Defined per database. They can read all types of
documents from the DB, and they can *write (and edit*) documents to the DB
except for design documents.


> Is your CouchDB service on a server with a routable address?
using iriscouch.com for tests now.

>What do you mean by "password"? On CouchDB?
yes. A password on couchdb database as a reader.



On Mon, Oct 10, 2011 at 3:36 PM, Aurélien Bénel <au...@utt.fr>wrote:

> Hi Luis,
>
> > i already put a password to access the database, which is located at a
> different machine from my server. BUt obviously it will block the img
> request i made directly to my couchdb server.
>
> What do you mean by "password"? On CouchDB? On a reverse proxy?
> Is it a password to prevent admin commands? edits? reads?
>
> Is your CouchDB service on a server with a routable address?
>
> We need more information to help you...
>
>
> Regards,
>
> Aurélien




-- 
"A realidade de cada lugar e de cada época é uma alucinação coletiva."


Bloom, Howard

Re: Imagens on Couchdb

Posted by Aurélien Bénel <au...@utt.fr>.
Hi Luis,

> i already put a password to access the database, which is located at a different machine from my server. BUt obviously it will block the img request i made directly to my couchdb server.

What do you mean by "password"? On CouchDB? On a reverse proxy?
Is it a password to prevent admin commands? edits? reads?

Is your CouchDB service on a server with a routable address?

We need more information to help you...


Regards,

Aurélien