Skip to main content
Version: 5.7.1

Connecting to Hazelcast Platform with Hazelcast CLC

To use the Hazelcast CLC with Hazelcast Platform, you need to configure it with the correct connection credentials.

The configuration examples in this topic use a configuration file.

Before you Begin​

You need the following:

  • Hazelcast CLC

  • A Hazelcast Platform cluster

  • Your cluster's connection credentials:

    • Cluster name: To find your cluster name, see cluster-name configuration.
    • IP addresses: If you're not connecting to a local member at localhost:5701 (default), you'll need the IP addresses of the members that you want to connect to.
    • Username and password: If your cluster is configured with simple authentication, find the username and password in your member configuration file. See Simple Authentication.
    • Mutual TLS: If your cluster is configured with mutual TLS authentication, you'll need your client TLS keys and certificates. See Mutual Authentication.

Hazelcast CLC supports the following TLS connections for Hazelcast Platform:

Connecting to Clusters with One-Way Authentication​

  1. Add the following to your configuration file:

    yaml
    cluster:
    name: "<CLUSTER NAME>"
    address: "<MEMBER IP ADDRESS>"
    user: "<OPTIONAL USERNAME>"
    password: "<OPTIONAL PASSWORD>"
    ssl:
    enabled: true
    server: "<HOSTNAME IN CLUSTER CERTIFICATE>"
  2. Start an interactive shell session.

    bash
    clc

The Hazelcast CLC starts in interactive mode at a command prompt.

note

The Hazelcast CLC connects to the cluster on demand, that is when you issue a command that requires the connection, such as running a SQL query.

Connecting to Clusters with Mutual TLS Authentication​

  1. Add the following to your configuration file:

    yaml
    cluster:
    name: "<CLUSTER NAME>"
    address: "<MEMBER IP ADDRESS>"
    user: "<OPTIONAL USERNAME>"
    password: "<OPTIONAL PASSWORD>"
    ssl:
    enabled: true
    server: "<HOSTNAME IN CLUSTER CERTIFICATE>"
    ca-path: "/<PATH>/ca.pem"
    cert-path: "/<PATH>/cert.pem"
    key-path: "/<PATH>/key.pem"
    key-password: "<PASSWORD FOR THE KEY>"
  2. Start an interactive shell session.

    bash
    clc

Hazelcast CLC starts in interactive mode at a command prompt.

note

Hazelcast CLC connects to the cluster on demand, that is when you issue a command that requires the connection, such as running a SQL query.

Connecting to Clusters with Self-Signed TLS Certificates​

If your cluster members use self-signed TLS certificates, you can use the skip-verify setting to skip TLS verification and avoid connection errors.

warning

Skipping TLS verification makes you vulnerable to man-in-the-middle attacks because any device can act as the intended cluster.

  1. Add the following to your configuration file:

    yaml
    cluster:
    name: "<CLUSTER NAME>"
    address: "<MEMBER IP ADDRESS>"
    user: "<OPTIONAL USERNAME>"
    password: "<OPTIONAL PASSWORD>"
    ssl:
    enabled: true
    skip-verify: true
  2. Start an interactive shell session.

    bash
    clc

CLC will start in the interactive mode, and you should see a command prompt.

note

Hazelcast CLC connects to the cluster on demand, that is when you issue a command that requires the connection, such as running a SQL query.

Connecting to Clusters with TLS Disabled​

  1. Add the following to your configuration file:

    yaml
    cluster:
    name: "<CLUSTER NAME>"
    address: "<MEMBER IP ADDRESS>"
    user: "<OPTIONAL USERNAME>"
    password: "<OPTIONAL PASSWORD>"
  2. Start an interactive shell session.

    bash
    clc

The Hazelcast CLC starts in the interactive mode at a command prompt.

note

Hazelcast CLC connects to the cluster on demand, that is when you issue a command that requires the connection, such as running a SQL query.

Next Steps​

See the command reference to learn what you can do with Hazelcast CLC.