lbcli set trusted-host-secrets

AI Tools

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.

If no host secret is specified, one will be auto-generated.

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.

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-secrets --project-name=default --name=mongodb-host5 --host-secret=$DHCAP_KEY" # Auto-generate a host secret for a specific trusted host, leave target auth disabled lbcli -J $JWT set trusted-host-secrets --project-name=default --name=mongodb-host5" # Set the host secret and target secrets for a specific trusted host, target secret type is auto-gen so Lightbits cluster will generate the target secret. lbcli -J $JWT set trusted-host-secrets --project-name=default --name=mongodb-host5 --host-secret=$DHCAP_KEY --target-secret-type="AutoGenSecret" # Auto-generate both host and target secrets for a specific trusted host lbcli -J $JWT set trusted-host-secrets --project-name=default --name=mongodb-host5 --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-secrets --project-name=default --name=mongodb-host5 --host-secret=$DHCAP_KEY1 --target-secret-type="Enabled" --target-secret=$DHCAP_KEY2"

Flag

Short

Type

Default

Description

--help

-h

bool


Help for trusted-host-secrets.

--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).