-
Notifications
You must be signed in to change notification settings - Fork 642
CASSGO-19 Don't restrict server authenticator in PasswordAuthenticator #1801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,6 +81,16 @@ | |
| // } | ||
| // defer session.Close() | ||
| // | ||
| // By default, PasswordAuthenticator will attempt to authenticate regardless of what implementation the server returns | ||
| // in its AUTHENTICATE message as its authenticator, (e.g. org.apache.cassandra.auth.PasswordAuthenticator). If you | ||
| // wish to restrict this you may use PasswordAuthenticator.AllowedAuthenticators: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Maybe a comment on the interface function itself could also be useful
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the comment I changed at line 46 in conn.go ok or were you looking for documentation elsewhere (like on the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was thinking about a comment on the type itself (
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 sounds great, agree that this is the most appropriate place. Will make that change.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe a comment on the type itself too.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. made an attempt to document both. Thought it would be good to make it clear that the default behavior of other drivers is to allow any authenticator, generally I don't think people should configure this, and the presence of documentation may lead them to think they need to do so, so felt it was good to clarify that. Hopefully that looks ok.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lgtm 👍
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, i'll squash the commits and update the patch by/reviewed by 👍
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done, hopefully this is good to go! |
||
| // | ||
| // cluster.Authenticator = gocql.PasswordAuthenticator { | ||
| // Username: "user", | ||
| // Password: "password" | ||
| // AllowedAuthenticators: []string{"org.apache.cassandra.auth.PasswordAuthenticator"}, | ||
| // } | ||
| // | ||
| // # Transport layer security | ||
| // | ||
| // It is possible to secure traffic between the client and server with TLS. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alternatively, could test for nil, but felt would keep it this way for consistency.