■ In addition to the libraries listed in Credential Store Client Libraries, the vSphere Web Services SDK includes the CredentialStoreAdmin tool for creating, examining, and managing the credential store. You can use the tool to examine the contents of the credential store, for example, the generated user accounts and passwords.If you use the credential store client libraries, shown in Credential Store Client Libraries in an application, you must set up the credential store on all client machines that run your application.
■ Linux. $HOME/.vmware/credstore/vicredentials.xml
■ Windows Vista. C:\Users\[user_name]\AppData\Roaming\VMware\credstore\vicredentials.xml
■ Windows XP and Windows 2000.
C:\Documents and Settings\[user_name]\Application Data\VMware\credstore\vicredentials.xml
Example: Credential Store File Format shows the XML elements that are read and written to the file.Example: Credential Store File FormatThe CreateUser and SimpleAgent sample applications demonstrate how to use the credential store client libraries.
■ The CreateUser sample creates a user account and password for the server based on random-number-generation scheme. The sample populates the local credential store backing file with this information. If the backing file does not exist, it is created in the default location.When you run CreateUser, specify the name of an ESXi system, and an administrator user name and password. A user account name and password are created on the server. Specify --ignorecert unless your system has a secure connection to the target. Do not use --ignorecert in a production environment.
Caution The CreateUser sample application is for demonstration purposes only and should not be used as a model for production code. The sample breaks the principle of least privilege by granting the user account the Administrator role (-1). Never do this in a production environment.
■ The SimpleAgent sample application demonstrates how to use credential store libraries to extract the user account and password at runtime to authenticate a user noninteractively.If no predefined user role that meets the needs of your application exists, create a role with only those privileges needed for the application. See System and Sample Roles for more information about roles.
3
4 Store the user account and password in the credential store, using the CredentialStoreAdministration tool.