attachment-show is including `connection_info` for non-admin callers, it shouldn't
Bug #1736773 reported by
John Griffith
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
In Progress
|
High
|
Rajat Dhasmana | ||
OpenStack Security Advisory |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
The V3 attachment API's include storing of the connection info of an attachment in the attachment-specs table. So the connection info no longer needs to be managed/persisted on the Nova side, instead an `attachment-show` will retrieve this data.
That's cool, but the problem is that currently that info is included for non-admin callers which is no good, that needs to be fixed up and hidden from normal users.
no longer affects: | ubuntu |
Changed in cinder: | |
assignee: | John Griffith (john-griffith) → Rajat Dhasmana (whoami-rajat) |
status: | Triaged → In Progress |
To post a comment you must log in.
Details of the call:
ubuntu@os-1:~$ cinder attachment-show 7efd5656- dc84-4996- ae7f-323142986a 85 ------- +------ ------- ------- ------- ------- ----+ ------- +------ ------- ------- ------- ------- ----+ 28T22:38: 55.000000 | dc84-4996- ae7f-323142986a 85 | 8b62-49a9- b5fe-ad5d9c169b dd | b820-47ae- b97f-0c85ea7bcf a5 | ------- +------ ------- ------- ------- ------- ----+ ------- ------- +------ ------- ------- ------- ------- ------- ------- ------- ------- ------- --+ ------- ------- +------ ------- ------- ------- ------- ------- ------- ------- ------- ------- --+ dc84-4996- ae7f-323142986a 85 | KMEvR | 10.org. openstack: volume- b822fb57- b820-47ae- b97f-0c85ea7bcf a5 | b820-47ae- b97f-0c85ea7bcf a5 | ------- ------- +------ ------- ------- ------- ------- ------- ------- ------- ------- ------- --+
+------
| Property | Value |
+------
| attach_mode | rw |
| attached_at | 2017-11-
| detached_at | |
| id | 7efd5656-
| instance | 2d509dbc-
| status | attached |
| volume_id | b822fb57-
+------
+------
| Property | Value |
+------
| access_mode | rw |
| attachment_id | 7efd5656-
| auth_method | CHAP |
| auth_password | Aa8WDrNaZAYBN8sa |
| auth_username | C4W5WBxj3WgxvCa
| driver_volume_type | iscsi |
| encrypted | False |
| qos_specs | None |
| target_discovered | False |
| target_iqn | iqn.2010-
| target_lun | 1 |
| target_portal | 10.117.36.28:3260 |
| volume_id | b822fb57-
+------
### Raw response below from the view-builder, note the connection_info key should be popped for non-admin callers
{'attachment': {'status': u'attached', 'detached_at': '', 'connection_info': {u'auth_password': u'Aa8WDrNaZAYBN 8sa', u'attachment_id': u'7efd5656- dc84-4996- ae7f-323142986a 85', u'target_ discovered' : False, u'encrypted': False, u'driver_ volume_ type': u'iscsi', u'qos_specs': None, u'target_iqn': u'iqn.2010- 10.org. openstack: volume- b822fb57- b820-47ae- b97f-0c85ea7bcf a5', u'target_portal': u'10.117. 36.28:3260' , u'volume_id': u'b822fb57- b820-47ae- b97f-0c85ea7bcf a5', u'target_lun': 1, u'access_mode': u'rw', u'auth_username': u'C4W5WBxj3Wgxv CaKMEvR' , u'auth_method': u'CHAP'}, 'attached_at': datetime. datetime( 2017, 11, 28, 22, 38, 55), 'attach_mode': u'rw', 'instance': '2d509dbc- 8b62-49a9- b5fe-ad5d9c169b dd', 'volume_id': 'b822fb57- b820-47ae- b97f-0c85ea7bcf a5', 'id': '...