This is the standard installation to evaluate Hoop. We recommend it for Proof of Concepts or testing environments.
On this installation, clients establishes connections without TLS, which is subject to interception.
Make sure to deploy it over a secure network and use it only with non production resources.
The default installation method install a Postgres database with Host mounted storage.
In case the node is decommissioned, all data will be lost.For more durable setups, use a Persistent Volume by providing the option below:
This is production is recommended for production, it terminate the TLS directly on the gateway for all existent protocols.
For the purpose of this quick start, we’re going to generate certificate signed by a CA unstruted party with openssl. However,
the process of installing and configuring should be the same when issuing certificates from trusted party organizations.Ensure you have all required certificate files from Step 1 if you’ve already issued them through your PKI provider.
1
Obtain a certificate for your domain
Expose the domain name of the Hoop Gateway instance
Join the Root Certificate Authority with your certificate
Copy
Ask AI
cat server.crt ca.crt > server-full.crt
When issuing certificates from a trusted party, make sure to include the Root and Intermediate certificates if they are provided.
(optional) Add the Root CA to your system keychain
This process is needed only when creating certificates from an unstrusted third party (openssl).
It will make your system to trust the certificated issued by the Root Certificate Authority.Make sure to have the following files in your local filesystem before proceeding to the next step:
server.crt - File containing the server certificate
ca.crt - File containing the Root with Intermediate CA’s if it’s available
server.key - File containing the private key of your certificate
2
Generate the values.yaml file
After having the certificates in your working directory, encode the following files in base64 to generate the values.yaml file.
The certificates will be used to serve the ports exposed in the gateway securely with TLS
Make sure that the DNS name of your domain match with the certificate.
In this example we’ll be exposing all ports with a load balancer from AWS.
Make sure to adapt this recipe to deploy a network load balancer in your own infra-structure with the proper annontations.
Export the domain hostname and the certificate files
Obtain the address of your load balancer by issuing the command below
Copy
Ask AI
kubectl get svc -n hoopdev hoopgateway-proxy \ -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'
Create a CNAME record for your $DOMAIN_HOSTNAME in your DNS pointing to this address.
Visit the Webapp at https://$DOMAIN_NAME/login
If you want to validate the installation without exposing the gateway to the public internet,
use the kubectl to port forward the ports into your local machine.
It is possible to add new attributes or overwrite an attribute from a base values.yaml file.
In the example below a default agent is deployed as a sidecar container and with a using a specific version of the gateway.
Hoop uses Postgres as the backend storage of all data in the system.
It uses the schema private to create the tables of the system.
The command below creates a database and a user with privileges to access the database and the required schema.
Copy
Ask AI
CREATE DATABASE hoopdb;CREATE USER hoopuser WITH ENCRYPTED PASSWORD 'my-secure-password';-- switch to the created database\c hoopdbCREATE SCHEMA IF NOT EXISTS private;GRANT ALL PRIVILEGES ON DATABASE hoopdb TO hoopuser;GRANT ALL PRIVILEGES ON SCHEMA public to hoopuser;GRANT ALL PRIVILEGES ON SCHEMA private to hoopuser;GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO hoopuser;GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA private TO hoopuser;
In case of using a password with special characters, make sure to url encode it properly when setting the connection string.
Use these values to assemble the configuration for POSTGRES_DB_URI:
Starting from version 1.21.9, there is only one way to configure the agent key, which is by using the config.HOOP_KEY configuration. This requires creating a key in a DSN format in the API. To use legacy options, use the Helm chart version 1.21.4.
Starting with version 1.45+,we are transitioning to expose native protocols directly on the Gateway, eliminating the need to forward ports locally through the Hoop Command Line.This new approach requires the Gateway to terminate TLS connections, ensuring secure protocol negotiation and protecting data in transit.
To deploy the gateway with a valid certificate, make to define the environment variables TLS_KEY and TLS_CERT.
The certificate file may contain the Root and Intermediate CA’s as well.
Make sure to include them in the proper order, the example below show how the certificates must be generated:
The authentication configuration is now handled via Webapp or defined via API directly,
the environment variable with the prefix IDP_ are deprecated and will be removed in upcoming releases.
The chart allows deploying a Postgres database as part of the installation.
Copy
Ask AI
# -- Enable PostgreSQLpostgres: # it default to host mount when enabled enabled: false # set a storage class name to use a Persistent Volume Claim storageClassName: null # -- Size of PVC size: 10Gi # annotations: {}
It creates a default Service resource named hoopgateway-pg.
This service name could be used in the POSTGRES_DB_URI configuration.
We recommend using SSD for large deployments, it will help speed the I/O when handling many concurrent requests.
The following example shows how to enable a 50GB persistent volume when using AWS/EKS.
Copy
Ask AI
persistence: # -- Use persistent volume for write ahead log sessions enabled: true storageClassName: gp2 # -- Size of persistent volume claim size: 50Gi
This section covers the ingress configuration. The gateway requires exposing the ports HTTP/8009 and HTTP2/8010.
The ingress configuration establishes these two differing configurations based on the ingress controller in use.
AWS ALB
Nginx Ingress Controller
GCP Classic ALB
AWS Load Balancer Controller is a controller to help manage Elastic Load Balancers for a Kubernetes cluster.
# HTTP/8009 - API / WebAppingressApi: enabled: true # the public DNS name host: 'hoopgateway.yourdomain.tld' # the ingress class, in this case alb ingressClassName: 'alb' annotations: # uses the ACM service to use a valid public certificate issued by AWS alb.ingress.kubernetes.io/certificate-arn: 'arn:aws:acm:...' # the group name allows resuing the same lb for both protocols (HTTP/gRPC) alb.ingress.kubernetes.io/group.name: 'hoopdev' alb.ingress.kubernetes.io/healthcheck-path: '/' alb.ingress.kubernetes.io/healthcheck-protocol: 'HTTP' alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS": 443}]' alb.ingress.kubernetes.io/scheme: 'internet-facing' alb.ingress.kubernetes.io/ssl-redirect: '443' alb.ingress.kubernetes.io/target-type: 'ip'# HTTP/8010 - gRPC ServiceingressGrpc: enabled: true # the public DNS name host: 'hoopdev.yourdomain.tld' # the ingress class, in this case alb ingressClassName: 'alb' annotations: # configures the type of the protocol alb.ingress.kubernetes.io/backend-protocol-version: 'GRPC' # the certificate could be reused for the same protocol alb.ingress.kubernetes.io/certificate-arn: 'arn:aws:acm:...' # the group name allows resuing the same lb for both protocols (HTTP/gRPC) alb.ingress.kubernetes.io/group.name: 'hoopdev' alb.ingress.kubernetes.io/healthcheck-path: '/' alb.ingress.kubernetes.io/healthcheck-protocol: 'HTTP' alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS": 8443}]' alb.ingress.kubernetes.io/scheme: 'internet-facing' alb.ingress.kubernetes.io/target-type: 'ip'
The Nginx Ingress Controller is an Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer.
This setup requires deploying a network load balancer (Layer 4) in your cloud provider.
The external Application Load Balancer is a proxy-based Layer 7 load balancer that enables you to run and scale your services behind a single external IP address.
See the Architecture Overview.
The Classic ALB doesn’t support establishing HTTP/2 connections with the Hoop Gateway without TLS.
To accommodate this requirement, TLS certificates must be configured both on the ALB and within the Hoop Gateway
to establish secure communication between these components.
Make sure to install the Root Certificate Authority in your browser/system
to be able to visit the Web App. The browser won’t allow access due to HSTS policy.This step is not necessary when using certificates issued by a known entity.
Export the certificates for setting up the helm chart
mainService.annotations attribute allows adding an annotation mapping. GCP for instance configure aspects of how to configure the load balancer based on this configuration
mainService.httpBackendConfig: It creates the hoopgateway-http Backend Config resource when this attribute is set. It could be referenced using the annotation beta.cloud.google.com/backend-config
healthCheckType: The protocol used by probe systems for health checking. The BackendConfig only supports creating health checks using the HTTP, HTTPS, or HTTP2
timeoutSec: The amount of time in seconds that Google Cloud waits for a response to a probe.
mainService.grpcBackendConfig: It creates the hoopgateway-grpc Backend Config resource when this attribute is set. It could be referenced using the annotation beta.cloud.google.com/backend-config
healthCheckType: The protocol used by probe systems for health checking. The BackendConfig only supports creating health checks using the HTTP, HTTPS, or HTTP2
timeoutSec: The amount of time in seconds that Google Cloud waits for a response to a probe.
The helm-chart defaults to 1vCPU and 1GB, which is suitable for evaluation purposes only.
For production setups, we recommend allocating at least 8GB/4vCPU to the gateway process.
The grpcHost allows configuring the host to connect when starting the agent.
In case the gateway has TLS configured (TLS_CA env set), the host must match the certificate SAN.
To enable the Data Masking feature, you need to configure the dataMasking section in your values.yaml file.
It will deploy the Microsoft Presidio on the same namespace as the Hoop Gateway.
When the dataMasking attribute is enabled, it takes control over the following configurations:
DLP_MODE
DLP_PROVIDER
MSPRESIDIO_ANALYZER_URL
MSPRESIDIO_ANONYMIZER_URL
GOOGLE_APPLICATION_CREDENTIALS_JSON
If you need more control over the deployment, we recommend using a standalone helm chart of Presidio.
See more details above in the Presidio Deployment section.
This attribute is available starting from version 1.37.16+ of the Helm chart.
This configuration describes a pod that has a node selector, disktype: ssd. This means that the pod will get scheduled on a node that has a disktype=ssd label.See this documentation for more information.
Copy
Ask AI
# -- Node labels for pod assignmentnodeSelector: disktype: ssd
Available under the agent version 1.37.22+ and the Helm Presidio Chart version v0.0.2+.
We have a custom build of Presidio that leverages the use of Flair, it provides better accuracy in detecting PII data.
To use this custom build, you could use our custom build of the Presidio Analyzer.
The custom build of Presidio Analyzer with Flair requires more resources than the default official image.
We recommend allocating at least 8vCPU and 16GB to the analyzer process.
This configuration describes a pod that has a node selector, disktype: ssd. This means that the pod will get scheduled on a node that has a disktype=ssd label.See this documentation for more information.
Copy
Ask AI
# -- Node labels for pod assignmentnodeSelector: disktype: ssd
If you prefer using manifests over Helm, we recommend this approach. It allows you to track any modifications to the chart whenever a new version appears. You can apply a diff to your versioned files to identify what has been altered.