New auth options

118 views
Skip to first unread message

Oren Eini (Ayende Rahien)

unread,
Sep 27, 2012, 12:02:16 PM9/27/12
to ravendb
Hi guys,
Starting on the next build, we would have new authentication options for RavenDB.
In particular, we removed the distinction between OAuth and Windows mode and we now have what is effectively mixed mode.

You can define login credentials that would be managed inside RavenDB (no need to worry about windows users).
You can use the new support via Api Keys, like this:


<add name="RavenDB" connectionString="Url="http://raven;Database=Northwind;ApiKey=Northwinder/MjEzLTl5YXNrZmhkc2FsZmRzYWZkYQ=="/>

Next week we will also have studio support for that.
In the meantime, you would need to create a document named "Raven/ApiKeys/API_KEY_NAME"
The format is:
public class ApiKeyDefinition
{
public string Id { get; set; }
public string Name { get; set; }
public string Secret { get; set; }
public bool Enabled { get; set; }

public DatabaseAccess[] Databases { get; set; }
}

public class DatabaseAccess
{
public bool Admin { get; set; }
public string TenantId { get; set; }
public bool ReadOnly { get; set; }
}



Chris Marisic

unread,
Sep 27, 2012, 12:21:09 PM9/27/12
to rav...@googlegroups.com
Awesome.

Windows auth always seems to make even trivial things, brutally complex.

monsters

unread,
Sep 28, 2012, 10:56:45 AM9/28/12
to rav...@googlegroups.com
Yes, this is a great update. 

Oren Eini (Ayende Rahien)

unread,
Oct 12, 2012, 3:23:22 AM10/12/12
to rav...@googlegroups.com
https://github.com/ayende/ravendb/blob/1.2/Raven.Abstractions/Data/ApiKeyDefinition.cs

Id - The doc id.
Name - the name part of the api key
Secret - the secret part  of the api key
Enabled - obvious

Databases - the list of databases that this api key have access to.

DatabaseAccess
Admin - Whatever this has admin rights
TenantId - the db name
ReadOnly - whatever this is read only access.

On Fri, Oct 12, 2012 at 4:11 AM, Dany Wu <da...@savitarbernese.com> wrote:
This sounds great - can I please have a description of what each property in the ApiKeyDefinition and DatabaseAccess classes is supposed to mean? 
Reply all
Reply to author
Forward
0 new messages