trove client create call with optional user and database(s) args does not grant user access
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-troveclient |
Fix Released
|
Medium
|
Sushil Kumar |
Bug Description
When you supply the optional command line args for user and databases during instance create the trove api does not grant the user privileges to the database.
$ trove --debug create dntest4 1001 --users dntest:dnpass --databases my database
+------
| Property | Value |
+------
| flavor | 1001 |
| id | 18961e76-
| name | dntest4 |
| status | ACTIVE |
+------
$ trove database-list 18961e76-
+------------+
| name |
+------------+
| mydatabase |
+------------+
$ trove user-list 18961e76-
+------
| name | host | databases |
+------
| dntest | % | [] |
+------
mysql shows that there is only usage privileges for the new user.
Grants for dntest@%
GRANT USAGE ON *.* TO 'dntest'@'%' IDENTIFIED BY PASSWORD '*ED4215FA147DE
* To correct this you can use the user-grant-access api call.
$ trove user-grant-access 18961e76-
$ trove user-list 18961e76-
+------
| name | host | databases |
+------
| dntest | % | [{u'name': u'mydatabase'}] |
+------
The proposed fix would be to make this additional call through the trove client.
Changed in python-troveclient: | |
assignee: | nobody → Dan Nguyen (daniel-a-nguyen) |
Changed in python-troveclient: | |
status: | Fix Committed → Fix Released |
importance: | Undecided → Medium |
milestone: | none → python-troveclient-v1 |
After looking at the code I'm considering making the this fix in the trove api itself.