C# Class GoogleCloudExtension.Accounts.WindowsCredentialsStore

This class manages the Windows credentials associated with a particular VM. The credentials are stored in files with the name {username}.data. The name of the file is the username, the contents of the file is the encrypted version of the password. Only the current user will be able to decrypt the password. The password is encrypted/decryped using the ProtectedData class.
Mostrar archivo Open project: GoogleCloudPlatform/google-cloud-visualstudio

Public Methods

Method Description
AddCredentialsToInstance ( Instance instance, WindowsInstanceCredentials credentials ) : void

Adds a Windows credential to the store for the given instance.

DeleteCredentialsForInstance ( Instance instance, WindowsInstanceCredentials credentials ) : void

Deletes the given credentials from the list of associated credenials for instance.

GetCredentialsForInstance ( Instance instance ) : IEnumerable

Loads the list of Windows credentials associated with instance.

GetStoragePathForInstance ( Instance instance ) : string

Returns the path where to store credential related information for a GCE VM.

Private Methods

Method Description
GetCredentialsStoreRoot ( ) : string
GetFileName ( WindowsInstanceCredentials credentials ) : string
GetInstancePath ( Instance instance ) : string
GetUserName ( string path ) : string
LoadEncryptedCredentials ( string path ) : WindowsInstanceCredentials
SaveEncryptedCredentials ( string path, WindowsInstanceCredentials credentials ) : void

Method Details

AddCredentialsToInstance() public method

Adds a Windows credential to the store for the given instance.
public AddCredentialsToInstance ( Instance instance, WindowsInstanceCredentials credentials ) : void
instance Instance The GCE VM.
credentials GoogleCloudExtension.GCloud.WindowsInstanceCredentials The credentials to store.
return void

DeleteCredentialsForInstance() public method

Deletes the given credentials from the list of associated credenials for instance.
public DeleteCredentialsForInstance ( Instance instance, WindowsInstanceCredentials credentials ) : void
instance Instance The GCE VM.
credentials GoogleCloudExtension.GCloud.WindowsInstanceCredentials The credentials.
return void

GetCredentialsForInstance() public method

Loads the list of Windows credentials associated with instance.
public GetCredentialsForInstance ( Instance instance ) : IEnumerable
instance Instance The GCE VM
return IEnumerable

GetStoragePathForInstance() public method

Returns the path where to store credential related information for a GCE VM.
public GetStoragePathForInstance ( Instance instance ) : string
instance Instance The GCE VM.
return string