如何使用oAuth保护RavenDB中的单个数据库?
我希望使用单个RavenDB服务器为多个应用程序托管多个数据库。不会有很多数据库(可能是3个或4个),但我想分别保护每个数据库 我想知道这种安全方法是否能在per/db上工作,我是否需要做什么特殊的事情如何使用oAuth保护RavenDB中的单个数据库?,oauth,ravendb,Oauth,Ravendb,我希望使用单个RavenDB服务器为多个应用程序托管多个数据库。不会有很多数据库(可能是3个或4个),但我想分别保护每个数据库 我想知道这种安全方法是否能在per/db上工作,我是否需要做什么特殊的事情 store.DatabaseCommands.Put("Raven/ApiKeys/sample", null, RavenJObject.FromObject(new ApiKeyDef
store.DatabaseCommands.Put("Raven/ApiKeys/sample",
null,
RavenJObject.FromObject(new ApiKeyDefinition
{
Name = "sample",
Secret = "ThisIsMySecret",
Enabled = true,
Databases = new List<DatabaseAccess>
{
new DatabaseAccess {TenantId = "*"},
new DatabaseAccess {TenantId = Constants.SystemDatabase},
}
}), new RavenJObject());
store.DatabaseCommands.Put(“Raven/apikees/sample”,
无效的
FromObject(新的ApiKeyDefinition
{
Name=“sample”,
Secret=“ThisIsMySecret”,
启用=真,
数据库=新列表
{
新数据库访问{TenantId=“*”},
新数据库访问{TenantId=Constants.SystemDatabase},
}
}),新对象());
您当然可以提供对特定数据库的访问,是的。
只要数据库集合中只有那个db,ti就可以工作了
当然,您可能希望每个数据库都有单独的API键