[DBPW 1/5] Add Database v5 interface with gRPC client & server#9641
Merged
Conversation
2 tasks
tvoran
reviewed
Aug 6, 2020
calvn
reviewed
Aug 6, 2020
calvn
reviewed
Aug 11, 2020
2 tasks
calvn
reviewed
Aug 21, 2020
tvoran
reviewed
Aug 21, 2020
Member
tvoran
left a comment
There was a problem hiding this comment.
Just some questions about statements.
calvn
reviewed
Aug 22, 2020
tvoran
reviewed
Aug 25, 2020
Contributor
austingebauer
left a comment
There was a problem hiding this comment.
Looking good overall! Just a few small comments and suggestions.
calvn
reviewed
Aug 27, 2020
tvoran
approved these changes
Aug 27, 2020
calvn
reviewed
Sep 1, 2020
|
|
||
| func getUpdateUserRequest(req *proto.UpdateUserRequest) (UpdateUserRequest, error) { | ||
| var password *ChangePassword | ||
| if req.GetPassword() != nil && req.GetPassword().GetNewPassword() != "" { |
Contributor
There was a problem hiding this comment.
GetNewPassword() has a built-in nil check on the receiver so you shouldn't need req.GetPassword() != nil to protect against potential panic, but it's good to be explicit.
3 tasks
This was referenced Sep 21, 2020
3 tasks
4 tasks
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR is part of a larger feature adding support for password policies into the combined database engine. This feature is being split into multiple PRs to make for smaller reviews & earlier feedback.
Creates a new
Databaseinterface for use in the combined database engine. This new interface will be v5 of the engine and is designed to support password policies. It also changes the pattern of the previous interface to a more gRPC style for better future compatibility. This is done so changes to the interface in the future are hopefully less painful.Nothing is referencing this package yet. That will happen in a subsequent PR
Files
sdk/database/newdbplugin/- New package for keeping all of the v5 database code. This is a temporary location. This package will replace the existingsdk/database/dbpluginpackage in a subsequent PR. The existingsdk/database/dbpluginpackage will be renamed to indicate it is deprecated.database.go- New v5 interface & associated request/response objectsproto/database.proto- New v5 interface as defined in gRPCgrpc_client.go- gRPC client implementation ofproto/database.proto. This does the conversion between Go types indatabase.goto protobuf-generated types.grpc_server.go- gRPC server implementation ofproto/database.proto. This does the conversion between protobuf-generated types and Go types indatabase.go.Related PRs
Original password policies PR
2/X - Middleware
3/X - Plugin handling
4/X - Database engine