{"action":"closed","issue":{"url":"https://api.github.com/repos/devblackops/POSHOrigin/issues/8","repository_url":"https://api.github.com/repos/devblackops/POSHOrigin","labels_url":"https://api.github.com/repos/devblackops/POSHOrigin/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/devblackops/POSHOrigin/issues/8/comments","events_url":"https://api.github.com/repos/devblackops/POSHOrigin/issues/8/events","html_url":"https://github.com/devblackops/POSHOrigin/issues/8","id":149048777,"number":8,"title":"Allow 'PasswordState' credential resolver to retreive sensitive API key from ProtectedData credential","user":{"login":"devblackops","id":12634452,"avatar_url":"https://avatars.githubusercontent.com/u/12634452?v=3","gravatar_id":"","url":"https://api.github.com/users/devblackops","html_url":"https://github.com/devblackops","followers_url":"https://api.github.com/users/devblackops/followers","following_url":"https://api.github.com/users/devblackops/following{/other_user}","gists_url":"https://api.github.com/users/devblackops/gists{/gist_id}","starred_url":"https://api.github.com/users/devblackops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devblackops/subscriptions","organizations_url":"https://api.github.com/users/devblackops/orgs","repos_url":"https://api.github.com/users/devblackops/repos","events_url":"https://api.github.com/users/devblackops/events{/privacy}","received_events_url":"https://api.github.com/users/devblackops/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/devblackops/POSHOrigin/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"devblackops","id":12634452,"avatar_url":"https://avatars.githubusercontent.com/u/12634452?v=3","gravatar_id":"","url":"https://api.github.com/users/devblackops","html_url":"https://github.com/devblackops","followers_url":"https://api.github.com/users/devblackops/followers","following_url":"https://api.github.com/users/devblackops/following{/other_user}","gists_url":"https://api.github.com/users/devblackops/gists{/gist_id}","starred_url":"https://api.github.com/users/devblackops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devblackops/subscriptions","organizations_url":"https://api.github.com/users/devblackops/orgs","repos_url":"https://api.github.com/users/devblackops/repos","events_url":"https://api.github.com/users/devblackops/events{/privacy}","received_events_url":"https://api.github.com/users/devblackops/received_events","type":"User","site_admin":false},"assignees":[{"login":"devblackops","id":12634452,"avatar_url":"https://avatars.githubusercontent.com/u/12634452?v=3","gravatar_id":"","url":"https://api.github.com/users/devblackops","html_url":"https://github.com/devblackops","followers_url":"https://api.github.com/users/devblackops/followers","following_url":"https://api.github.com/users/devblackops/following{/other_user}","gists_url":"https://api.github.com/users/devblackops/gists{/gist_id}","starred_url":"https://api.github.com/users/devblackops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devblackops/subscriptions","organizations_url":"https://api.github.com/users/devblackops/orgs","repos_url":"https://api.github.com/users/devblackops/repos","events_url":"https://api.github.com/users/devblackops/events{/privacy}","received_events_url":"https://api.github.com/users/devblackops/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-04-18T05:44:53Z","updated_at":"2016-10-16T04:17:12Z","closed_at":"2016-10-16T04:17:12Z","body":"It would be nice if PasswordState credential resolver natively supported retrieving the API key from an encrypted source like ProtectedData. Storing the API key in cleartext inside the configuration isn't secure as all the information needed to query PasswordState and resolve the credential is right there is readable form. \r\n\r\nUsing nested resolvers like the below method **should** work but isn't the prettiest to look at.\r\n\r\n```powershell\r\nresource 'vsphere:vm' 'server01' @{\r\n    vCenterCredentials = gpos 'passwordstate' @{\r\n        endpoint = 'https://passwordstate.local/api'\r\n        credApiKey = (gpos 'protecteddata' @{\r\n            path = '.\\my_api_key.xml'\r\n            certificate = '<cert thumbprint>'\r\n        }).GetNetworkCredential().password\r\n        passwordId = 1234\r\n    }\r\n}\r\n```"}}
{"actor":{"display_login":"devblackops"}}