how do you set up a user/pass on a db within raven?

99 views
Skip to first unread message

sportock

unread,
Apr 10, 2012, 9:39:43 AM4/10/12
to rav...@googlegroups.com
I have looked around and have not seen this at all, just half explanations like how to set up the connection string. So how do you set this up? I want to take a client to this from sql, for his business this would be a good fit.

tia

steve

Itamar Syn-Hershko

unread,
Apr 10, 2012, 8:11:00 PM4/10/12
to rav...@googlegroups.com
User/pwd are your windows user if you're using the default auth which is probably what you have

Info on how to use the connection string -  http://ravendb.net/docs/client-api/connecting-to-a-ravendb-datastore 

sportock

unread,
Apr 10, 2012, 11:02:31 PM4/10/12
to rav...@googlegroups.com
Maybe i need to rephrase this, how exactly does this work?

I want different user/pass on my tenants here and one user/pass on the whole db, does that make it seem clearer.

Is this possible?

Thanks

S

Oren Eini (Ayende Rahien)

unread,
Apr 11, 2012, 2:09:45 AM4/11/12
to rav...@googlegroups.com
You need to use OAuth for this to work.
You basically do that by setting "Raven/AuthenticationMode" = "OAuth" in the config, and adding the Raven.Bundles.Authentication to the plugins folder.

That will create a default admin account, and you can get the password from authentication.config

Then you can create additional accounts, allowing access to a specific DB only.

Bryan Johns

unread,
Apr 12, 2012, 12:26:12 PM4/12/12
to rav...@googlegroups.com
Does that also work for embedded?

Chris Marisic

unread,
Apr 12, 2012, 12:31:19 PM4/12/12
to rav...@googlegroups.com
I'm pretty sure tenant dbs are only supported in ravendb servers not embedded.

Oren Eini (Ayende Rahien)

unread,
Apr 12, 2012, 12:39:08 PM4/12/12
to rav...@googlegroups.com
In embedded, there is no such notion of security, you are already in the same process.

Bryan Johns

unread,
Apr 13, 2012, 12:45:13 AM4/13/12
to rav...@googlegroups.com
I'm in the process of downsizing my site into something much simpler.
Right not it's on DotNetNuke and is waaaaay overkill for what I need.
I've been toying around with the idea of using RavenDB for the back end.
I seriously doubt my host will let me install the Raven server (or be
willing to do it for me) so my best bet is to use embedded. I was hoping
that if the OAuth would work in embedded I could leverage that as a quick
easy way to handle logging in. I'm really the only one who ever does log
in so I don't really need the complication of Microsoft's AspNet
membership stuff.

--
Bryan Johns
K4GDW

"There is no safety for honest men, but by believing all possible evil of
evil men, and by acting with promptitude, decision, and steadiness on that
belief." --Irish statesman and author Edmund Burke (1729-1797)

Oren Eini (Ayende Rahien)

unread,
Apr 13, 2012, 1:54:46 AM4/13/12
to rav...@googlegroups.com
You are confusing RavenDB OAuth with your system auth.

See:

Jeff

unread,
Apr 13, 2012, 3:54:33 PM4/13/12
to ravendb
I am new to Ravendb. this is my first question too, didn't seems to
find detailed documentation about that.

1)what's the best way to setup system user, do I need to setup one
system user per database? or just one system user for all databases?
Is there any different setting for service mode or IIS mode?

2)how to setup oauth? any concrete examples that shows how to do it?

3)how oauth related to setup authorization on different documents/
collection for each user/role? where are the user/roles should be
saved?

sorry for much of newbie questions.

Thanks!

On Apr 13, 12:54 am, "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
wrote:
> > > <sport...@gmail.com> wrote:
>
> > >                       Maybe i need to rephrase this, how exactly does
> > this
> > > work?
>
> > >                       I want different user/pass on my tenants here and
> > one
> > > user/pass on the whole db, does that make it seem clearer.
>
> > >                       Is this possible?
>
> > >                       Thanks
>
> > >                       S
>
> > >                       On Tuesday, April 10, 2012 8:11:00 PM UTC-4,
> > Itamar
> > > Syn-Hershko wrote:
>
> > >                               User/pwd are your windows user if you're
> > using
> > > the default auth which is probably what you have
>
> > >                               Info on how to use the connection string -
> > >http://ravendb.net/docs/client-api/connecting-to-a-ravendb-datastore
> > > <http://ravendb.net/docs/client-api/connecting-to-a-ravendb-datastore>
>
> > >                               On Tue, Apr 10, 2012 at 4:39 PM, sportock
> > > <sport...@gmail.com> wrote:
>
> > >                                       I have looked around and have not
> > seen
> > > this at all, just half explanations like how to set up the connection
> > > string. So how do you set this up? I want to take a client to this from
> > > sql, for his business this would be a good fit.
>
> > >                                       tia
>
> > >                                       steve
>
> > >                       On Tuesday, April 10, 2012 8:11:00 PM UTC-4,
> > Itamar
> > > Syn-Hershko wrote:
>
> > >                               User/pwd are your windows user if you're
> > using
> > > the default auth which is probably what you have
>
> > >                               Info on how to use the connection string -
> > >http://ravendb.net/docs/client-api/connecting-to-a-ravendb-datastore
> > > <http://ravendb.net/docs/client-api/connecting-to-a-ravendb-datastore>
>
> > >                               On Tue, Apr 10, 2012 at 4:39 PM, sportock
> > > <sport...@gmail.com> wrote:
>
> > >                                       I have looked around and have not
> > seen
> > > this at all, just half explanations like how to set up the connection
> > > string. So how do you set this up? I want to take a client to this from
> > > sql, for his business this would be a good fit.
>
> > >                                       tia
>
> > >                                       steve
>
> > >                       On Tuesday, April 10, 2012 8:11:00 PM UTC-4,
> > Itamar
> > > Syn-Hershko wrote:
>
> > >                               User/pwd are your windows user if you're
> > using
> > > the default auth which is probably what you have
>
> > >                               Info on how to use the connection string -
> > >http://ravendb.net/docs/client-api/connecting-to-a-ravendb-datastore
> > > <http://ravendb.net/docs/client-api/connecting-to-a-ravendb-datastore>
>
> > >                               On Tue, Apr 10, 2012 at 4:39 PM, sportock
> > > <sport...@gmail.com> wrote:
>
> > >                                       I have looked around and have not
> > seen
> > > this at all, just half explanations like how to set up the connection
> > > string. So how do you set this up? I want to take a client to this from
> > > sql, for his business this would be a good fit.
>
> > >                                       tia
>
> > >                                       steve
>
> > >                       On Tuesday, April 10, 2012 8:11:00 PM UTC-4,
> > Itamar
> > > Syn-Hershko wrote:
>
> > >                               User/pwd are your windows user if you're
> > using
> > > the default auth which is probably what you have
>
> > >                               Info on how to use the connection string -
> > >http://ravendb.net/docs/client-api/connecting-to-a-ravendb-datastore
> > > <http://ravendb.net/docs/client-api/connecting-to-a-ravendb-datastore>
>
> > >                               On Tue, Apr 10, 2012 at 4:39 PM, sportock

Oren Eini (Ayende Rahien)

unread,
Apr 14, 2012, 6:28:10 AM4/14/12
to rav...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages