[英]How to get cosmos db gremlin endpoint in Terraform output
[英]How do i setup RBAC gremlin cosmos db DefaultAzureCredentials
我将所有 Cosmos Dbs 设置为使用 DefaultAzureCredentials 进行身份验证,并且我使用 DefaultAzureCredentials 为我的 gremlin 帐户设置了 arm 资源管理器,但是我无法弄清楚如何让它与 gremlin.net 端一起使用。
例如我有
var credentials = new DefaultAzureCredentials();
但我该如何分配给
var gremlinServer = new GremlinServer(hostname: _gremlinHostname,
port: _port,
enableSsl: _enableSsl,
username: $"/dbs/{options.UniverseId}/colls/{graphName}",
password: !!crendentials goes here!!);
我相信您需要使用 Azure CosmosDB SDK 来检索基于 RBAC 的访问令牌(Gremlin.NET API 对 Azure CosmosDB 一无所知,而 RBAC 是基于 CosmosDB 的概念)。
检索到访问令牌后,您可以在实例化 GremlinServer(...) object 时将其作为“密码”传递。
请参阅https://learn.microsoft.com/en-us/azure/cosmos-db/graph/how-to-use-resource-tokens-gremlin
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.