Este conteúdo não está disponível no idioma selecionado.
Chapter 7. Storing Data Grid Server Credentials in Keystores
External services require credentials to authenticate with Data Grid Server. To protect sensitive text strings such as passwords, add them to a credential keystore rather than directly in Data Grid Server configuration files.
You can then configure Data Grid Server to decrypt passwords for establishing connections with services such as databases or LDAP directories.
Plain-text passwords in $RHDG_HOME/server/conf are unencrypted. Any user account with read access to the host filesystem can view plain-text passwords.
While credential keystores are password-protected store encrypted passwords, any user account with write access to the host filesystem can tamper with the keystore itself.
To completely secure Data Grid Server credentials, you should grant read-write access only to user accounts that can configure and run Data Grid Server.
7.1. Setting Up Credential Keystores Copiar o linkLink copiado para a área de transferência!
Create keystores that encrypt credential for Data Grid Server access.
A credential keystore contains at least one alias that is associated with an encrypted password. After you create a keystore, you specify the alias in a connection configuration such as a database connection pool. Data Grid Server then decrypts the password for that alias from the keystore when the service attempts authentication.
You can create as many credential keystores with as many aliases as required.
Procedure
-
Open a terminal in
$RHDG_HOME. Create a keystore and add credentials to it with the
credentialscommand.TipBy default, keystores are of type PKCS12. Run
help credentialsfor details on changing keystore defaults.The following example shows how to create a keystore that contains an alias of "dbpassword" for the password "changeme". When you create a keystore you also specify a password for the keystore with the
-pargument.- Linux
bin/cli.sh credentials add dbpassword -c changeme -p "secret1234!"
$ bin/cli.sh credentials add dbpassword -c changeme -p "secret1234!"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Microsoft Windows
bin\cli.bat credentials add dbpassword -c changeme -p "secret1234!"
$ bin\cli.bat credentials add dbpassword -c changeme -p "secret1234!"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Check that the alias is added to the keystore.
bin/cli.sh credentials ls -p "secret1234!"
$ bin/cli.sh credentials ls -p "secret1234!" dbpasswordCopy to Clipboard Copied! Toggle word wrap Toggle overflow Configure Data Grid to use the credential keystore.
-
Specify the name and location of the credential keystore in the
credential-storesconfiguration. Provide the credential keystore and alias in the
credential-referenceconfiguration.TipAttributes in the
credential-referenceconfiguration are optional.-
storeis required only if you have multiple keystores. -
aliasis required only if the keystore contains multiple aliases.
-
-
Specify the name and location of the credential keystore in the
Reference
7.2. Credential Keystore Configuration Copiar o linkLink copiado para a área de transferência!
Review example configurations for credential keystores in Data Grid Server configuration.
Credential keystore
Datasource connection
LDAP connection