You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2015/10/30 12:41:11 UTC

[1/2] git commit: updated refs/heads/master to bc5a5d6

Repository: cloudstack
Updated Branches:
  refs/heads/master af90caf63 -> bc5a5d662


CLOUDSTACK-9011 - Fixed user_vm_view to only display keypairs belonging to the account.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9191da31
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9191da31
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9191da31

Branch: refs/heads/master
Commit: 9191da31121e851725c6702c0bb39b9319dec0bd
Parents: eabf11c
Author: nnesic <ne...@greenqloud.com>
Authored: Thu Oct 29 12:18:17 2015 +0000
Committer: nnesic <ne...@greenqloud.com>
Committed: Fri Oct 30 11:16:10 2015 +0000

----------------------------------------------------------------------
 setup/db/db/schema-452to460.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9191da31/setup/db/db/schema-452to460.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-452to460.sql b/setup/db/db/schema-452to460.sql
index 22aa76e..12feb80 100644
--- a/setup/db/db/schema-452to460.sql
+++ b/setup/db/db/schema-452to460.sql
@@ -335,7 +335,7 @@ CREATE VIEW `cloud`.`user_vm_view` AS
         `cloud`.`user_vm_details` as ssh_details ON ssh_details.vm_id = vm_instance.id
             and ssh_details.name = 'SSH.PublicKey'
             left join
-        `cloud`.`ssh_keypairs` ON ssh_keypairs.public_key = ssh_details.value
+        `cloud`.`ssh_keypairs` ON ssh_keypairs.public_key = ssh_details.value AND ssh_keypairs.account_id = account.id
             left join
         `cloud`.`resource_tags` ON resource_tags.resource_id = vm_instance.id
             and resource_tags.resource_type = 'UserVm'


[2/2] git commit: updated refs/heads/master to bc5a5d6

Posted by re...@apache.org.
Merge pull request #1006 from greenqloud/user_vm_keypairs_fix

Fixed user_vm_view to only display keypairs belonging to the account.The user_vm_view displayes the keypair information by joining vm_details with ssh_keypairs on the key value exclusively.

We found a scenario in which this can cause information leakage. If there are two accounts using the same key, but create a different key name for it, and then a vm is created using one of the keys, the view will list both keypairs as belonging to the vm, which can in turn cause confusion to the users who see a keypair name which they did not create.

The fix simply limits the view to displaying keypairs which belong to vm's account.

I added it to the latest schema migration only; should I also include it in the previous ones?

* pr/1006:
  CLOUDSTACK-9011 - Fixed user_vm_view to only display keypairs belonging to the account.

Signed-off-by: Remi Bergsma <gi...@remi.nl>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bc5a5d66
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bc5a5d66
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bc5a5d66

Branch: refs/heads/master
Commit: bc5a5d662340030fe8f3182f4b3385682a890c47
Parents: af90caf 9191da3
Author: Remi Bergsma <gi...@remi.nl>
Authored: Fri Oct 30 12:40:43 2015 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Fri Oct 30 12:40:43 2015 +0100

----------------------------------------------------------------------
 setup/db/db/schema-452to460.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------