Combined Database backend: Add Static Account support to MongoDB (#7003)

* Implement SetCredentials for MongoDB, adding support for static accounts

* rework SetCredentials to split from CreateUser, and to parse the url for database

* Add integration test for mongodb static account rotation

* check the length of the password results to avoid out-of-bounds

* remove unused method

* use the pre-existing test helper for this. Add parse method to helper

* remove unused command
This commit is contained in:
Clint
2019-07-05 13:57:01 -05:00
committed by Chris Hoffman
parent 27e295ace8
commit 30de18eb23
7 changed files with 388 additions and 22 deletions

View File

@@ -5,6 +5,7 @@ type createUserCommand struct {
Password string `bson:"pwd"`
Roles []interface{} `bson:"roles"`
}
type mongodbRole struct {
Role string `json:"role" bson:"role"`
DB string `json:"db" bson:"db"`