lbcli set trusted-host-secret
Sets a trusted host's secrets.
Synopsis
Sets a host's secrets for a host to allow trusted connectivity between a Lightbits cluster and hosts, as part of In-Band Authentication support.
Specifying a host secret is mandatory (trusted connect of a host to a Lightbits cluster),
Specifying a target secret, either explicitly or by using auto-gen mode, is optional (allowing only a trusted Lightbits cluster to connect to a host).
If no target secret is specified, the target secret type will be set to disabled. In-Band Authentication functionality and its APIs are under development and available for evaluative purposes only. They should not be used in production clusters.
Examples:
# Set the host secret for a specific trusted host (target secret type not specified so set to disable).
lbcli -J $JWT set trusted-host-secret --project-name=default --name=mongodb-host5 --host-secret="12888888888abvg"
# Set the host secret and target secrets for a specific trusted host, target secret type is auto-gen to Lightbits cluster will generate the target secret.
lbcli -J $JWT set trusted-host-secret --project-name=default --name=mongodb-host5 --host-secret="12888888888abvg" --target-secret-type="AutoGenSecret"
# Set the host secret and target secret for specific trusted host (target secret type enabled, secret must be specified in command).
lbcli -J $JWT set trusted-host-secret --project-name=default --name=mongodb-host5 --host-secret="12888888888abvg" --target-secret-type="Enabled" --target-secret="rtyu12-78oyu"
Flag | Short | Type | Default | Description |
---|---|---|---|---|
--help | -h | bool | Help for trusted-host-secret. | |
--host-secret | string | Host secret, required for authenticated connection of a host to a Lightbits cluster (required). | ||
--target-secret | string | Target secret, required for authenticated connection of a Lightbits cluster to a host. | ||
--target-secret-type | string | Type of target secret: Disabled - No authentication (default), AutoGenSecret - The Lightbits cluster will generate the target secret, Enabled - The target secret must be specified in the command. | ||
--name | string | Trusted host name (required). | ||
--project-name | string | Project name (required). |