
SSH client presents a certificate
The user’s SSH client authenticates using a certificate signed by a trusted CA. No passwords or API tokens are needed — the certificate is the only credential.
SSH gateway server validates and maps the user
The Hoop SSH gateway verifies the certificate signature against the configured trusted CA. It then extracts the configured certificate attribute (
principal or key_id) and maps it to a known Hoop user via the configured user attribute (user_id, subject, or email). The connection is rejected if no matching user is found or if the certificate is expired or unsigned.Internal gRPC connection is opened
Once the user is authenticated, the SSH gateway opens an internal gRPC connection to the core Hoop gateway server, passing the resolved user identity and the requested resource role.
Policies are enforced and the protocol is forwarded
The gRPC server applies all configured policies for that resource role and user — session recording, data masking, guardrails, and access reviews — and simultaneously proxies the underlying protocol to the target resource. For
custom resource roles this is a PTY or stdin stream; for postgres and mysql it is a raw TCP port-forward. From this point, the session is indistinguishable from a native Hoop session.How It Works
The Hoop gateway exposes an SSH server that validates incoming connections via SSH certificate extensions. Access is granted or denied based on the following extensions present in the certificate:| Extension | Description |
|---|---|
permit-pty | Allows the client to allocate a pseudo-TTY for interactive sessions |
permit-port-forwarding | Allows the client to perform port-forwarding |
Certificate Attributes
The certificate is validated against Hoop user attributes to identify the connecting user. Configure which certificate field maps to which Hoop user attribute: Certificate attribute (source):| Attribute | Description |
|---|---|
principal | The certificate’s principal list is used to look up a known Hoop user |
key_id | The certificate’s key ID is used to look up a known Hoop user |
| Attribute | Description |
|---|---|
user_id | Match the certificate attribute value against the user’s internal ID |
subject | Match the certificate attribute value against the user’s subject |
email | Match the certificate attribute value against the user’s email |
Configuration
Use thehoop admin sshserver apply command to configure the SSH server on your gateway. At minimum you need to provide the trusted CA public key, a listen address, and the attribute mapping between the certificate and a Hoop user.
The SSH server restarts automatically after each
apply to pick up the new configuration. Existing connections will be dropped briefly during the restart.--trusted-ca once per CA to trust certificates from more than one authority:
key_id from the certificate and match it against the user’s subject:
| Flag | Description |
|---|---|
--trusted-ca | Public key of a trusted CA. Repeat the flag to add multiple CAs. |
--listen-address | Address and port the SSH server will bind to (e.g. 0.0.0.0:12222) |
--user-attr | Hoop user attribute to match against (user_id, subject, or email) |
--cert-attr | Certificate attribute to extract for user lookup (principal or key_id) |
Generating Certificates
The examples below use
ssh-keygen to operate a self-managed CA — suitable for testing and small deployments. For production environments, use a dedicated PKI solution such as HashiCorp Vault SSH Secrets Engine, Smallstep, or AWS Private CA to handle certificate issuance, renewal, and revocation at scale.ca) must be kept secret; the public key (ca.pub) is registered with the Hoop gateway via --trusted-ca.
alice-cert.pub alongside the existing alice and alice.pub files. The SSH client automatically uses the certificate when alice is passed as the identity file.
| Flag | Description |
|---|---|
-s ca | Sign with the CA private key |
-I "alice@example" | Human-readable key ID embedded in the certificate (maps to key_id attribute) |
-n "alice,<user-id>" | Comma-separated principals embedded in the certificate (maps to principal attribute) |
-V "+52w" | Certificate validity — here, 52 weeks from now |
-O clear | Clear all default permissions before adding explicit ones |
-O permit-pty | Grant pseudo-TTY allocation for interactive sessions |
-O permit-port-forwarding | Grant TCP port-forwarding for database access |
The
-n principals list must contain the value the Hoop gateway will look up. For example, if the gateway is configured with --cert-attr principal and --user-attr user_id, one of the principals must be the user’s Hoop user_id.Supported Resource Role Types
Clients connect to Hoop resources by specifying a Resource Role name as the SSH command argument. Each resource role type maps to a different access pattern:custom
Interactive terminal sessions and ad-hoc command execution. The user connects to a predefined entrypoint (e.g.
bash, python) and cannot escape the command defined in the resource role.Postgres
Port-forwards a PostgreSQL connection to your local machine. Connect with any IDE or the
psql CLI as if the database were running locally.MySQL
Port-forwards a MySQL connection to your local machine. Connect with any IDE or the
mysql CLI as if the database were running locally.Client Usage
Terminal Access
When the resource role is configured with a shell or REPL entrypoint, the SSH client opens an interactive terminal session. Use the-t flag to request a pseudo-TTY allocation:

Ad-Hoc Command Execution
Over the same resource role you can run one-off commands without opening an interactive session. The command is passed as an argument after the resource role name:
Piping Standard Input
For tools that consume complex or multi-line input, pipe stdin directly into the SSH command:
Database Port Forwarding
Port-forward a database resource role to your local machine and connect with any IDE or CLI tool:
Running as a Jump Host
You can configure a standardsshd server to forward specific users through Hoop, extending your existing bastion with Hoop’s capabilities rather than replacing it.
sshd Configuration
Add the following directives to yoursshd_config on the bastion server:
The bastion and Hoop gateway must share the same CA key (
TrustedUserCAKeys) and host key (HostKey) so that clients do not encounter host verification errors when jumping between them.