Skip to main content

Prerequisites

To get the most out of this guide, you will need to:

Installation

Through homebrew:
To upgrade it:

Authentication

The authentication process requires either an access token or an API key to interact with the gateway. The following sections outline the various authentication scenarios when using the command line interface.
The authentication process requires knowning the gateway instance URL where the Hoop gateway is running. Our managed instances are hosted under the URL:
Contact your administrator if you have a self hosted installation and don’t know this information.

Connection Usage Scenario

This authentication method is recommended for users who need to regularly access and manage resources within their permission scope. Users will authenticate to obtain a valid access token, which remains active based on your identity provider’s expiration policy.
This command should be executed only once in your machine. It creates and wipes the file $HOME/.hoop/config.toml in your local machine
This command must be executed every time the token expires or the command above is executed.

Automation Usage Scenario

Programmatic API Access

This authentication method is designed for administrators who need programmatic access to the API for tasks such as managing connections, configuring policies, or executing operations within automation pipelines. Programmatic access requires static authentication credentials that can be obtained through the following methods:

Static API Key

A Static API Key provides persistent authentication by setting an environment variable in the gateway with a secure random string. Configure the token in your local configuration using this command:

Service Account

Service Account authentication is available if your identity provider supports the OAuth2 Client Credentials Grant type.
Access tokens obtained from your identity provider typically have an expiration period. To maintain continuous access, create a script that can generate fresh access tokens as needed.

Using Environment Variables

Another way to use the command line is by exporting the following environment variables:
When using environment variables, it will ignore the local configuration file $HOME/.hoop/config.yaml

Managing Configuration

  • Configure your Gateway URL and clear any existent configuration
  • Configure the Gateway URL and the gRPC URL
This flag is optional and used only to interact with connections. The --grpc-url is obtained automatically from the Api when a user Sign In (issue the hoop login command)
  • Configure the Gateway URL, the gRPC URL and the TLS Certificate Root Certificate
This option should be used if your gateway is running with self signed certificates.
  • Show API_URL, GRPC_URL and TLS_CA configuration
  • Show all configuration with the access token (contains sensitive information)
  • Show sections of configuration
  • Wipe Local Configuration

Interacting with Resources

The hoop connect command allows you to create an interactive session with a remote resource. The resource include the interactive terminal console or native protocols.

Terminal Console

  • docker exec
  • bash
  • ssh
  • rails console
  • python console
  • kubectl exec
  • aws ecs execute-command

Terminal Ad Hoc Executions

Permit triggering ad hoc executions on a connection.
  • Issue the command env to a connection with the bash as interpreter
  • Run the script /tmp/myscript.sh using bash as the interpreter
  • Run the script /tmp/myscript.sh by reading it from the standard input using bash as interpreter

Native Protocols

The connect feature can be used to interact with native protocols such as databases, SSH, HTTP and TCP. The port is forwarded locally to the end-user, providing a secure connection to remote services.
The connection is established through a secure tunnel by an encrypted channel when the gateway is setup with TLS. The user identity is always validated when interacting with such resources.