2.5.4.1 SECRET Command

This command is used to securely store secret values in memory. The Connection Manager (connmgr) commands enable the use of the secret name to identify secure values such as passwords and encryption keys. Using the secret name in this way ensures that secure values are not displayed on the command line and do not persist in command history. Secure values cannot be retrieved with the SECRET command.

Syntax

secret {SUBCOMMAND}

where the subcommands are:

Set

Sets a name for a secret value. The secret name can be used with commands that support secure values.

Syntax

secret set {PARAMETERS}

Parameters

Parameter Description
secret_name The public name that can be used to represent a secure value.
secret_value The protected secret value that is associated with the secret name.

List

Lists the currently stored secret names.

Syntax

secret list

Unset

Removes the secret value for the secret name.

Syntax

 secret unset <secret_name>

where secret_name is the public name used to represent a secret value.

Example

Set a name for a secret value and use it to import connections.

SQL> secret set my_name myEncryptionKey
secret my_name stored
SQL> connmgr import -encryption_key my_name conns.json