docs: IA reorganization (#5838)
* docs: IA reorganization * docs: Updates * docs: Updates * docs: Fix links * docs: Updates * docs: Fix a typo * docs: Fix client agent topic * docs: Update Client Agent nav * docs: Fix conflict * docs: Fix a typo in Client Agent docs (#5853) * docs: Fix client agent topic * docs: Updates * docs: Updates * docs: Updates * docs: Updates * docs: Fixes get started and operations links * docs: Update nav * docs: Partials * docs: Unix partials * docs: Worker partials * docs: Updates * docs: Update workers and targets * docs: Updates * docs: Updates * docs: Fixes link * docs: Updates after sync review * docs: Updates from review feedback * docs: Move worker filter examples * docs: Fix links * docs: Updates for filters based on working session * docs: Fixes broken links * docs: Add links to other filter topics * docs: Update list intro * docs: Adds link * docs: Fixes redirects * docs: Fixes redirects * docs: Deleted mysql page from TOC * docs: Add versioned redirect * docs: Adds versioned redirects * docs: Adds versioned redirects * docs: Update redirects * docs: Update redirects * docs: Redirect fixes * docs: Update redirect format * docs: Fix a typo * docs: Fixes redirects * docs: Fixes redirect * docs: Adds links out to client agent troubleshooting * uses /etc/boundary.d/ as recommended installation directory (#6003) * docs: Updates legacy io links * docs: Fixes redirects * docs: Fix redirect * docs: Restoring deleted file --------- Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>
This commit is contained in:
1 parent
21fce7c5eb
commit
5ce6515156
253 files changed
+7897
-5673
No files matched your search
@@ -0,0 +1,10 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: Create the worker configuration
|
||||
description: >-
|
||||
Learn about configuring workers. View an example of a worker configuration.
|
||||
---
|
||||
|
||||
# Create the worker configuration
|
||||
|
||||
@include '/workers/single-worker-config.mdx'
|
||||
@@ -0,0 +1,167 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: Configure a worker filter
|
||||
description: >-
|
||||
Learn about configuring a filter to control which workers are allowed to manage a session.
|
||||
---
|
||||
|
||||
# Configure a worker filter
|
||||
|
||||
You can use tags to configure a worker filter that controls which workers are allowed to perform specific functions.
|
||||
Following are some examples of using these values in filters that can be applied to targets, Vault credential stores, or storage buckets:
|
||||
|
||||
- Name regex: `"/name" matches "web-prod-us-east-[12]"`, which would
|
||||
match workers whose names are `web-prod-us-east-1` or `web-prod-us-east-2`
|
||||
|
||||
- Region: `"us-east-1" in "/tags/region"`.
|
||||
|
||||
- Grouping: `("us-east-1" in "/tags/region" and "/name" == "web-prod-us-east-1") or "webservers" in "/tags/type"`
|
||||
|
||||
Each tag can have multiple values, so you must use the `in` operator to match values. If you know that you have only one value, an equivalent would be `"/tags/key/0" == "value"`.
|
||||
|
||||
Refer to [Filtering and listing resources](/boundary/docs/filtering) for more information about Boundary's filter syntax and best practices.
|
||||
|
||||
## Example worker filter for targets
|
||||
|
||||
Once workers have tags, you can use these tags to control which
|
||||
workers are allowed to manage a given session by specifying worker filter attributes
|
||||
when you configure [targets](/boundary/docs/domain-model/targets).
|
||||
|
||||
The `egress_worker_filter` attribute controls which workers are used for egress to a target. This is the worker
|
||||
that accesses the target.
|
||||
|
||||
The `ingress_worker_filter`<sup>HCP/ENT</sup> attribute controls which workers are used for ingress to a target.
|
||||
This is the worker a client connects to when initiating a connection to a target.
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="UI" group="ui">
|
||||
|
||||
Example of a filter configured on a target in the Admin UI:
|
||||
|
||||

|
||||

|
||||
|
||||
</Tab>
|
||||
<Tab heading="CLI" group="cli">
|
||||
|
||||
Example of a filter configured on a target with the CLI:
|
||||
|
||||
```
|
||||
$ boundary targets update tcp -id tssh_1234567890 -egress-worker-filter='"prod" in "/tags/type"'
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab heading="Terraform" group="terraform">
|
||||
|
||||
Example of a filter configured on a target with Terraform:
|
||||
|
||||
```hcl
|
||||
resource "boundary_target" "aws-webservers-prod" {
|
||||
type = "ssh"
|
||||
name = "aws-web-prod"
|
||||
description = "AWS EC2 Targets"
|
||||
egress_worker_filter = "\"prod\" in \"/tags/type\""
|
||||
}
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Example worker filter for Vault credential store
|
||||
|
||||
Tags are used to control which workers can manage Vault requests by specifying
|
||||
a `worker_filter`attribute when configuring [credential stores](/boundary/docs/domain-model/credential-stores#vault-credential-store-attributes).
|
||||
|
||||
This allows the use of private Vault instances with Boundary. Workers
|
||||
deployed in the same network as a private Vault instance can access and relay
|
||||
Vault requests to Boundary controllers.
|
||||
|
||||
<Tip>
|
||||
|
||||
A worker that matches the worker filter must exist before you define the Vault credential store, as it will perform the Vault calls needed to set up the credential store with Boundary.
|
||||
|
||||
</Tip>
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="UI" group="ui">
|
||||
|
||||
Example of a worker filter configured on a Vault credential store in the Admin UI:
|
||||
|
||||

|
||||

|
||||
|
||||
</Tab>
|
||||
<Tab heading="CLI" group="cli">
|
||||
|
||||
Example of a worker filter configured on a Vault credential store with the CLI:
|
||||
|
||||
```
|
||||
$ boundary credential-stores update vault -id csvlt_1234567890 -worker-filter='"vault" in "/tags/type"'
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab heading="Terraform" group="terraform">
|
||||
|
||||
Example of a worker filter configured on a Vault credential store with Terraform:
|
||||
|
||||
```hcl
|
||||
resource "boundary_credential_store_vault" "vault_cred_store" {
|
||||
name = "Vault host credentials"
|
||||
address = "http://127.0.0.1:8200" # change to Vault address
|
||||
token = "s.0ufRo6XEGU2jOqnIr7OlFYP5" # change to valid Vault token
|
||||
scope_id = boundary_scope.project.id # change to target scope
|
||||
worker_filter = "\"vault\" in \"/tags/type\"" # change to access private Vault cluster
|
||||
}
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Example worker filter for storage buckets
|
||||
|
||||
<EnterpriseAlert product="boundary">Storage buckets are used for session recording, which requires <a href="https://www.hashicorp.com/products/boundary">HCP Boundary or Boundary Enterprise</a></EnterpriseAlert>
|
||||
|
||||
Session recording functions are performed by Boundary workers. Workers also store recordings on Boundary storage buckets. When you create Boundary storage buckets, you can use tags to select the workers you prefer to use for session recording responsibilities.
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="UI" group="ui">
|
||||
|
||||
Example of a worker filter configured on a storage bucket in the Admin UI:
|
||||
|
||||

|
||||

|
||||
|
||||
</Tab>
|
||||
<Tab heading="CLI" group="cli">
|
||||
|
||||
Example of a worker filter configured on a storage bucket with the CLI:
|
||||
|
||||
```
|
||||
$ boundary storage-buckets update -id sb_1234567890 -worker-filter='"session-recording" in "/tags/type"'
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab heading="Terraform" group="terraform">
|
||||
|
||||
Example of a worker filter configured on a storage bucket with Terraform:
|
||||
|
||||
```hcl
|
||||
resource "boundary_storage_bucket" "aws_dynamic_credentials_example" {
|
||||
name = "session-recording-storage-bucket"
|
||||
scope_id = boundary_scope.org.id # change to valid scope ID
|
||||
plugin_name = "aws"
|
||||
bucket_name = "mybucket" # change to valid AWS S3 storage bucket name
|
||||
|
||||
# the role_arn value should match the arn used as the instance profile attached to the ec2 instance
|
||||
# https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html
|
||||
attributes_json = jsonencode({
|
||||
"region" = "us-east-1"
|
||||
"role_arn" = "arn:aws:iam::123456789012:role/S3Access" # change to valid role ARN
|
||||
"disable_credential_rotation" = "true"
|
||||
})
|
||||
worker_filter = "\"session-recording\" in \"/tags/type\"" # change to valid worker filter tag
|
||||
}
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
@@ -0,0 +1,123 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: Worker configuration overview
|
||||
description: >-
|
||||
Learn about worker configuration for proxies, storage, and tags. Understand how multi-hop configurations let you chain workers together in private networks.
|
||||
---
|
||||
|
||||
# Overview of workers
|
||||
|
||||
Workers are primarily used as network proxies for Boundary sessions, they allow you to access private targets. Instead of exposing a private network to the public, or allowing users to have access to entire private networks, workers create a direct network tunnel between users and targets.
|
||||
|
||||
Workers are services that can run on a container or virtual machine. You should deploy them strategically within networks to provide access to targets.
|
||||
In all editions of Boundary, workers are fully self-managed and can be deployed anywhere.
|
||||
In HCP Boundary, HCP-managed workers are automatically deployed with the cluster.
|
||||
|
||||
All workers within Boundary use certificates and encryption keys to identify
|
||||
themselves and protect data in transit. However, there are three different
|
||||
ways to register them so that registration of workers can fit into any workflow: controller-led, worker-led, and via external KMS.
|
||||
|
||||
You must register workers using the worker-led or controller-led methods in the system with an API call. These workers require storage on disk to store the current set of credentials. Workers using an external KMS auto-register after authenticating. This makes them an easy mechanism to use for automatic scaling.
|
||||
This also means they do not need to store
|
||||
credentials locally; the KMS re-authenticates them each time they connect.
|
||||
|
||||
<Note title="Important">
|
||||
|
||||
Before version 0.15 of Boundary, there were two different types of workers, PKI & KMS workers.
|
||||
If you are using pre-0.15 workers with pre-0.15 upstream configurations, please switch the documentation version to `0.13.x` - `0.14.x`. This will ensure you have the correct information.
|
||||
|
||||
</Note>
|
||||
|
||||
## Signals
|
||||
|
||||
The `SIGHUP` signal causes a worker to reload its configuration file to pick up any updates for the `initial_upstreams` and `tags` values.
|
||||
Boundary ignores other updated values.
|
||||
|
||||
The `SIGTERM` and `SIGINT` signals initiate a graceful shutdown on a worker. The worker waits for any sessions to drain
|
||||
before shutting down. Workers in a graceful shutdown state do not receive any new work, including session proxying, from the control plane.
|
||||
|
||||
## Session recording
|
||||
|
||||
<EnterpriseAlert product="boundary">This feature requires <a href="https://www.hashicorp.com/products/boundary">HCP Boundary or Boundary Enterprise</a></EnterpriseAlert>
|
||||
|
||||
Session recording requires at least one worker with access to local and remote storage.
|
||||
Workers used for session recording require an accessible directory defined by `recording_storage_path` for storing in-progress session recordings. On session closure, a local session recording is moved to remote storage and deleted locally.
|
||||
|
||||
The `recording_storage_minimum_available_capacity` value determines the minimum amount of storage space that is required for workers to perform session recording operations. If a worker is at or below the storage threshold, Boundary does not use the worker to record sessions or play back recordings.
|
||||
|
||||
Development example:
|
||||
|
||||
```hcl
|
||||
worker {
|
||||
auth_storage_path="/var/lib/boundary"
|
||||
initial_upstreams = ["10.0.0.1"]
|
||||
recording_storage_path="/local/storage/directory"
|
||||
recording_storage_minimum_available_capacity="500MB"
|
||||
}
|
||||
```
|
||||
|
||||
## Multi-hop sessions
|
||||
|
||||
<EnterpriseAlert product="boundary">This feature requires <a href="https://www.hashicorp.com/products/boundary">HCP Boundary or Boundary Enterprise</a></EnterpriseAlert>
|
||||
|
||||
Multi-hop capabilities, including multi-hop sessions and Vault private access,
|
||||
is when a session or Vault credential request goes through more than one worker.
|
||||
To enable this, you must connect two or more workers to each other in some
|
||||
configuration. There are no limits on the number of workers allowed in a
|
||||
multi-hop session configuration.
|
||||
|
||||
It helps to think of “upstream” and “downstream” nodes in the context of
|
||||
multi-hop. If you view controllers as the “top” node of a multi-hop chain, any
|
||||
worker connected to a node is "downstream" of that node. The node that any
|
||||
particular worker connects to (whether another worker or a controller) is the
|
||||
"upstream" of that node. For example, in the diagram below, Worker 2’s upstream
|
||||
is Worker 1, and its downstream is Worker 3.
|
||||
|
||||

|
||||
|
||||
You can deploy multi-hop workers in scenarios where inbound network traffic is
|
||||
not allowed. A worker in a private network can send outbound communication to
|
||||
its upstream worker, and create a reverse proxy to establish a session.
|
||||
|
||||
You can configure target worker filters with multi-hop workers to allow for
|
||||
fine-grained control on which workers handle ingress and egress for session
|
||||
traffic to a target. Ingress worker filters specify the workers you use to initiate a session, and egress worker filters specify the workers you use to access targets.
|
||||
|
||||
## Common worker parameters
|
||||
|
||||
@include '/configuration-reference/workers/common-worker-parameters.mdx'
|
||||
|
||||
|
||||
## Complete configuration example
|
||||
|
||||
@include '/configuration-reference/workers/complete-configuration-example.mdx'
|
||||
|
||||
## Tutorials
|
||||
|
||||
Refer to the [worker management](/boundary/tutorials/worker-management) tutorials for practice managing workers, configuring multi-hop sessions, and creating worker-aware targets.
|
||||
|
||||
Refer to the [Self-managed worker registration with HCP Boundary](/boundary/tutorials/hcp-administration/hcp-manage-workers) tutorial to learn how to register and manage workers.
|
||||
|
||||
Refer to the [Manage multi-hop sessions with HCP Boundary](/boundary/tutorials/hcp-administration/hcp-manage-multi-hop) tutorial to learn how to configure a multi-hop session.
|
||||
|
||||
## More information
|
||||
|
||||
Refer to [Filtering and listing resources](/boundary/docs/filtering) for more information about Boundary's filter syntax and best practices.
|
||||
|
||||
To configure and register a worker, refer to the following topics:
|
||||
|
||||
- [Create the worker configuration](/boundary/docs/workers/create)
|
||||
- [Register workers](/boundary/docs/workers/registration)
|
||||
|
||||
Refer to the following topics for more information about configuring workers for specific applications or workflows:
|
||||
|
||||
- [Overview of multi-hop sessions](/boundary/docs/workers/multi-hop)
|
||||
- [Configure multi-hop sessions for Boundary Enterprise](/boundary/docs/workers/multi-hop/enterprise)
|
||||
- [Configure multi-hop sessions for HCP Boundary](/boundary/docs/workers/multi-hop/hcp)
|
||||
- [Overview of session recording](/boundary/docs/session-recording)
|
||||
- [Configure workers for session recording](/boundary/docs/session-recording/configuration/configure-worker-storage)
|
||||
- [Configure workers for access to Vault](/boundary/docs/workers/filters#example-worker-filter-for-vault-credential-store)
|
||||
- [Configure workers for dynamic host discovery from cloud providers](/boundary/docs/hosts)
|
||||
- [Route traffic through a worker](/boundary/docs/workers/worker-tags)
|
||||
- [Configure a worker filter](/boundary/docs/workers/filters)
|
||||
- [Configure self-managed workers for HCP Boundary](/hcp/docs/boundary/self-managed-workers)
|
||||
@@ -0,0 +1,30 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: Create multi-hop sessions for Boundary Enterprise
|
||||
description: >-
|
||||
Configure multi-hop sessions for Boundary Enterprise. Chain together two or more workers across multiple networks to reach a target without exposing private networks.
|
||||
---
|
||||
|
||||
# Configure multi-hop sessions for Boundary Enterprise
|
||||
|
||||
<EnterpriseAlert product="boundary">This feature requires <a href="https://www.hashicorp.com/products/boundary">HCP Boundary or Boundary Enterprise</a></EnterpriseAlert>
|
||||
|
||||
For Boundary Enterprise, you can configure ingress, intermediary, and egress workers to take advantage of multi-hop worker capabilities.
|
||||
|
||||
Note that "ingress," "intermediary," and "egress" are general ways to describe how the respective worker interacts with resources.
|
||||
A worker can serve more than one of those roles at a time.
|
||||
Refer to [Multi-hop sessions](/boundary/docs/workers/multi-hop) for more information.
|
||||
|
||||
Complete the steps below to configure ingress, intermediate, and egress workers for Boundary Enterprise.
|
||||
|
||||
## Ingress worker configuration
|
||||
|
||||
@include '/workers/ingress-worker-config.mdx'
|
||||
|
||||
## Intermediate worker configuration
|
||||
|
||||
@include '/workers/intermediate-worker-config.mdx'
|
||||
|
||||
## Egress worker configuration
|
||||
|
||||
@include '/workers/egress-worker-config.mdx'
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: Create multi-hop sessions for HCP
|
||||
description: >-
|
||||
Configure multi-hop sessions for HCP Boundary. Chain together two or more workers across multiple networks to reach a target without exposing private networks.
|
||||
---
|
||||
|
||||
# Configure multi-hop sessions for HCP Boundary
|
||||
|
||||
<EnterpriseAlert product="boundary">This feature requires <a href="https://www.hashicorp.com/products/boundary">HCP Boundary or Boundary Enterprise</a></EnterpriseAlert>
|
||||
|
||||
Many organizations have strict network policies that prohibit all inbound traffic into their networks. In these scenarios, you can use HCP-managed workers as the ingress workers. To establish a connection into the network, a self-managed worker configured as an egress worker initiates an outbound connection to the HCP-managed worker, creating a persistent connection. As a result, when end users connect to a target, the end user's connection would hop from the Boundary client to the HCP-managed worker (ingress worker) to the self-managed worker (egress worker) to the target (or other intermediary workers if needed).
|
||||
|
||||
## Configure HCP-managed workers for ingress
|
||||
|
||||
To configure end user traffic to ingress through HCP-managed workers, you must configure the self-managed worker (enterprise version). On your self-managed worker that you use for egress to the HCP-managed worker, set the configuration file with the following parameters:
|
||||
- `hcp_boundary_cluster_id` - The HCP Boundary cluster ID, which can be found in the HCP Boundary cluster's URL.
|
||||
- Omit the `public_addr` parameter. A public address is not needed since the self-managed worker initiates the connection to HCP-managed workers.
|
||||
- Omit the `initial_upstreams` parameter. This is not needed because the `hcp_boundary_cluster_id` parameter is sufficent to indicate the HCP-managed workers as the upstream.
|
||||
- Include a [worker tag](/boundary/docs/workers/worker-tags) in the `worker` stanza which will be used to select multi-hop routes for each target.
|
||||
|
||||
### Example self-managed worker configuration:
|
||||
```
|
||||
hcp_boundary_cluster_id = "7acdefe2c-1234-4ff1-b710-123456789876"
|
||||
|
||||
listener "tcp" {
|
||||
address = "0.0.0.0:9202"
|
||||
purpose = "proxy"
|
||||
}
|
||||
|
||||
worker {
|
||||
auth_storage_path = "/home/ubuntu/boundary/worker1"
|
||||
tags {
|
||||
tag = ["multihop"]
|
||||
}
|
||||
recording_storage_path = "/tmp/worker1"
|
||||
}
|
||||
```
|
||||
## Allow-list outbound network traffic to HCP-managed workers
|
||||
|
||||
Some organizations require explicit destination addresses set in their network firewall rules for any outbound traffic. In this scenario, you should use the fully qualified domain name (FQDN) of the HCP-managed workers:
|
||||
|
||||
```
|
||||
<cluster_uuid>.proxy.boundary.hashicorp.cloud
|
||||
```
|
||||
|
||||
where the `cluster_uuid` is the HCP Boundary cluster ID. You can find your HCP Boundary cluster ID in the HCP Boundary cluster's URL.
|
||||
|
||||
<Note>
|
||||
|
||||
The Boundary cluster ID is derived from the Boundary address. For example, if
|
||||
your cluster URL is:
|
||||
|
||||
`https://abcd1234-e567-f890-1ab2-cde345f6g789.boundary.hashicorp.cloud`
|
||||
|
||||
Then your cluster id is `abcd1234-e567-f890-1ab2-cde345f6g789`.
|
||||
|
||||
</Note>
|
||||
|
||||
## Route end user traffic to targets through HCP-managed workers
|
||||
|
||||
To route traffic through the HCP-managed workers, you should set the egress filters of each target to match the tag set in the self-managed worker's configuration file. You do not need to set additional ingress filters on the targets.
|
||||
|
||||

|
||||

|
||||
@@ -0,0 +1,106 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: Multi-hop sessions
|
||||
description: >-
|
||||
Learn how multi-hop sessions let you chain together two or more workers across multiple networks to reach a target without exposing private networks.
|
||||
---
|
||||
|
||||
# Multi-hop sessions
|
||||
|
||||
<EnterpriseAlert product="boundary">This feature requires <a href="https://www.hashicorp.com/products/boundary">HCP Boundary or Boundary Enterprise</a></EnterpriseAlert>
|
||||
|
||||
Most organizations want to provide access to infrastructure without exposing private networks. Many organizations also have complex network topologies requiring
|
||||
inbound traffic to route through multiple network enclaves to reach the target system.
|
||||
Multi-hop sessions allow you to chain together two or more workers
|
||||
across multiple networks to form reverse proxy connections between the user and the target, even in complex networks with strict outbound-only policies.
|
||||
|
||||
## Inbound network rules
|
||||
|
||||
With a multi-hop deployment, all connections are initiated outbound from the most downstream worker in the chain. After Boundary establishes the initial connection between the workers, it uses the established connection for any subsequent connections.
|
||||
These persistent TCP connections result in the requirement for only outbound connectivity.
|
||||
|
||||
If you have one or more firewalls sitting between the ingress and egress workers, you do not need to create additional inbound networking rules to facilitate a Boundary multi-hop deployment. This not only helps to
|
||||
simplify your infrastructure configuration, but also ensures that your security posture is not weakened or compromised.
|
||||
|
||||
## Multi-hop worker types
|
||||
|
||||
In multi-hop scenarios, there are typically three types of workers:
|
||||
1. **Ingress worker** - An ingress worker is a worker that is accessible by the client. The client initiates the connection to the ingress worker.
|
||||
1. **Intermediary worker** - An optional intermediary worker sits between ingress and egress workers as part of a multi-hop chain. There can be multiple intermediary workers as part of a multi-hop chain.
|
||||
1. **Egress worker** - An egress worker is a worker that can access the target. The egress worker initiates reverse proxy connections to intermediary or ingress workers.
|
||||
|
||||
<Tip>
|
||||
“Ingress,” “intermediary,” and “egress” are general ways to describe how the respective worker interfaces with resources, and a worker can act as more than one of those
|
||||
at a time. For example in the diagram below, the intermediary worker is also an egress worker since it can access a target.
|
||||
</Tip>
|
||||
|
||||

|
||||
|
||||
After the persistent connection chain is established between the workers, when you attempt to connect to a target host, you are automatically proxied from:
|
||||
1. Boundary client to ingress worker
|
||||
1. Ingress worker to intermediary worker, where applicable
|
||||
1. Ingress worker to egress worker
|
||||
1. Egress worker to desired target
|
||||
|
||||
## Multi-hop worker capabilities
|
||||
|
||||
Multi-hop capabilities, including multi-hop sessions and Vault private access,
|
||||
is when a session or Vault credential request goes through more than one worker.
|
||||
To enable this, two or more workers must be connected to each other in some
|
||||
configuration. There are no limits on the number of workers allowed in a
|
||||
multi-hop session configuration.
|
||||
|
||||
It helps to think of “upstream” and “downstream” nodes in the context of
|
||||
multi-hop. If you view controllers as the “top” node of a multi-hop chain, any
|
||||
worker connected to a node is "downstream" of that node; the node that any
|
||||
particular worker connects to (whether another worker or a controller) is the
|
||||
"upstream" of that node. For example, in the diagram below, Worker 2’s upstream
|
||||
is Worker 1, and its downstream is Worker 3.
|
||||
|
||||

|
||||
|
||||
You can deploy multi-hop workers in scenarios where inbound network traffic is
|
||||
not allowed. A worker in a private network can send outbound communication to
|
||||
its upstream worker, and create a reverse proxy to establish a session.
|
||||
|
||||
You can configure target worker filters with multi-hop workers to allow for
|
||||
fine-grained control on which workers handle ingress and egress for session
|
||||
traffic to a target. Ingress worker filters determine which workers you
|
||||
connect with to initiate a session, and egress worker filters determine which
|
||||
workers are used to access targets.
|
||||
|
||||
## Multi-hop worker requirements
|
||||
|
||||
When you configure multi-hop sessions, there is an "ingress" worker, an "egress"
|
||||
worker, and any number of intermediary workers. Ingress, egress, and
|
||||
intermediary workers have the following requirements.
|
||||
|
||||
### Ingress worker requirements
|
||||
|
||||
To proxy target connections, ingress workers require outbound access to the
|
||||
Boundary control plane and inbound access from clients.
|
||||
|
||||
HCP Boundary clusters automatically deploy HCP-managed workers which can be used as ingress workers. Using HCP-managed workers as ingress workers is helpful when organizations have strict networks security policies that prohibit any inbound access. In this scenario, intermediary or egress workers within the private network can establish a reverse proxy connection to the HCP-managed ingress worker.
|
||||
|
||||
### Intermediary worker requirements
|
||||
|
||||
Intermediary workers require outbound access to an upstream worker. The upstream
|
||||
worker may be an ingress worker or another intermediary worker. Intermediary
|
||||
workers also require inbound access from a downstream worker. The downstream
|
||||
worker may be an egress worker or another intermediary worker.
|
||||
|
||||
### Egress worker requirements
|
||||
|
||||
To proxy target connections, egress workers require outbound access to an
|
||||
upstream worker and outbound access to the destination host or service.
|
||||
|
||||
## Complete worker configuration
|
||||
|
||||
For the full set of worker parameters and a complete configuration example, refer to the [worker stanza](/boundary/docs/configuration/workers) documentation.
|
||||
|
||||
## Next steps
|
||||
|
||||
Refer to the following topics to configure multi-hop sessions:
|
||||
|
||||
- [Configure multi-hop sessions for Boundary Enterprise](/boundary/docs/workers/multi-hop/enterprise)
|
||||
- [Configure multi-hop sessions for HCP Boundary](/boundary/docs/workers/multi-hop/hcp)
|
||||
@@ -0,0 +1,197 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: Register workers
|
||||
description: >-
|
||||
Learn about authorizing workers to the controller. View a worker configuration example.
|
||||
---
|
||||
|
||||
# Register workers
|
||||
|
||||
Workers authenticate to Boundary using an activation token. They require an
|
||||
accessible directory defined by `auth_storage_path` for credential storage and
|
||||
rotation. Transport level communication between the worker & Controller is secured through PKI.
|
||||
|
||||
Example (not safe for production!):
|
||||
|
||||
```hcl
|
||||
worker {
|
||||
auth_storage_path="/var/lib/boundary"
|
||||
initial_upstreams = ["10.0.0.1"]
|
||||
}
|
||||
```
|
||||
|
||||
## Authorization methods
|
||||
|
||||
There are three mechanisms that can be used to initially register a worker to the cluster, Controller-Led, Worker-Led, and registration through an external KMS.
|
||||
|
||||
### Controller-led authorization flow
|
||||
|
||||
In this flow, the operator fetches an activation token from the controller's
|
||||
`workers:create:controller-led` action (on the CLI, this is via `boundary
|
||||
workers create controller-led`). That activation token is given to the worker
|
||||
via the `controller_generated_activation_token` parameter. This can be done
|
||||
either directly or via an env var or file by using `env://` or `file://` syntax:
|
||||
|
||||
```hcl
|
||||
worker {
|
||||
auth_storage_path="/var/lib/boundary"
|
||||
initial_upstreams = ["10.0.0.1"]
|
||||
controller_generated_activation_token = "neslat_........."
|
||||
# controller_generated_activation_token = "env://ACT_TOKEN"
|
||||
# controller_generated_activation_token = "file:///tmp/worker_act_token"
|
||||
}
|
||||
```
|
||||
|
||||
Once the worker starts, it reads this token and uses it to authorize to the
|
||||
cluster. Note that this token is one-time-use; it is safe to keep it here even
|
||||
after the worker has successfully authorized and authenticated, as it will be
|
||||
unusable at that point.
|
||||
|
||||
Note: If this value is not present at worker startup time and the worker is not
|
||||
authorized, it will print and write out suitable information for the worker-led
|
||||
flow, described below. If the worker-led flow has not been used to
|
||||
authorize the worker, and the controller-generated activation token is provided
|
||||
and the worker restarted, it will make use of it.
|
||||
|
||||
### Worker-led authorization flow
|
||||
|
||||
In this flow, the worker prints out an authorization request token to two
|
||||
places: the startup information printed to stdout, and a file called
|
||||
`auth_request_token` in the base of the configured `auth_storage_path`. This
|
||||
token can be submitted to a controller at the `workers:create:worker-led` path;
|
||||
on the CLI this would be via `boundary workers create worker-led
|
||||
-worker-generated-auth-token`. No values are needed in the configuration file.
|
||||
|
||||
### KMS-led authorization & authentication flow
|
||||
|
||||
In this flow, the worker authenticates upstream, either to a controller or worker, using a shared KMS provided by the customer. This mechanism auto-registers the worker in addition to authenticating it, and does not require on-disk storage for credentials since each time it connects, it re-authenticates using the trusted KMS.
|
||||
|
||||
Optionally with the Multi-Hop workers feature, trusted Workers can authenticate downstream nodes using a separate KMS.
|
||||
|
||||
Workers using KMS-led authorization require a `name` field. This specifies a unique name of this worker
|
||||
within the Boundary cluster and _must be unique across workers_. The `name`
|
||||
value can be:
|
||||
- a direct name string (must be all lowercase)
|
||||
- a reference to a file on disk (`file://`) from which the name is read
|
||||
- an env var (`env://`) from which the name is read.
|
||||
|
||||
Workers using KMS-led authorization accept an optional `description` field. The `description` value can
|
||||
be:
|
||||
- a direct description string
|
||||
- a reference to a file on disk (`file://`) from which the name is read
|
||||
- an env var (`env://`) from which the name is read.
|
||||
|
||||
```hcl
|
||||
worker {
|
||||
name = "example-worker"
|
||||
description = "An example worker"
|
||||
public_addr = "5.1.23.198"
|
||||
}
|
||||
```
|
||||
|
||||
Workers using the KMS authorization flow also require a KMS block designated for `worker-auth`. This is the KMS configuration for authentication between the workers and controllers and must be present. Example (not safe for production!):
|
||||
|
||||
```hcl
|
||||
kms "aead" {
|
||||
purpose = "worker-auth"
|
||||
aead_type = "aes-gcm"
|
||||
key = "X+IJMVT6OnsrIR6G/9OTcJSX+lM9FSPN"
|
||||
key_id = "global_worker-auth"
|
||||
}
|
||||
```
|
||||
|
||||
The upstream controller or worker must have a `kms` block that references the
|
||||
same key and purpose. If both a controller and worker are running as the same
|
||||
server process, only one stanza is needed.
|
||||
|
||||
For Multi-Hop workers, It is also possible to specify a `kms` block with the `downstream-worker-auth` purpose. If specified, this will be a separate KMS that can be used for authenticating new downstream nodes. Blocks with this purpose can be specified multiple times. This allows a single upstream node to authenticate with one key to its own upstream (via the `worker-auth` purpose) and then serve as an authenticating upstream to nodes
|
||||
across various networks, each with their own separate KMS system or key:
|
||||
|
||||
```hcl
|
||||
kms "aead" {
|
||||
purpose = "downstream-worker-auth"
|
||||
aead_type = "aes-gcm"
|
||||
key = "XthZVtFtBD1Bw1XwAWhZKVrIwRhR7HcZ"
|
||||
key_id = "iot-nodes-auth"
|
||||
}
|
||||
|
||||
kms "aead" {
|
||||
purpose = "downstream-worker-auth"
|
||||
aead_type = "aes-gcm"
|
||||
key = "OLFhJNbEb3umRjdhY15QKNEmNXokY1Iq"
|
||||
key_id = "production-nodes-auth"
|
||||
}
|
||||
```
|
||||
|
||||
In the examples above we are encoding key bytes directly in the configuration
|
||||
file. This is because we are using the `aead` method where you directly supply a
|
||||
key; in production you'd want to use a KMS such as AWS KMS, GCP CKMS, Azure
|
||||
KeyVault, or HashiCorp Vault. For a complete guide to all available KMS types,
|
||||
refer to [Data encryption in Boundary](/boundary/docs/secure/encryption/data-encryption).
|
||||
|
||||
## Complete configuration example
|
||||
|
||||
```hcl
|
||||
listener "tcp" {
|
||||
purpose = "proxy"
|
||||
tls_disable = true
|
||||
address = "127.0.0.1"
|
||||
}
|
||||
|
||||
worker {
|
||||
# Name attr must be unique across workers
|
||||
name = "demo-worker-1"
|
||||
description = "A default worker created for demonstration"
|
||||
|
||||
# Workers must be able to reach upstreams on :9201
|
||||
initial_upstreams = [
|
||||
"10.0.0.1",
|
||||
"10.0.0.2",
|
||||
"10.0.0.3",
|
||||
]
|
||||
|
||||
public_addr = "myhost.mycompany.com"
|
||||
|
||||
tags {
|
||||
type = ["prod", "webservers"]
|
||||
region = ["us-east-1"]
|
||||
}
|
||||
}
|
||||
|
||||
# must be same key as used on controller config
|
||||
kms "aead" {
|
||||
purpose = "worker-auth"
|
||||
aead_type = "aes-gcm"
|
||||
key = "X+IJMVT6OnsrIR6G/9OTcJSX+lM9FSPN"
|
||||
key_id = "global_worker-auth"
|
||||
}
|
||||
```
|
||||
|
||||
[`initial_upstreams`](/boundary/docs/configuration/workers#initial_upstreams)
|
||||
are used to connect to upstream Boundary clusters.
|
||||
|
||||
## Resources
|
||||
|
||||
For more on how `tags{}` in the above configuration are used to facilitate
|
||||
routing to the correct target, refer to [Route traffic through a worker](/boundary/docs/workers/worker-tags).
|
||||
|
||||
|
||||
## KMS configuration
|
||||
|
||||
When using Controller or Worker-led Authentication, a worker’s generated activation token is stored in clear-text on disk. Using an external KMS, a Workers' credentials can be encrypted by including an optional KMS stanza with the purpose `worker-auth-storage`.
|
||||
|
||||
Example (not safe for production!):
|
||||
```hcl
|
||||
kms "aead" {
|
||||
purpose = "worker-auth-storage"
|
||||
aead_type = "aes-gcm"
|
||||
key = "X+IJMVT6OnsrIR6G/9OTcJSX+lM9FSPN"
|
||||
key_id = "worker-auth-storage"
|
||||
}
|
||||
```
|
||||
|
||||
<Note>
|
||||
|
||||
The `name` and `description` fields are not valid configuration fields for workers that use worker-led or controller-led authorization. You can only set these fields through the API and they are only valid for workers that use the [KMS authorization method](/boundary/docs/workers/registration#kms-led-authorization-authentication-flow).
|
||||
|
||||
</Note>
|
||||
@@ -0,0 +1,395 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: Route traffic through a worker
|
||||
description: >-
|
||||
Learn about using worker tags to designate worker roles. Examples include serving specific regions or functions, such as credential stores or storage buckets.
|
||||
---
|
||||
|
||||
# Route traffic through a worker
|
||||
|
||||
This page describes how to use worker tags and filters to control which workers
|
||||
are allowed to handle a given resource. You can use filters to control traffic
|
||||
locally. As an example, you can use filters to ensure that traffic going into a
|
||||
public cloud is only handled by workers running within that same cloud.
|
||||
Tags can also be used determine which worker should perform session recording duties.
|
||||
|
||||
Refer to [Filtering and listing resources](/boundary/docs/filtering) for more information about Boundary's filter syntax and best practices.
|
||||
|
||||
You can configure worker tags using the worker config file, the Admin UI, the CLI, or the API. Select a tag below to view examples.
|
||||
|
||||
<Tip>
|
||||
|
||||
Terraform users should consider tagging workers using the worker config file in conjunction with the Boundary Terraform provider [worker resource](https://registry.terraform.io/providers/hashicorp/boundary/latest/docs/resources/worker) to register workers.
|
||||
|
||||
</Tip>
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="Worker config file" group="file">
|
||||
|
||||
You can tag workers with a set of key/value tags in their configuration file. The keys and values can be any lower-cased printable value. Each key can have more than one value:
|
||||
|
||||
```hcl
|
||||
worker {
|
||||
name = "web-prod-us-east-1"
|
||||
tags {
|
||||
region = ["us-east-1"]
|
||||
type = ["prod", "webservers"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
As HCL is JSON-compatible, this turns into an input JSON value of:
|
||||
|
||||
```json
|
||||
{
|
||||
"worker": {
|
||||
"name": "web-prod-us-east-1",
|
||||
"tags": {
|
||||
"region": ["us-east-1"],
|
||||
"type": ["prod", "webservers"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This is the canonical format, and maps closely to the filter structure.
|
||||
For compatibility with some other systems, you can specify the tags in a pure key=value style:
|
||||
|
||||
```hcl
|
||||
worker {
|
||||
name = "web-prod-us-east-1"
|
||||
tags = ["region=us-east-1", "type=prod", "type=webservers"]
|
||||
}
|
||||
```
|
||||
|
||||
In this format you cannot have an equal sign as part of the key.
|
||||
|
||||
The entire `tags` block or the keys' values can also point to an environment variable or filepath in the system, through the `env://` and `file://` URLs:
|
||||
|
||||
```hcl
|
||||
worker {
|
||||
name = "web-prod-us-east-1"
|
||||
tags = "env://BOUNDARY_ALL_WORKER_TAGS"
|
||||
}
|
||||
```
|
||||
|
||||
```hcl
|
||||
worker {
|
||||
name = "web-prod-us-east-1"
|
||||
tags {
|
||||
type = "env://BOUNDARY_WORKER_TYPE_TAGS"
|
||||
region = "file://config/worker/region_tags"
|
||||
usage = ["admin"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Notice that the syntax within the environment variable or file changes
|
||||
depending on how the configuration file is set:
|
||||
|
||||
- For setting the entire `tags` block, you must specify both the keys and values in JSON or HCL format:
|
||||
|
||||
```json
|
||||
{
|
||||
"region": ["us-east-1"],
|
||||
"type": ["prod", "webservers"]
|
||||
}
|
||||
```
|
||||
|
||||
```hcl
|
||||
region = ["us-east-1"]
|
||||
type = ["prod", "webservers"]
|
||||
```
|
||||
|
||||
- For setting the keys' values within the `tags` block, only a JSON
|
||||
array with the tags intended for the particular key is required:
|
||||
|
||||
```json
|
||||
["prod", "webservers"]
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab heading="UI" group="ui">
|
||||
|
||||
You can tag workers with a set of key/value API tags in the Boundary Admin UI. The keys and values can be any lower-cased printable value. Each key can have more than one value:
|
||||
|
||||

|
||||

|
||||
|
||||
In the image above, the tag type is `config`, which means the tags were defined in the worker config file. Config tags cannot be modified within the UI, you must update them in the config file itself.
|
||||
|
||||
Below is an example of this tag definition in a worker's `config.hcl` file:
|
||||
|
||||
```hcl
|
||||
worker {
|
||||
name = "web-prod-us-east-1"
|
||||
tags {
|
||||
type = ["s3", "worker"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
As HCL is JSON-compatible, this turns into an input JSON value of:
|
||||
|
||||
```json
|
||||
{
|
||||
"worker": {
|
||||
"name": "web-prod-us-east-1",
|
||||
"tags": {
|
||||
"type": ["s3", "worker"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can add API tags in the Admin UI. API tags are defined on the Boundary controller, and are not updated in the worker's config file.
|
||||
|
||||
To add an API tag:
|
||||
|
||||
1. Navigate to the worker's **Tags** tab.
|
||||
1. Click the **Manage** dropdown and then **Create New Tags**.
|
||||
1. Enter in the tag **Key** and **Value**, then click **Add**.
|
||||
1. Repeat this process for any additional tags. When finished, click **Save**.
|
||||
|
||||
A tag key can have multiple values associated with it. In the image below, the `type` key has three values. The `type=s3` and `type=worker` tags are both config tags, and the `type=aws` tag is an API tag.
|
||||
|
||||

|
||||

|
||||
|
||||
You can remove API tags using the Admin UI, CLI, or API.
|
||||
|
||||
</Tab>
|
||||
<Tab heading="CLI" group="cli">
|
||||
|
||||
You can tag workers with a set of key/value API tags using the CLI. The keys and values can be any lower-cased printable value. Each key can have more than one value:
|
||||
|
||||
```shell-session
|
||||
$ boundary workers read -id w_0BNbXUyy8D
|
||||
|
||||
Worker information:
|
||||
Active Connection Count: 0
|
||||
Address: openssh-server:9202
|
||||
Created Time: Tue, 16 Jul 2024 09:39:13 MDT
|
||||
ID: w_0BNbXUyy8D
|
||||
Last Status Time: 2024-07-19 23:37:33.331817 +0000 UTC
|
||||
Local Storage State: available
|
||||
Name: web-prod-us-east-1
|
||||
Release Version: Boundary v0.16.2
|
||||
Type: pki
|
||||
Updated Time: Fri, 19 Jul 2024 17:37:33 MDT
|
||||
Version: 2
|
||||
|
||||
Scope:
|
||||
ID: global
|
||||
Name: global
|
||||
Type: global
|
||||
|
||||
Tags:
|
||||
Configuration:
|
||||
type: ["s3" "worker"]
|
||||
Canonical:
|
||||
type: ["s3" "worker"]
|
||||
|
||||
Authorized Actions:
|
||||
read
|
||||
update
|
||||
delete
|
||||
add-worker-tags
|
||||
set-worker-tags
|
||||
remove-worker-tags
|
||||
no-op
|
||||
```
|
||||
|
||||
In the output above, the tags listed as `Configuration`, were defined in the worker config file. Config tags cannot be modified using the CLI, you must update them in the config file itself.
|
||||
|
||||
Below is an example of this tag definition:
|
||||
|
||||
```hcl
|
||||
worker {
|
||||
name = "web-prod-us-east-1"
|
||||
tags {
|
||||
type = ["s3", "worker"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The `Canonical` tags in the output show all tags associated with a worker, including configuration tags and API tags.
|
||||
|
||||
You can add API tags using the Admin UI, CLI, or API. API tags are defined on the Boundary controller, and are not updated in the worker's config file.
|
||||
|
||||
You can add API tags using the [boundary workers add-worker-tags](/boundary/docs/commands/workers/add-worker-tags) CLI command:
|
||||
|
||||
```shell-session
|
||||
$ boundary workers add-worker-tags -id w_0BNbXUyy8D -tag "region=useast1"
|
||||
|
||||
Worker information:
|
||||
Active Connection Count: 0
|
||||
Address: openssh-server:9202
|
||||
Created Time: Tue, 16 Jul 2024 09:39:13 MDT
|
||||
ID: w_0BNbXUyy8D
|
||||
Last Status Time: 2024-07-19 23:37:33.331817 +0000 UTC
|
||||
Local Storage State: available
|
||||
Name: web-prod-us-east-1
|
||||
Release Version: Boundary v0.16.2
|
||||
Type: pki
|
||||
Updated Time: Mon, 22 Jul 2024 14:12:45 MDT
|
||||
Version: 3
|
||||
|
||||
Scope:
|
||||
ID: global
|
||||
Name: global
|
||||
Type: global
|
||||
|
||||
Tags:
|
||||
Configuration:
|
||||
type: ["s3" "worker"]
|
||||
Api:
|
||||
region: ["useast1"]
|
||||
Canonical:
|
||||
region: ["useast1"]
|
||||
type: ["s3" "worker"]
|
||||
|
||||
Authorized Actions:
|
||||
no-op
|
||||
read
|
||||
update
|
||||
delete
|
||||
add-worker-tags
|
||||
set-worker-tags
|
||||
remove-worker-tags
|
||||
```
|
||||
|
||||
Notice the worker now has both `Configuration` and `API` tags listed, and the summation of both sets is listed under the `Canonical` tags.
|
||||
|
||||
A tag key can have multiple values associated with it. To update existing API tags using the CLI, you must use the [boundary workers set-worker-tags](/boundary/docs/commands/workers/set-worker-tags) command.
|
||||
|
||||
In the example above, the `type` key has two values, `s3` and `worker`. The `type=s3` and `type=worker` tags are both config tags, and the `region=useast1` tag is an API tag.
|
||||
|
||||
To add an updated API tag with a key of type, all the tags must be set:
|
||||
|
||||
```shell-session
|
||||
$ boundary workers set-worker-tags -id w_0BNbXUyy8D -tag "type=aws" -tag "region=useast1"
|
||||
|
||||
Worker information:
|
||||
Active Connection Count: 0
|
||||
Address: openssh-server:9202
|
||||
Created Time: Tue, 16 Jul 2024 09:39:13 MDT
|
||||
ID: w_0BNbXUyy8D
|
||||
Last Status Time: 2024-07-19 23:37:33.331817 +0000 UTC
|
||||
Local Storage State: available
|
||||
Name: web-prod-us-east-1
|
||||
Release Version: Boundary v0.16.2
|
||||
Type: pki
|
||||
Updated Time: Mon, 22 Jul 2024 14:12:45 MDT
|
||||
Version: 3
|
||||
|
||||
Scope:
|
||||
ID: global
|
||||
Name: global
|
||||
Type: global
|
||||
|
||||
Tags:
|
||||
Configuration:
|
||||
type: ["s3" "worker"]
|
||||
Api:
|
||||
region: ["useast1"]
|
||||
type: ["aws"]
|
||||
Canonical:
|
||||
region: ["useast1"]
|
||||
type: ["aws" "s3" "worker"]
|
||||
|
||||
Authorized Actions:
|
||||
read
|
||||
update
|
||||
delete
|
||||
add-worker-tags
|
||||
set-worker-tags
|
||||
remove-worker-tags
|
||||
no-op
|
||||
```
|
||||
|
||||
Now the worker includes both config tags and API tags with a `type` key. The updated `Canonical` tags in the output show all tags associated with a worker, including configuration tags and API tags.
|
||||
|
||||
You can remove API tags using the Admin UI, CLI, or API. To remove an API tag using [boundary workers remove-worker-tags](/boundary/docs/commands/workers/remove-worker-tags):
|
||||
|
||||
```shell-session
|
||||
$ boundary workers remove-worker-tags -id w_0BNbXUyy8D -tag "region=useast1"
|
||||
|
||||
Worker information:
|
||||
Active Connection Count: 0
|
||||
Address: openssh-server:9202
|
||||
Created Time: Tue, 16 Jul 2024 09:39:13 MDT
|
||||
ID: w_0BNbXUyy8D
|
||||
Last Status Time: 2024-07-19 23:37:33.331817 +0000 UTC
|
||||
Local Storage State: available
|
||||
Name: web-prod-us-east-1
|
||||
Release Version: Boundary v0.16.2
|
||||
Type: pki
|
||||
Updated Time: Mon, 22 Jul 2024 14:12:45 MDT
|
||||
Version: 3
|
||||
|
||||
Scope:
|
||||
ID: global
|
||||
Name: global
|
||||
Type: global
|
||||
|
||||
Tags:
|
||||
Configuration:
|
||||
type: ["s3" "worker"]
|
||||
Api:
|
||||
type: ["aws"]
|
||||
Canonical:
|
||||
type: ["aws" "s3" "worker"]
|
||||
|
||||
Authorized Actions:
|
||||
read
|
||||
update
|
||||
delete
|
||||
add-worker-tags
|
||||
set-worker-tags
|
||||
remove-worker-tags
|
||||
no-op
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Filter workers using tags
|
||||
|
||||
As filters operate on JSON Pointer selectors, the values that are input into the
|
||||
filter come from the JSON representation of the values in the configuration file
|
||||
nested under `tags` and include a `name` value:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "web-prod-us-east-1",
|
||||
"tags": {
|
||||
"region": ["us-east-1"],
|
||||
"type": ["production", "webservers"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<Warning>
|
||||
|
||||
If an expression fails due to a key not being found within the input data,
|
||||
the worker is not included in the final set. You should ensure that all workers that should match a given filter are populated with tags referenced in the filter string. It is not possible to distinguish between a worker that is not included due to the expression itself and a worker that did not have correct tags.
|
||||
|
||||
</Warning>
|
||||
|
||||
## Filter examples
|
||||
|
||||
Following are some examples of using these values in filters that can be applied to targets, Vault credential stores, or storage buckets:
|
||||
|
||||
- Name regex: `"/name" matches "web-prod-us-east-[12]"`, which would
|
||||
match workers whose names are `web-prod-us-east-1` or `web-prod-us-east-2`
|
||||
|
||||
- Region: `"us-east-1" in "/tags/region"`.
|
||||
|
||||
- Grouping: `("us-east-1" in "/tags/region" and "/name" == "web-prod-us-east-1") or "webservers" in "/tags/type"`
|
||||
|
||||
Each tag can have multiple values, so you must use the `in` operator to match values. If you know that you have only one value, an equivalent would be `"/tags/key/0" == "value"`.
|
||||
|
||||
## Next steps
|
||||
|
||||
You can [configure a worker filter](/boundary/docs/workers/filters) to control which workers are allowed to manage a given session, act as a Vault credential store, or store session recordings.
|
||||
Reference in new issue
Block a user