[英]Which username and password should I use for Amazon Keyspaces (managed Cassandra)?
I am unable to connect to AWS Keyspaces using .NET Core due to an authentication error:由于身份验证错误,我无法使用 .NET Core 连接到 AWS Keyspaces:
AuthenticationException 'Provided username nick and/or password are incorrect')
AuthenticationException '提供的用户名 nick 和/或密码不正确')
I am not sure what values I should give to PlainTextAuthProvider
.我不确定应该给
PlainTextAuthProvider
什么值。
I have tried using:我试过使用:
How do I generate credentials for AWS Keyspaces?如何为 AWS Keyspaces 生成凭证?
My code, in case it is relevant:我的代码,如果它是相关的:
open System
open Cassandra
[<EntryPoint>]
let main argv =
async {
let cluster =
Cluster.Builder()
.AddContactPoints("cassandra.eu-west-2.amazonaws.com")
.WithPort(9142)
.WithAuthProvider(PlainTextAuthProvider ("username", "password123"))
.WithSSL()
.Build()
use! session =
cluster.ConnectAsync ()
|> Async.AwaitTask
()
}
|> Async.RunSynchronously
0
The option is found in the IAM section .该选项位于IAM 部分。
Naviagate to:导航至:
This will show a pop-up where you can generate credentials.这将显示一个弹出窗口,您可以在其中生成凭据。
Additionally, the code should specify a Keyspace:此外,代码应指定一个 Keyspace:
open System
open Cassandra
[<EntryPoint>]
let main argv =
async {
let cluster =
Cluster.Builder()
.AddContactPoints("cassandra.eu-west-2.amazonaws.com")
.WithPort(9142)
.WithAuthProvider(PlainTextAuthProvider ("username", "password123"))
.WithSSL()
.Build()
use! session =
cluster.ConnectAsync "test_keyspace"
|> Async.AwaitTask
()
}
|> Async.RunSynchronously
0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.