C H A P T E R 4 |
Administering the Sun Crypto Accelerator 4000 Board With the vcaadm and vcadiag Utilities |
This chapter provides an overview of the vcaadm and vcadiag utilities. The following sections are included:
The vcaadm program offers a command-line interface to the Sun Crypto Accelerator 4000 board. Only users designated as security officers are allowed to use the vcaadm utility. When you first connect to a Sun Crypto Accelerator 4000 board with vcaadm, you are prompted to create an initial security officer and password.
To access the vcaadm program easily, place the Sun Crypto Accelerator 4000 tools directory in your search path, for example:
$ PATH=$PATH:/opt/SUNWconn/bin $ export PATH |
The vcaadm command-line syntax is:
Note - When using the -d attribute, vcaN is the board's device name where the N corresponds to the Sun Crypto Accelerator 4000 device instance number. |
TABLE 4-1 shows the options for the vcaadm utility.
Note - The name sec_officer is used throughout this user's guide as an example security officer name. |
vcaadm can run in one of three modes. These modes differ mainly in how commands are passed into vcaadm. The three modes are Single-Command mode, File mode, and Interactive mode.
Note - To use vcaadm, you must authenticate as security officer. How often you need to authenticate as security officer is determined by which operating mode you are using. |
In Single-Command mode, you must authenticate as security officer for every command. Once the command is executed, you are logged out of vcaadm.
When entering commands in Single-Command mode, you specify the command to be run after all the command-line switches are specified. For example, in Single-Command mode, the following command would show all the users in a given keystore and return the user to the command shell prompt.
$ vcaadm show user Security Officer Name: sec_officer Security Officer Password: |
The following command performs a login as the security officer, sec_officer, and creates the user web_admin in the keystore.
$ vcaadm -s sec_officer create user web_admin Security Officer Password: Enter new user password: Confirm password: User web_admin created successfully. |
Note - The first password is for the security officer, followed by the password and confirmation for the new user web_admin. |
All output from Single-Command mode goes to the standard output stream. This output can be redirected using standard UNIX shell-based methods.
In File mode, you must authenticate as security officer for every file you run. You are logged out of vcaadm after the commands in the command file are executed.
To enter commands in File mode, you specify a file from which vcaadm reads one or more commands. The file must be ASCII text, consisting of one command per line. Begin each comment with a pound sign (#) character. If the File mode option is set, vcaadm ignores any command-line arguments after the last option. The following example runs the commands in the deluser.scr file and answers all prompts in the affirmative:
$ vcaadm -f deluser.scr -y |
In Interactive mode, you must authenticate as security officer every time you connect to a board. This is the default operating mode for vcaadm. To logout of vcaadm in Interactive mode, use the logout command. Refer to Logging In and Out With vcaadm.
Interactive mode presents the user with an interface similar to ftp(1), where commands can be entered one at a time. The -y option is not supported in interactive mode.
When you use vcaadm from the command-line and specify host, port, and device using the -h, -p, and -d attributes respectively, you are immediately prompted to log in as security officer if a successful network connection was made.
The vcaadm program establishes an encrypted network connection (channel) between the vcaadm application and the Sun Crypto Accelerator 4000 firmware running on a specific board.
During setup of the encrypted channel, boards identify themselves by their hardware Ethernet address and an RSA public key. A trust database ($HOME/.vcaadm/trustdb) is created the first time vcaadm connects to a board. This file contains all of the boards that are currently trusted by the security officer.
If the security officer connects to a new board, vcaadm will notify the security officer and prompt the following options:
1. Abort the connection 2. Trust the connection one time only (no changes to trust database) 3. Trust this board forever (adds the hardware ethernet address and RSA public key to the trust database). |
If the security officer connects to a board that has a remote access key that has been changed, vcaadm will notify the security officer and prompt the following three options:
1. Abort the connection 2. Trust the connection one time only (no changes to trust database) 3. Replace the old public key bound to this hardware ethernet address with the new public key. |
Note - The remaining examples in this chapter were created with the Interactive mode of vcaadm. |
When connecting to a new board, vcaadm must create a new entry in the trust database. The following is an example of logging in to a new board.
When connecting to a board that has a changed remote access key, vcaadm must change the entry corresponding to the board in the trust database. The following is an example of logging in to a board with a changed remote access key.
The vcaadm prompt in Interactive mode is displayed as follows:
vcaadm{vcaN@hostname, sec_officer}> command |
The following table describes the vcaadm prompt variables:
vca is a string that represents the Sun Crypto Accelerator 4000 board. N is the device instance number (unit address) that is in the device path name of the board. Refer to To Set Driver Parameters Using a vca.conf File for details on retrieving this number for a device. |
|
The name of the host for which the Sun Crypto Accelerator 4000 board is physically connected. hostname may be replaced with the physical host's IP address. |
|
The name of the security officer that is currently logged in to the board. |
If you are working in Interactive mode, you may want to disconnect from one board and connect to another board without completely exiting vcaadm. To disconnect from a board and logout, but remain in Interactive mode, use the logout command:
vcaadm{vcaN@hostname, sec_officer}> logout vcaadm> |
In the previous example, notice the vcaadm> prompt no longer displays the device instance number, hostname, or security officer name. To log in to another device, type the connect command with the following optional parameters.
vcaadm{vcaN@hostname, sec_officer}> logout vcaadm> connect host hostname dev vca2 Security Officer Login: sec_officer Security Officer Password: vcaadm{vcaN@hostname, sec_officer}> |
vcaadm will not let you issue the connect command if you are already connected to a Sun Crypto Accelerator 4000 board. You must first logout and then issue the connect command.
Each new connection will cause vcaadm and the target Sun Crypto Accelerator 4000 firmware to renegotiate new session keys to protect the administrative data that is sent.
The vcaadm program has a command language that must be used to interact with the Sun Crypto Accelerator 4000 board. Commands are entered using all or part of a word (enough to uniquely identify that word from any other possibilities). Entering sh instead of show would work, but re is ambiguous because it could be reset or rekey.
The following example shows entering commands using entire words:
vcaadm{vcaN@hostname, sec_officer}> show user User Status ----------------------------------------------------- web_admin enabled Tom enabled ----------------------------------------------------- |
The same information can be obtained in the previous example using partial words as commands, such as sh us.
An ambiguous command produces an explanatory response:
vcaadm{vcaN@hostname, sec_officer}> re Ambiguous command: re |
vcaadm has built-in help functions. To get help, you must enter a question mark (?) character following the command you want more help on. If an entire command is entered and a "?" exists anywhere on the line, you will get the syntax for the command, for example:
You can also enter a question mark at the vcaadm prompt to see a list of all of the vcaadm commands and their description, for example:
When not in vcaadm Interactive mode, the "?" character could be interpreted by the shell in which you are working. In this case, be sure to use the command shell escape character before the question mark.
Two commands allow you to exit from vcaadm: quit and exit. The Ctrl-D key sequence also exits from vcaadm.
The first step in configuring a Sun Crypto Accelerator 4000 board is to initialize it. When you initialize a board it is necessary to create a keystore, refer to Concepts and Terminology. You can either initialize the Sun Crypto Accelerator 4000 board with a new keystore or use a backup file to initialize the board to use an existing keystore.
When you first connect to a Sun Crypto Accelerator 4000 board with vcaadm, you are prompted to initialize the board with a new keystore or initialize the board to use an existing keystore which is stored in a backup file. vcaadm prompts you for all of the required information for either type of board initialization.
To Initialize the Sun Crypto Accelerator 4000 Board With a New Keystore |
1. Enter vcaadm at a command prompt of the system with the Sun Crypto Accelerator 4000 board installed or enter vcaadm -h hostname if the system is remote, and select 1 to initialize the board:
2. Create an initial security officer name and password (Refer to Naming Requirements):
Initial Security Officer Name: sec_officer Initial Security Officer Password: Confirm Password: |
3. Create a keystore name (Refer to Naming Requirements):
Keystore Name: keystore_name |
4. Select FIPS 140-2 mode or non-FIPS mode.
When in FIPS mode the Sun Crypto Accelerator 4000 board is FIPS 140-2, level 3 compliant. FIPS 140-2 is a federal information processing standard that requires tamper-resistance and a high level of data integrity and security. Refer to the FIPS 140-2 document located at:
http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf
Run in FIPS 140-2 mode? (Y/Yes/N/No) [No]: y |
5. Verify the configuration information:
If you are adding multiple boards to a single keystore, you might want to initialize all of the boards to use the same keystore information. In addition, you might want to restore a Sun Crypto Accelerator 4000 board to the original keystore configuration. This section describes how to initialize a board to use an existing keystore which is stored in a backup file.
You must first create a backup file of an existing board configuration before performing this procedure. Creating and restoring a backup file requires a password to encrypt and decrypt the data in the backup file. Refer to Backing Up the Master Key.
To Initialize the Sun Crypto Accelerator 4000 Board to Use an Existing Keystore |
1. Enter vcaadm at a command prompt of the system with the Sun Crypto Accelerator 4000 board installed or enter vcaadm -h hostname if the system is remote, and select 2 to restore the board from a backup:
2. Enter the path and password to the backup file:
Enter the path to the backup file: /tmp/board-backup Password for restore file: |
3. Verify the configuration information:
A keystore is a repository for key material. Associated with a keystore are security officers and users. Keystores not only provide storage, but a means for key objects to be owned by user accounts. This enables keys to be hidden from applications that do not authenticate as the owner. Keystores have three components:
Security officer names, user names, and keystore names must meet the following requirements:
63 characters for user names and 32 characters for keystore names |
|
Password requirements vary based on the current set passreq setting (low,
med, or high).
Use the set passreq command to set the password requirements for the Sun Crypto Accelerator 4000 board. This command sets the password character requirements for any password prompted by vcaadm. There are three settings for password requirements:
To change the password requirements, enter the set passreq command followed by low, med, or high. The following commands set the password requirements for a Sun Crypto Accelerator 4000 board to high:
vcaadm{vcaN@hostname, sec_officer}> set passreq high vcaadm{vcaN@hostname, sec_officer}> set passreq Password security level (low/med/high): high |
There may be more than one security officer for a keystore. Security officer names are known only within the domain of the Sun Crypto Accelerator 4000 board and do not need to be identical to any user name on the host system.
When creating a security officer, the name is an optional parameter on the command line. If the security officer name is omitted, vcaadm will prompt you for the name. (See Naming Requirements.)
These user names are known only within the domain of the Sun Crypto Accelerator 4000 board and do not need to be identical to the UNIX user name that the web server process actually runs as.
When creating a user, the user name is an optional parameter on the command line. If the user name is omitted, vcaadm will prompt you for the user name. (See Naming Requirements.)
Users must use this password when authenticating during a web server startup.
Caution - User's must remember their password. Without the password, the users cannot access their keys. There is no way to retrieve a lost password. |
Note - The user account is logged out if no commands are entered for more than five minutes. This is a tunable option; see Setting the Auto-Logout Time for details. |
To list users or security officers associated with a keystore, enter the show user or show so commands.
Only security officer passwords may be changed with vcaadm, and the only password that security officers can change are their own. Use the set password command to change security officer passwords.
vcaadm{vcaN@hostname, sec_officer}> set password Enter new security officer password: Confirm password: Security Officer password has been set. |
User passwords may be changed through the PKCS#11 interface with the Sun ONE Web Server modutil utility. Refer to the Sun ONE Web Server documentation for modutil for details.
Note - Security officers cannot be disabled. Once a security officer is created, it is enabled until it is deleted. |
By default each user is created in the enabled state. Users may be disabled. Disabled users cannot access their key material with the PKCS#11 interface. Enabling a disabled user will restore access to all of that user's key material.
When enabling or disabling a user, the user name is an optional parameter on the command line. If the user name is omitted, vcaadm will prompt you for the user name. To disable a user account, enter the disable user command.
vcaadm{vcaN@hostname, sec_officer}> disable user Tom User Tom disabled. vcaadm{vcaN@hostname, sec_officer}> disable user User name: web_admin User web_admin disabled. |
To enable an account, enter the enable user command.
vcaadm{vcaN@hostname, sec_officer}> enable user Tom User Tom enabled. vcaadm{vcaN@hostname, sec_officer}> enable user User name: web_admin User web_admin enabled. |
Issue the delete user command and specify the user to be deleted. When deleting a user, the user name is an optional parameter on the command line. If the user name is omitted, vcaadm will prompt you for the user name.
Issue the delete so command and specify the security officer to be deleted. When deleting a security officer, the security officer name is an optional parameter on the command line. If the security officer name is omitted, vcaadm will prompt you for the security officer name.
Keystores are stored on the disk and encrypted in a master key. This master key is stored in the Sun Crypto Accelerator 4000 firmware and can be backed up by a security officer.
To back up the master key, use the backup command. The backup command requires a path name to a backup file where the backup will be stored. This path name can be placed on the command line or if omitted, vcaadm will prompt you for the path name.
A password must be set for the backup data. This password is used to encrypt the master key that is in the backup file.
vcaadm{vcaN@hostname, sec_officer}> backup /opt/SUNWconn/vca/backups/bkup.data Enter a password to protect the data: Confirm password: Backup to /opt/SUNWconn/vca/backups/bkup.data successful. |
A site might have a strict security policy that doesn't allow the master key for a Sun Crypto Accelerator 4000 board to ever leave the hardware. This can be enforced using the set lock command.
Caution - Once this command is issued, all attempts to back up the master key will fail. This lock persists even if the master key is rekeyed. The only way to clear this setting is to zeroize the Sun Crypto Accelerator 4000 board with the zeroize command. Refer to Zeroizing a Sun Crypto Accelerator 4000 Board. |
This section describes how to manage Sun Crypto Accelerator 4000 boards with the vcaadm utility.
To customize the amount of time before a security officer is automatically logged out of the board, use the set timeout command. To change the auto-logout time, enter the set timeout command followed by a single number that is the number of minutes before a security officer is automatically logged out. A value of 0 will disable the automatic logout feature and the maximum delay is 1,440 minutes (1 day). A newly initialized Sun Crypto Accelerator 4000 board will default to 5 minutes.
The following command changes the auto-logout time for a security officer to 10 minutes:
vcaadm{vcaN@hostname, sec_officer}> set timeout 10 |
To get the current status of a Sun Crypto Accelerator 4000 board, issue the show status command. This displays the hardware and firmware versions for that board, the MAC address of the network interface, the status (Up versus Down, speed, duplex, and so on.) of the network interface, and the keystore name and ID.
If the Sun Crypto Accelerator 4000 board is operating in FIPS 140-2 mode, the show status command will print the following line:
* Device is in FIPS 140-2 Mode |
If the board is not operating in FIPS 140-2 mode, the show status command will not print a line specifying FIPS 140-2 mode.
You can also use the kstat(1M) utility to determine if the board is operating in FIPS 140-2 mode. The kstat(1M) parameter, vs-mode, returns a value of FIPS if the board is operating in FIPS 140-2 mode. Refer to Sun Crypto Accelerator 4000 Cryptographic and Ethernet Driver Operating Statistics and the online manual page and for kstat(1M).
It is possible to update the firmware for the Sun Crypto Accelerator 4000 board as new features are added. To load firmware, issue the loadfw command and provide a path to the firmware file.
A successful update of the firmware requires you to manually reset the board with the reset command. When you reset the board, the currently logged in security officer is logged out.
In certain situations, it might be necessary to reset the board. To do this, you must issue the reset command. You will be asked if this is what you wish to do. Resetting a Sun Crypto Accelerator 4000 board may temporarily cease the acceleration of cryptography on the system unless there are other active Sun Crypto Accelerator 4000 boards able to take over the load. Also, this command will automatically log you out of vcaadm, so you must reconnect to the device by logging back into vcaadm if you wish to continue administering it.
vcaadm{vcaN@hostname, sec_officer}> reset WARNING: Issuing this command will reset the the board and close this connection. Proceed with reset? (Y/Yes/N/No) [No]: y Reset successful. |
Over time, it may be necessary because of your security policy to use new keys as the master key or remote access key. The rekey command allows you to regenerate either of these keys, or both.
Rekeying the master key also causes the keystore to be reencrypted under the new key, and invalidates older backed up master key files with the new keystore file. It is advisable to make a backup of the master key whenever it is rekeyed. If you have multiple Sun Crypto Accelerator 4000 boards using the same keystore, you will need to backup this new master key and restore it to the other boards.
Rekeying the remote access key logs the security officer out, forcing a new connection that uses the new remote access key.
You may specify one of three key types when issuing the rekey command:
The following is an example of entering a key type of all with the rekey command:
In some situations, it might be necessary to clear a board of all its key material. This can be done using two methods. The first method is with a hardware jumper; this form of zeroizing will return the Sun Crypto Accelerator 4000 board to its original factory state (failsafe mode). See Zeroizing the Sun Crypto Accelerator 4000 Hardware to the Factory State. The second method is to use the zeroize command.
Note - The zeroize command only removes the key material, and leaves any updated firmware intact. This command also logs the security officer out upon successful completion. |
To zeroize a board with the zeroize command, enter the following:
Diagnostics can be run from the vcaadm utility in addition to SunVTS. The diagnostics command in vcaadm covers three major categories in the Sun Crypto Accelerator 4000 hardware: general hardware, cryptographic subsystem, and network subsystem. Tests for general hardware cover DRAM, flash memory, the PCI bus, the DMA controller, and other hardware internals. Tests for the cryptographic subsystem cover random number generators and cryptographic accelerators. Tests on the network subsystem cover the vca device.
The vcadiag program provides a command-line interface to the Sun Crypto Accelerator 4000 board that enables root users to perform administrative tasks without authenticating as security officer. Command-line options determine the actions that vcadiag performs.
To access the vcadiag program easily, place the Sun Crypto Accelerator 4000 tools directory in your search path, for example:
$ PATH=$PATH:/opt/SUNWconn/bin $ export PATH |
The vcadiag command-line syntax is:
Note - When using the [-DFKRZ] attributes, vcaN is the board's device name where the N corresponds to the Sun Crypto Accelerator 4000 device instance number. |
TABLE 4-1 shows the options for the vcadiag utility.
The following is an example of the -D option:
# vcadiag -D vca0 Running vca0 on-board diagnostics. Diagnostics on vca0 PASSED. |
The following is an example of the -F option:
# vcadiag -F vca0 5f26-b516-83b4-d254-a75f-c70d-0544-4de6 |
The following is an example of the -K option:
The following is an example of the -Q option:
# vcadiag -Q vca0:cb vca0:cb:keystore_name:83097c2b3e35ef5b:1 vca0:ca vca0:ca:keystore_name:83097c2b3e35ef5b:1 kcl2pseudo vca0:om vca0:om:keystore_name:83097c2b3e35ef5b:1 libkcl |
The following is an example of the -R option:
# vcadiag -R vca0 Resetting device vca0, this may take a minute. Please be patient. Device vca0 reset ok. |
Copyright © 2003, Sun Microsystems, Inc. All rights reserved.