implementing-zero-trust-with-hashicorp-boundary
Implement HashiCorp Boundary for identity-aware zero trust infrastructure access management with dynamic credential brokering, session recording, and Vault integration.
What this skill does
# Implementing Zero Trust with HashiCorp Boundary
## Overview
HashiCorp Boundary is an identity-aware proxy that provides secure, zero trust access to infrastructure resources without traditional VPNs or direct network access. Boundary operates on a default-deny model -- users start with no access and must be explicitly granted permissions for specific resources. When integrated with HashiCorp Vault, Boundary can dynamically broker credentials, ensuring users never see or manage underlying secrets. This eliminates credential sprawl and enables just-in-time access with automatic credential revocation when sessions end. Boundary supports session recording for audit compliance, OIDC/LDAP authentication, and manages access through a hierarchical scope model of organizations and projects.
## When to Use
- When deploying or configuring implementing zero trust with hashicorp boundary capabilities in your environment
- When establishing security controls aligned to compliance requirements
- When building or improving security architecture for this domain
- When conducting security assessments that require this implementation
## Prerequisites
- HashiCorp Boundary server (self-hosted or HCP Boundary)
- HashiCorp Vault (for credential brokering)
- Identity provider supporting OIDC (Okta, Azure AD, Auth0)
- PostgreSQL database for Boundary's backend
- TLS certificates for secure communication
- Understanding of PKI and X.509 certificate management
## Architecture
```
Identity Provider (OIDC)
|
Authentication
|
+--------+--------+
| Boundary |
| Controller |
| (Control Plane)|
+--------+--------+
|
+------------+------------+
| |
+--------+--------+ +--------+--------+
| Boundary Worker | | Boundary Worker |
| (Data Plane) | | (Data Plane) |
+--------+--------+ +--------+--------+
| |
+--------+--------+ +--------+--------+
| Target Hosts | | Target Hosts |
| (SSH, RDP, | | (Databases, |
| K8s, HTTP) | | APIs) |
+-----------------+ +-----------------+
Vault (Credential Brokering)
- Dynamic database credentials
- SSH certificate signing
- Credential libraries
```
## Installation and Configuration
### Boundary Server Setup
```bash
# Install Boundary
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update && sudo apt-get install boundary
# Initialize the database
boundary database init \
-config=/etc/boundary/controller.hcl
# Start the controller
boundary server -config=/etc/boundary/controller.hcl
```
### Controller Configuration
```hcl
# /etc/boundary/controller.hcl
controller {
name = "boundary-controller-1"
description = "Primary Boundary Controller"
database {
url = "postgresql://boundary:password@localhost:5432/boundary?sslmode=require"
}
public_cluster_addr = "boundary.example.com"
}
listener "tcp" {
address = "0.0.0.0:9200"
purpose = "api"
tls_cert_file = "/etc/boundary/tls/cert.pem"
tls_key_file = "/etc/boundary/tls/key.pem"
}
listener "tcp" {
address = "0.0.0.0:9201"
purpose = "cluster"
tls_cert_file = "/etc/boundary/tls/cert.pem"
tls_key_file = "/etc/boundary/tls/key.pem"
}
kms "aead" {
purpose = "root"
aead_type = "aes-gcm"
key = "sP1fnF5Xz85RrXM..." # Use Vault Transit in production
key_id = "global_root"
}
kms "aead" {
purpose = "worker-auth"
aead_type = "aes-gcm"
key = "8fZBjCUfN0TzjEG..."
key_id = "global_worker-auth"
}
kms "aead" {
purpose = "recovery"
aead_type = "aes-gcm"
key = "8fZBjCUfN0TzjEG..."
key_id = "global_recovery"
}
```
### Worker Configuration
```hcl
# /etc/boundary/worker.hcl
worker {
name = "boundary-worker-1"
description = "Worker in production VPC"
public_addr = "worker1.example.com"
controllers = [
"boundary.example.com:9201"
]
tags {
type = ["production"]
region = ["us-east-1"]
}
}
listener "tcp" {
address = "0.0.0.0:9202"
purpose = "proxy"
}
kms "aead" {
purpose = "worker-auth"
aead_type = "aes-gcm"
key = "8fZBjCUfN0TzjEG..."
key_id = "global_worker-auth"
}
```
## Terraform Configuration
### Scope and Auth Configuration
```hcl
# main.tf - Boundary resources via Terraform
terraform {
required_providers {
boundary = {
source = "hashicorp/boundary"
version = "~> 1.1"
}
}
}
provider "boundary" {
addr = "https://boundary.example.com:9200"
recovery_kms_hcl = file("recovery_kms.hcl")
}
# Organization scope
resource "boundary_scope" "org" {
scope_id = "global"
name = "production-org"
description = "Production organization scope"
auto_create_admin_role = true
auto_create_default_role = true
}
# Project scope
resource "boundary_scope" "production" {
name = "production"
description = "Production infrastructure project"
scope_id = boundary_scope.org.id
auto_create_admin_role = true
auto_create_default_role = true
}
# OIDC Auth Method (Okta example)
resource "boundary_auth_method_oidc" "okta" {
scope_id = boundary_scope.org.id
name = "okta"
description = "Okta OIDC authentication"
issuer = "https://company.okta.com/oauth2/default"
client_id = var.okta_client_id
client_secret = var.okta_client_secret
signing_algorithms = ["RS256"]
api_url_prefix = "https://boundary.example.com:9200"
claims_scopes = ["groups"]
account_claim_maps = ["oid=sub"]
is_primary_for_scope = true
}
# Managed group for auto-assignment
resource "boundary_managed_group" "sre_team" {
auth_method_id = boundary_auth_method_oidc.okta.id
name = "sre-team"
description = "SRE team members from Okta"
filter = "\"sre-team\" in \"/token/groups\""
}
resource "boundary_managed_group" "dev_team" {
auth_method_id = boundary_auth_method_oidc.okta.id
name = "dev-team"
description = "Development team from Okta"
filter = "\"dev-team\" in \"/token/groups\""
}
```
### Host Catalogs and Targets
```hcl
# Static host catalog for known infrastructure
resource "boundary_host_catalog_static" "production_servers" {
name = "production-servers"
scope_id = boundary_scope.production.id
}
resource "boundary_host_static" "web_server" {
name = "web-server-1"
host_catalog_id = boundary_host_catalog_static.production_servers.id
address = "10.0.1.10"
}
resource "boundary_host_static" "db_server" {
name = "db-server-1"
host_catalog_id = boundary_host_catalog_static.production_servers.id
address = "10.0.2.20"
}
# Host set grouping
resource "boundary_host_set_static" "web_servers" {
name = "web-servers"
host_catalog_id = boundary_host_catalog_static.production_servers.id
host_ids = [boundary_host_static.web_server.id]
}
resource "boundary_host_set_static" "db_servers" {
name = "database-servers"
host_catalog_id = boundary_host_catalog_static.production_servers.id
host_ids = [boundary_host_static.db_server.id]
}
# SSH target
resource "boundary_target" "ssh_production" {
name = "ssh-production-servers"
description = "SSH access to production servers"
type = "ssh"
scope_id = boundary_scope.production.id
default_port = 22
host_source_ids = [
boundary_host_set_static.web_servers.id
]
session_max_secoRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.