{"action":"created","issue":{"url":"https://api.github.com/repos/axsh/wakame-vdc/issues/580","labels_url":"https://api.github.com/repos/axsh/wakame-vdc/issues/580/labels{/name}","comments_url":"https://api.github.com/repos/axsh/wakame-vdc/issues/580/comments","events_url":"https://api.github.com/repos/axsh/wakame-vdc/issues/580/events","html_url":"https://github.com/axsh/wakame-vdc/issues/580","id":77572703,"number":580,"title":"Windows password timed deletion","user":{"login":"Metallion","id":629110,"avatar_url":"https://avatars.githubusercontent.com/u/629110?v=3","gravatar_id":"","url":"https://api.github.com/users/Metallion","html_url":"https://github.com/Metallion","followers_url":"https://api.github.com/users/Metallion/followers","following_url":"https://api.github.com/users/Metallion/following{/other_user}","gists_url":"https://api.github.com/users/Metallion/gists{/gist_id}","starred_url":"https://api.github.com/users/Metallion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metallion/subscriptions","organizations_url":"https://api.github.com/users/Metallion/orgs","repos_url":"https://api.github.com/users/Metallion/repos","events_url":"https://api.github.com/users/Metallion/events{/privacy}","received_events_url":"https://api.github.com/users/Metallion/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/axsh/wakame-vdc/labels/Priority%20:%20Normal","name":"Priority : Normal","color":"009800"},{"url":"https://api.github.com/repos/axsh/wakame-vdc/labels/Type%20:%20Feature","name":"Type : Feature","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"triggers","id":5583076,"avatar_url":"https://avatars.githubusercontent.com/u/5583076?v=3","gravatar_id":"","url":"https://api.github.com/users/triggers","html_url":"https://github.com/triggers","followers_url":"https://api.github.com/users/triggers/followers","following_url":"https://api.github.com/users/triggers/following{/other_user}","gists_url":"https://api.github.com/users/triggers/gists{/gist_id}","starred_url":"https://api.github.com/users/triggers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triggers/subscriptions","organizations_url":"https://api.github.com/users/triggers/orgs","repos_url":"https://api.github.com/users/triggers/repos","events_url":"https://api.github.com/users/triggers/events{/privacy}","received_events_url":"https://api.github.com/users/triggers/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/axsh/wakame-vdc/milestones/4","html_url":"https://github.com/axsh/wakame-vdc/milestones/v1.0","labels_url":"https://api.github.com/repos/axsh/wakame-vdc/milestones/4/labels","id":1070203,"number":4,"title":"v1.0","description":"The first release of Wakame-vdc after moving to the new versioning scheme that OpenVNet also uses.","creator":{"login":"Metallion","id":629110,"avatar_url":"https://avatars.githubusercontent.com/u/629110?v=3","gravatar_id":"","url":"https://api.github.com/users/Metallion","html_url":"https://github.com/Metallion","followers_url":"https://api.github.com/users/Metallion/followers","following_url":"https://api.github.com/users/Metallion/following{/other_user}","gists_url":"https://api.github.com/users/Metallion/gists{/gist_id}","starred_url":"https://api.github.com/users/Metallion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metallion/subscriptions","organizations_url":"https://api.github.com/users/Metallion/orgs","repos_url":"https://api.github.com/users/Metallion/repos","events_url":"https://api.github.com/users/Metallion/events{/privacy}","received_events_url":"https://api.github.com/users/Metallion/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2015-04-16T06:41:18Z","updated_at":"2015-05-18T09:10:29Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-05-18T09:10:29Z","updated_at":"2015-05-29T06:43:27Z","closed_at":null,"body":"### Problem\r\n\r\nhttps://github.com/axsh/wakame-vdc/issues/552 talks about deleting a windows instance's password after a certain time has passed. This needs to be implemented.\r\n\r\n### Solution\r\n\r\n**New DB column**\r\n\r\nAdd a column to the `instances` table in the database called `password_will_be_deleted_at` and will be a DateTime type.\r\n\r\n**New configuration option**\r\n\r\nCreate this configuration in dcmgr.conf\r\n\r\n```\r\nwindows {\r\n  # Set the time in minutes for the Windows password to remain\r\n  # in the database. This timer starts running the moment the password\r\n  # is first inserted in the database. When this time is expired, the password\r\n  # will be deleted.\r\n  # Set to 0 for unlimited.\r\n  delete_password_after 60\r\n}\r\n```\r\n\r\n**New NodeModule**\r\n\r\nImplement a new NodeModule (thread) in Collector which will be in charge of deleting Windows passwords. That NodeModule will work like this:\r\n\r\n* When collector starts\r\n\r\n  1) Delete all passwords in the database whose `password_will_be_deleted_at` field is in the past.\r\n\r\n  2) Select the `password_will_be_deleted_at` field that is closed to NOW() and in the future.\r\n\r\n  3) Wait until that time and delete the password.\r\n\r\n  4) Goto step 2\r\n\r\n* When a new windows instance is created\r\n\r\n  Goto step 2"},"comment":{"url":"https://api.github.com/repos/axsh/wakame-vdc/issues/comments/106710878","html_url":"https://github.com/axsh/wakame-vdc/issues/580#issuecomment-106710878","issue_url":"https://api.github.com/repos/axsh/wakame-vdc/issues/580","id":106710878,"user":{"login":"triggers","id":5583076,"avatar_url":"https://avatars.githubusercontent.com/u/5583076?v=3","gravatar_id":"","url":"https://api.github.com/users/triggers","html_url":"https://github.com/triggers","followers_url":"https://api.github.com/users/triggers/followers","following_url":"https://api.github.com/users/triggers/following{/other_user}","gists_url":"https://api.github.com/users/triggers/gists{/gist_id}","starred_url":"https://api.github.com/users/triggers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triggers/subscriptions","organizations_url":"https://api.github.com/users/triggers/orgs","repos_url":"https://api.github.com/users/triggers/repos","events_url":"https://api.github.com/users/triggers/events{/privacy}","received_events_url":"https://api.github.com/users/triggers/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T06:43:27Z","updated_at":"2015-05-29T06:43:27Z","body":"Update:\r\nThis issue (plus part of https://github.com/axsh/wakame-vdc/issues/552) is addressed by this branch:\r\nhttps://github.com/axsh/wakame-vdc/tree/windows-password-auto-deletion-tmp1\r\nAfter  https://github.com/axsh/wakame-vdc/pull/579 is merged, I'll\r\nrebase this branch and issue a pull request for it.\r\n\r\nNote: the implementation is different from the specification above:\r\n\r\n* delete_password_after is defined in hva.conf so hva can see it.\r\n* deletion is done by polling in dcmgr/lib/dcmgr/node_modules/maintenance.rb\r\n"}}