[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M751PAVDBXGTS19MC2XKZKJ3":3,"skill-same:01M751PAVDBXGTS19MC2XKZKJ3":92},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":38,"commitSha":39,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":6,"updatedAt":43,"install":44,"resources":57},"01M751PAVDBXGTS19MC2XKZKJ3","implementing-zero-trust-with-hashicorp-boundary",null,"Implement HashiCorp Boundary for identity-aware zero trust infrastructure access management with dynamic credential brokering, session recording, and Vault integration.","SamuelChien\u002Fmega-skills-collection","SamuelChien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4652114?v=4","01M74KK34WVHA0P5ZYSJRDDFMG","Samuel Chien","01M74KK35FQN1N9VZ9EPTH3P2S",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-zero-trust-with-hashicorp-boundary\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-zero-trust-with-hashicorp-boundary\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: implementing-zero-trust-with-hashicorp-boundary\ndescription: Implement HashiCorp Boundary for identity-aware zero trust infrastructure access management with dynamic credential brokering, session recording, and Vault integration.\ndomain: cybersecurity\nsubdomain: zero-trust-architecture\ntags: [zero-trust, hashicorp, boundary, privileged-access, vault, identity-aware-proxy, session-recording, just-in-time-access]\nversion: \"1.0\"\nauthor: mahipal\nlicense: Apache-2.0\n---\n\n# Implementing Zero Trust with HashiCorp Boundary\n\n## Overview\n\nHashiCorp 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\u002FLDAP authentication, and manages access through a hierarchical scope model of organizations and projects.\n\n\n## When to Use\n\n- When deploying or configuring implementing zero trust with hashicorp boundary capabilities in your environment\n- When establishing security controls aligned to compliance requirements\n- When building or improving security architecture for this domain\n- When conducting security assessments that require this implementation\n\n## Prerequisites\n\n- HashiCorp Boundary server (self-hosted or HCP Boundary)\n- HashiCorp Vault (for credential brokering)\n- Identity provider supporting OIDC (Okta, Azure AD, Auth0)\n- PostgreSQL database for Boundary's backend\n- TLS certificates for secure communication\n- Understanding of PKI and X.509 certificate management\n\n## Architecture\n\n```\n                    Identity Provider (OIDC)\n                           |\n                    Authentication\n                           |\n                  +--------+--------+\n                  |   Boundary      |\n                  |   Controller    |\n                  |  (Control Plane)|\n                  +--------+--------+\n                           |\n              +------------+------------+\n              |                         |\n     +--------+--------+      +--------+--------+\n     | Boundary Worker |      | Boundary Worker |\n     | (Data Plane)    |      | (Data Plane)    |\n     +--------+--------+      +--------+--------+\n              |                         |\n     +--------+--------+      +--------+--------+\n     |  Target Hosts   |      |  Target Hosts   |\n     |  (SSH, RDP,     |      |  (Databases,    |\n     |   K8s, HTTP)    |      |   APIs)         |\n     +-----------------+      +-----------------+\n\n     Vault (Credential Brokering)\n     - Dynamic database credentials\n     - SSH certificate signing\n     - Credential libraries\n```\n\n## Installation and Configuration\n\n### Boundary Server Setup\n\n```bash\n# Install Boundary\ncurl -fsSL https:\u002F\u002Fapt.releases.hashicorp.com\u002Fgpg | sudo apt-key add -\nsudo apt-add-repository \"deb [arch=amd64] https:\u002F\u002Fapt.releases.hashicorp.com $(lsb_release -cs) main\"\nsudo apt-get update && sudo apt-get install boundary\n\n# Initialize the database\nboundary database init \\\n  -config=\u002Fetc\u002Fboundary\u002Fcontroller.hcl\n\n# Start the controller\nboundary server -config=\u002Fetc\u002Fboundary\u002Fcontroller.hcl\n```\n\n### Controller Configuration\n\n```hcl\n# \u002Fetc\u002Fboundary\u002Fcontroller.hcl\ncontroller {\n  name = \"boundary-controller-1\"\n  description = \"Primary Boundary Controller\"\n  database {\n    url = \"postgresql:\u002F\u002Fboundary:password@localhost:5432\u002Fboundary?sslmode=require\"\n  }\n  public_cluster_addr = \"boundary.example.com\"\n}\n\nlistener \"tcp\" {\n  address = \"0.0.0.0:9200\"\n  purpose = \"api\"\n  tls_cert_file = \"\u002Fetc\u002Fboundary\u002Ftls\u002Fcert.pem\"\n  tls_key_file  = \"\u002Fetc\u002Fboundary\u002Ftls\u002Fkey.pem\"\n}\n\nlistener \"tcp\" {\n  address = \"0.0.0.0:9201\"\n  purpose = \"cluster\"\n  tls_cert_file = \"\u002Fetc\u002Fboundary\u002Ftls\u002Fcert.pem\"\n  tls_key_file  = \"\u002Fetc\u002Fboundary\u002Ftls\u002Fkey.pem\"\n}\n\nkms \"aead\" {\n  purpose = \"root\"\n  aead_type = \"aes-gcm\"\n  key = \"sP1fnF5Xz85RrXM...\"  # Use Vault Transit in production\n  key_id = \"global_root\"\n}\n\nkms \"aead\" {\n  purpose = \"worker-auth\"\n  aead_type = \"aes-gcm\"\n  key = \"8fZBjCUfN0TzjEG...\"\n  key_id = \"global_worker-auth\"\n}\n\nkms \"aead\" {\n  purpose = \"recovery\"\n  aead_type = \"aes-gcm\"\n  key = \"8fZBjCUfN0TzjEG...\"\n  key_id = \"global_recovery\"\n}\n```\n\n### Worker Configuration\n\n```hcl\n# \u002Fetc\u002Fboundary\u002Fworker.hcl\nworker {\n  name = \"boundary-worker-1\"\n  description = \"Worker in production VPC\"\n  public_addr = \"worker1.example.com\"\n\n  controllers = [\n    \"boundary.example.com:9201\"\n  ]\n\n  tags {\n    type = [\"production\"]\n    region = [\"us-east-1\"]\n  }\n}\n\nlistener \"tcp\" {\n  address = \"0.0.0.0:9202\"\n  purpose = \"proxy\"\n}\n\nkms \"aead\" {\n  purpose = \"worker-auth\"\n  aead_type = \"aes-gcm\"\n  key = \"8fZBjCUfN0TzjEG...\"\n  key_id = \"global_worker-auth\"\n}\n```\n\n## Terraform Configuration\n\n### Scope and Auth Configuration\n\n```hcl\n# main.tf - Boundary resources via Terraform\nterraform {\n  required_providers {\n    boundary = {\n      source  = \"hashicorp\u002Fboundary\"\n      version = \"~> 1.1\"\n    }\n  }\n}\n\nprovider \"boundary\" {\n  addr             = \"https:\u002F\u002Fboundary.example.com:9200\"\n  recovery_kms_hcl = file(\"recovery_kms.hcl\")\n}\n\n# Organization scope\nresource \"boundary_scope\" \"org\" {\n  scope_id                 = \"global\"\n  name                     = \"production-org\"\n  description              = \"Production organization scope\"\n  auto_create_admin_role   = true\n  auto_create_default_role = true\n}\n\n# Project scope\nresource \"boundary_scope\" \"production\" {\n  name                     = \"production\"\n  description              = \"Production infrastructure project\"\n  scope_id                 = boundary_scope.org.id\n  auto_create_admin_role   = true\n  auto_create_default_role = true\n}\n\n# OIDC Auth Method (Okta example)\nresource \"boundary_auth_method_oidc\" \"okta\" {\n  scope_id               = boundary_scope.org.id\n  name                   = \"okta\"\n  description            = \"Okta OIDC authentication\"\n  issuer                 = \"https:\u002F\u002Fcompany.okta.com\u002Foauth2\u002Fdefault\"\n  client_id              = var.okta_client_id\n  client_secret          = var.okta_client_secret\n  signing_algorithms     = [\"RS256\"]\n  api_url_prefix         = \"https:\u002F\u002Fboundary.example.com:9200\"\n  claims_scopes          = [\"groups\"]\n  account_claim_maps     = [\"oid=sub\"]\n  is_primary_for_scope   = true\n}\n\n# Managed group for auto-assignment\nresource \"boundary_managed_group\" \"sre_team\" {\n  auth_method_id = boundary_auth_method_oidc.okta.id\n  name           = \"sre-team\"\n  description    = \"SRE team members from Okta\"\n  filter         = \"\\\"sre-team\\\" in \\\"\u002Ftoken\u002Fgroups\\\"\"\n}\n\nresource \"boundary_managed_group\" \"dev_team\" {\n  auth_method_id = boundary_auth_method_oidc.okta.id\n  name           = \"dev-team\"\n  description    = \"Development team from Okta\"\n  filter         = \"\\\"dev-team\\\" in \\\"\u002Ftoken\u002Fgroups\\\"\"\n}\n```\n\n### Host Catalogs and Targets\n\n```hcl\n# Static host catalog for known infrastructure\nresource \"boundary_host_catalog_static\" \"production_servers\" {\n  name     = \"production-servers\"\n  scope_id = boundary_scope.production.id\n}\n\nresource \"boundary_host_static\" \"web_server\" {\n  name            = \"web-server-1\"\n  host_catalog_id = boundary_host_catalog_static.production_servers.id\n  address         = \"10.0.1.10\"\n}\n\nresource \"boundary_host_static\" \"db_server\" {\n  name            = \"db-server-1\"\n  host_catalog_id = boundary_host_catalog_static.production_servers.id\n  address         = \"10.0.2.20\"\n}\n\n# Host set grouping\nresource \"boundary_host_set_static\" \"web_servers\" {\n  name            = \"web-servers\"\n  host_catalog_id = boundary_host_catalog_static.production_servers.id\n  host_ids        = [boundary_host_static.web_server.id]\n}\n\nresource \"boundary_host_set_static\" \"db_servers\" {\n  name            = \"database-servers\"\n  host_catalog_id = boundary_host_catalog_static.production_servers.id\n  host_ids        = [boundary_host_static.db_server.id]\n}\n\n# SSH target\nresource \"boundary_target\" \"ssh_production\" {\n  name         = \"ssh-production-servers\"\n  description  = \"SSH access to production servers\"\n  type         = \"ssh\"\n  scope_id     = boundary_scope.production.id\n  default_port = 22\n\n  host_source_ids = [\n    boundary_host_set_static.web_servers.id\n  ]\n\n  session_max_seconds          = 3600  # 1 hour max session\n  session_connection_limit     = 1\n  enable_session_recording     = true\n  storage_bucket_id            = boundary_storage_bucket.sessions.id\n\n  injected_application_credential_source_ids = [\n    boundary_credential_library_vault_ssh_certificate.ssh_cert.id\n  ]\n}\n\n# Database target with Vault credential brokering\nresource \"boundary_target\" \"postgres_production\" {\n  name         = \"postgres-production\"\n  description  = \"PostgreSQL production database\"\n  type         = \"tcp\"\n  scope_id     = boundary_scope.production.id\n  default_port = 5432\n\n  host_source_ids = [\n    boundary_host_set_static.db_servers.id\n  ]\n\n  session_max_seconds      = 1800  # 30 min max\n  session_connection_limit = 5\n\n  brokered_credential_source_ids = [\n    boundary_credential_library_vault.postgres_creds.id\n  ]\n}\n```\n\n### Vault Integration for Credential Brokering\n\n```hcl\n# Vault credential store\nresource \"boundary_credential_store_vault\" \"vault\" {\n  name        = \"vault-store\"\n  scope_id    = boundary_scope.production.id\n  address     = \"https:\u002F\u002Fvault.example.com:8200\"\n  token       = var.vault_token\n  namespace   = \"production\"\n}\n\n# Dynamic database credentials from Vault\nresource \"boundary_credential_library_vault\" \"postgres_creds\" {\n  name                = \"postgres-dynamic-creds\"\n  credential_store_id = boundary_credential_store_vault.vault.id\n  path                = \"database\u002Fcreds\u002Freadonly\"\n  http_method         = \"GET\"\n  credential_type     = \"username_password\"\n}\n\n# SSH certificate signing via Vault\nresource \"boundary_credential_library_vault_ssh_certificate\" \"ssh_cert\" {\n  name                = \"ssh-certificate\"\n  credential_store_id = boundary_credential_store_vault.vault.id\n  path                = \"ssh-client-signer\u002Fsign\u002Fproduction\"\n  username            = \"admin\"\n  key_type            = \"ed25519\"\n  key_bits            = 256\n  extensions = {\n    \"permit-pty\" = \"\"\n  }\n}\n\n# Session recording storage\nresource \"boundary_storage_bucket\" \"sessions\" {\n  name        = \"session-recordings\"\n  scope_id    = \"global\"\n  plugin_name = \"aws\"\n  bucket_name = \"boundary-session-recordings\"\n  attributes_json = jsonencode({\n    \"region\"                      = \"us-east-1\"\n    \"disable_credential_rotation\" = true\n  })\n  secrets_json = jsonencode({\n    \"access_key_id\"     = var.aws_access_key\n    \"secret_access_key\" = var.aws_secret_key\n  })\n}\n```\n\n### Role-Based Access Control\n\n```hcl\n# SRE team role - full production access\nresource \"boundary_role\" \"sre_production\" {\n  name          = \"sre-production-access\"\n  scope_id      = boundary_scope.production.id\n  grant_strings = [\n    \"ids=*;type=target;actions=list,read,authorize-session\",\n    \"ids=*;type=session;actions=list,read,cancel\",\n    \"ids=*;type=host;actions=list,read\",\n  ]\n  principal_ids = [\n    boundary_managed_group.sre_team.id\n  ]\n}\n\n# Dev team role - limited access\nresource \"boundary_role\" \"dev_staging\" {\n  name          = \"dev-staging-access\"\n  scope_id      = boundary_scope.production.id\n  grant_strings = [\n    \"ids=${boundary_target.ssh_production.id};type=target;actions=read,authorize-session\",\n  ]\n  principal_ids = [\n    boundary_managed_group.dev_team.id\n  ]\n}\n```\n\n## Connecting to Targets\n\n```bash\n# Authenticate via OIDC\nboundary authenticate oidc \\\n  -auth-method-id amoidc_xxxxx\n\n# List available targets\nboundary targets list -scope-id p_xxxxx\n\n# Connect to SSH target (credentials injected by Vault)\nboundary connect ssh \\\n  -target-id ttcp_xxxxx\n\n# Connect to database (credentials brokered by Vault)\nboundary connect postgres \\\n  -target-id ttcp_xxxxx \\\n  -dbname production\n\n# Use Boundary Desktop client for GUI access\n# Download from: https:\u002F\u002Fdeveloper.hashicorp.com\u002Fboundary\u002Finstall\n```\n\n## Session Recording and Auditing\n\n```bash\n# List session recordings\nboundary session-recordings list \\\n  -scope-id p_xxxxx\n\n# Download session recording for review\nboundary session-recordings download \\\n  -id sr_xxxxx \\\n  -output recording.cast\n\n# Play back with asciinema\nasciinema play recording.cast\n```\n\n## Dynamic Host Catalogs\n\n```hcl\n# AWS dynamic host catalog - auto-discovers EC2 instances\nresource \"boundary_host_catalog_plugin\" \"aws_catalog\" {\n  scope_id    = boundary_scope.production.id\n  name        = \"aws-production\"\n  plugin_name = \"aws\"\n\n  attributes_json = jsonencode({\n    \"region\"                      = \"us-east-1\"\n    \"disable_credential_rotation\" = true\n  })\n\n  secrets_json = jsonencode({\n    \"access_key_id\"     = var.aws_access_key\n    \"secret_access_key\" = var.aws_secret_key\n  })\n}\n\nresource \"boundary_host_set_plugin\" \"web_tier\" {\n  host_catalog_id = boundary_host_catalog_plugin.aws_catalog.id\n  name            = \"web-tier\"\n  attributes_json = jsonencode({\n    \"filters\" = [\n      \"tag:Environment=production\",\n      \"tag:Tier=web\"\n    ]\n  })\n}\n```\n\n## Security Best Practices\n\n1. **Use Vault KMS for key management** instead of static AEAD keys in production\n2. **Enable session recording** for all privileged access targets\n3. **Set session time limits** appropriate to the resource sensitivity\n4. **Use OIDC managed groups** for automatic role assignment from IdP\n5. **Deploy multi-hop workers** for accessing resources across network boundaries\n6. **Rotate Vault tokens** used by credential stores regularly\n7. **Enable audit logging** on both controllers and workers\n8. **Use credential injection** (SSH certificates) over brokering when possible\n9. **Implement least-privilege grants** -- avoid wildcard permissions\n10. **Review session recordings** regularly for compliance and incident response\n\n## References\n\n- [HashiCorp Boundary Documentation](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fboundary\u002Fdocs)\n- [Boundary and Vault Integration](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fboundary\u002Fdocs\u002Fconcepts\u002Fcredential-management)\n- [From Zero to Hero with Boundary](https:\u002F\u002Fwww.hashicorp.com\u002Fen\u002Fblog\u002Ffrom-zero-to-hero-hashicorp-boundary)\n- [Boundary Terraform Provider](https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Fboundary\u002Flatest\u002Fdocs)\n- [Zero Trust with Vault, Consul, and Boundary](https:\u002F\u002Fwww.hashicorp.com\u002Fen\u002Fresources\u002Fzero-trust-security-with-hashicorp-vault-consul-and-boundary)\n","# Implementing Zero Trust with HashiCorp Boundary\n\n## Overview\n\nHashiCorp 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\u002FLDAP authentication, and manages access through a hierarchical scope model of organizations and projects.\n\n\n## When to Use\n\n- When deploying or configuring implementing zero trust with hashicorp boundary capabilities in your environment\n- When establishing security controls aligned to compliance requirements\n- When building or improving security architecture for this domain\n- When conducting security assessments that require this implementation\n\n## Prerequisites\n\n- HashiCorp Boundary server (self-hosted or HCP Boundary)\n- HashiCorp Vault (for credential brokering)\n- Identity provider supporting OIDC (Okta, Azure AD, Auth0)\n- PostgreSQL database for Boundary's backend\n- TLS certificates for secure communication\n- Understanding of PKI and X.509 certificate management\n\n## Architecture\n\n```\n                    Identity Provider (OIDC)\n                           |\n                    Authentication\n                           |\n                  +--------+--------+\n                  |   Boundary      |\n                  |   Controller    |\n                  |  (Control Plane)|\n                  +--------+--------+\n                           |\n              +------------+------------+\n              |                         |\n     +--------+--------+      +--------+--------+\n     | Boundary Worker |      | Boundary Worker |\n     | (Data Plane)    |      | (Data Plane)    |\n     +--------+--------+      +--------+--------+\n              |                         |\n     +--------+--------+      +--------+--------+\n     |  Target Hosts   |      |  Target Hosts   |\n     |  (SSH, RDP,     |      |  (Databases,    |\n     |   K8s, HTTP)    |      |   APIs)         |\n     +-----------------+      +-----------------+\n\n     Vault (Credential Brokering)\n     - Dynamic database credentials\n     - SSH certificate signing\n     - Credential libraries\n```\n\n## Installation and Configuration\n\n### Boundary Server Setup\n\n```bash\n# Install Boundary\ncurl -fsSL https:\u002F\u002Fapt.releases.hashicorp.com\u002Fgpg | sudo apt-key add -\nsudo apt-add-repository \"deb [arch=amd64] https:\u002F\u002Fapt.releases.hashicorp.com $(lsb_release -cs) main\"\nsudo apt-get update && sudo apt-get install boundary\n\n# Initialize the database\nboundary database init \\\n  -config=\u002Fetc\u002Fboundary\u002Fcontroller.hcl\n\n# Start the controller\nboundary server -config=\u002Fetc\u002Fboundary\u002Fcontroller.hcl\n```\n\n### Controller Configuration\n\n```hcl\n# \u002Fetc\u002Fboundary\u002Fcontroller.hcl\ncontroller {\n  name = \"boundary-controller-1\"\n  description = \"Primary Boundary Controller\"\n  database {\n    url = \"postgresql:\u002F\u002Fboundary:password@localhost:5432\u002Fboundary?sslmode=require\"\n  }\n  public_cluster_addr = \"boundary.example.com\"\n}\n\nlistener \"tcp\" {\n  address = \"0.0.0.0:9200\"\n  purpose = \"api\"\n  tls_cert_file = \"\u002Fetc\u002Fboundary\u002Ftls\u002Fcert.pem\"\n  tls_key_file  = \"\u002Fetc\u002Fboundary\u002Ftls\u002Fkey.pem\"\n}\n\nlistener \"tcp\" {\n  address = \"0.0.0.0:9201\"\n  purpose = \"cluster\"\n  tls_cert_file = \"\u002Fetc\u002Fboundary\u002Ftls\u002Fcert.pem\"\n  tls_key_file  = \"\u002Fetc\u002Fboundary\u002Ftls\u002Fkey.pem\"\n}\n\nkms \"aead\" {\n  purpose = \"root\"\n  aead_type = \"aes-gcm\"\n  key = \"sP1fnF5Xz85RrXM...\"  # Use Vault Transit in production\n  key_id = \"global_root\"\n}\n\nkms \"aead\" {\n  purpose = \"worker-auth\"\n  aead_type = \"aes-gcm\"\n  key = \"8fZBjCUfN0TzjEG...\"\n  key_id = \"global_worker-auth\"\n}\n\nkms \"aead\" {\n  purpose = \"recovery\"\n  aead_type = \"aes-gcm\"\n  key = \"8fZBjCUfN0TzjEG...\"\n  key_id = \"global_recovery\"\n}\n```\n\n### Worker Configuration\n\n```hcl\n# \u002Fetc\u002Fboundary\u002Fworker.hcl\nworker {\n  name = \"boundary-worker-1\"\n  description = \"Worker in production VPC\"\n  public_addr = \"worker1.example.com\"\n\n  controllers = [\n    \"boundary.example.com:9201\"\n  ]\n\n  tags {\n    type = [\"production\"]\n    region = [\"us-east-1\"]\n  }\n}\n\nlistener \"tcp\" {\n  address = \"0.0.0.0:9202\"\n  purpose = \"proxy\"\n}\n\nkms \"aead\" {\n  purpose = \"worker-auth\"\n  aead_type = \"aes-gcm\"\n  key = \"8fZBjCUfN0TzjEG...\"\n  key_id = \"global_worker-auth\"\n}\n```\n\n## Terraform Configuration\n\n### Scope and Auth Configuration\n\n```hcl\n# main.tf - Boundary resources via Terraform\nterraform {\n  required_providers {\n    boundary = {\n      source  = \"hashicorp\u002Fboundary\"\n      version = \"~> 1.1\"\n    }\n  }\n}\n\nprovider \"boundary\" {\n  addr             = \"https:\u002F\u002Fboundary.example.com:9200\"\n  recovery_kms_hcl = file(\"recovery_kms.hcl\")\n}\n\n# Organization scope\nresource \"boundary_scope\" \"org\" {\n  scope_id                 = \"global\"\n  name                     = \"production-org\"\n  description              = \"Production organization scope\"\n  auto_create_admin_role   = true\n  auto_create_default_role = true\n}\n\n# Project scope\nresource \"boundary_scope\" \"production\" {\n  name                     = \"production\"\n  description              = \"Production infrastructure project\"\n  scope_id                 = boundary_scope.org.id\n  auto_create_admin_role   = true\n  auto_create_default_role = true\n}\n\n# OIDC Auth Method (Okta example)\nresource \"boundary_auth_method_oidc\" \"okta\" {\n  scope_id               = boundary_scope.org.id\n  name                   = \"okta\"\n  description            = \"Okta OIDC authentication\"\n  issuer                 = \"https:\u002F\u002Fcompany.okta.com\u002Foauth2\u002Fdefault\"\n  client_id              = var.okta_client_id\n  client_secret          = var.okta_client_secret\n  signing_algorithms     = [\"RS256\"]\n  api_url_prefix         = \"https:\u002F\u002Fboundary.example.com:9200\"\n  claims_scopes          = [\"groups\"]\n  account_claim_maps     = [\"oid=sub\"]\n  is_primary_for_scope   = true\n}\n\n# Managed group for auto-assignment\nresource \"boundary_managed_group\" \"sre_team\" {\n  auth_method_id = boundary_auth_method_oidc.okta.id\n  name           = \"sre-team\"\n  description    = \"SRE team members from Okta\"\n  filter         = \"\\\"sre-team\\\" in \\\"\u002Ftoken\u002Fgroups\\\"\"\n}\n\nresource \"boundary_managed_group\" \"dev_team\" {\n  auth_method_id = boundary_auth_method_oidc.okta.id\n  name           = \"dev-team\"\n  description    = \"Development team from Okta\"\n  filter         = \"\\\"dev-team\\\" in \\\"\u002Ftoken\u002Fgroups\\\"\"\n}\n```\n\n### Host Catalogs and Targets\n\n```hcl\n# Static host catalog for known infrastructure\nresource \"boundary_host_catalog_static\" \"production_servers\" {\n  name     = \"production-servers\"\n  scope_id = boundary_scope.production.id\n}\n\nresource \"boundary_host_static\" \"web_server\" {\n  name            = \"web-server-1\"\n  host_catalog_id = boundary_host_catalog_static.production_servers.id\n  address         = \"10.0.1.10\"\n}\n\nresource \"boundary_host_static\" \"db_server\" {\n  name            = \"db-server-1\"\n  host_catalog_id = boundary_host_catalog_static.production_servers.id\n  address         = \"10.0.2.20\"\n}\n\n# Host set grouping\nresource \"boundary_host_set_static\" \"web_servers\" {\n  name            = \"web-servers\"\n  host_catalog_id = boundary_host_catalog_static.production_servers.id\n  host_ids        = [boundary_host_static.web_server.id]\n}\n\nresource \"boundary_host_set_static\" \"db_servers\" {\n  name            = \"database-servers\"\n  host_catalog_id = boundary_host_catalog_static.production_servers.id\n  host_ids        = [boundary_host_static.db_server.id]\n}\n\n# SSH target\nresource \"boundary_target\" \"ssh_production\" {\n  name         = \"ssh-production-servers\"\n  description  = \"SSH access to production servers\"\n  type         = \"ssh\"\n  scope_id     = boundary_scope.production.id\n  default_port = 22\n\n  host_source_ids = [\n    boundary_host_set_static.web_servers.id\n  ]\n\n  session_max_seconds          = 3600  # 1 hour max session\n  session_connection_limit     = 1\n  enable_session_recording     = true\n  storage_bucket_id            = boundary_storage_bucket.sessions.id\n\n  injected_application_credential_source_ids = [\n    boundary_credential_library_vault_ssh_certificate.ssh_cert.id\n  ]\n}\n\n# Database target with Vault credential brokering\nresource \"boundary_target\" \"postgres_production\" {\n  name         = \"postgres-production\"\n  description  = \"PostgreSQL production database\"\n  type         = \"tcp\"\n  scope_id     = boundary_scope.production.id\n  default_port = 5432\n\n  host_source_ids = [\n    boundary_host_set_static.db_servers.id\n  ]\n\n  session_max_seconds      = 1800  # 30 min max\n  session_connection_limit = 5\n\n  brokered_credential_source_ids = [\n    boundary_credential_library_vault.postgres_creds.id\n  ]\n}\n```\n\n### Vault Integration for Credential Brokering\n\n```hcl\n# Vault credential store\nresource \"boundary_credential_store_vault\" \"vault\" {\n  name        = \"vault-store\"\n  scope_id    = boundary_scope.production.id\n  address     = \"https:\u002F\u002Fvault.example.com:8200\"\n  token       = var.vault_token\n  namespace   = \"production\"\n}\n\n# Dynamic database credentials from Vault\nresource \"boundary_credential_library_vault\" \"postgres_creds\" {\n  name                = \"postgres-dynamic-creds\"\n  credential_store_id = boundary_credential_store_vault.vault.id\n  path                = \"database\u002Fcreds\u002Freadonly\"\n  http_method         = \"GET\"\n  credential_type     = \"username_password\"\n}\n\n# SSH certificate signing via Vault\nresource \"boundary_credential_library_vault_ssh_certificate\" \"ssh_cert\" {\n  name                = \"ssh-certificate\"\n  credential_store_id = boundary_credential_store_vault.vault.id\n  path                = \"ssh-client-signer\u002Fsign\u002Fproduction\"\n  username            = \"admin\"\n  key_type            = \"ed25519\"\n  key_bits            = 256\n  extensions = {\n    \"permit-pty\" = \"\"\n  }\n}\n\n# Session recording storage\nresource \"boundary_storage_bucket\" \"sessions\" {\n  name        = \"session-recordings\"\n  scope_id    = \"global\"\n  plugin_name = \"aws\"\n  bucket_name = \"boundary-session-recordings\"\n  attributes_json = jsonencode({\n    \"region\"                      = \"us-east-1\"\n    \"disable_credential_rotation\" = true\n  })\n  secrets_json = jsonencode({\n    \"access_key_id\"     = var.aws_access_key\n    \"secret_access_key\" = var.aws_secret_key\n  })\n}\n```\n\n### Role-Based Access Control\n\n```hcl\n# SRE team role - full production access\nresource \"boundary_role\" \"sre_production\" {\n  name          = \"sre-production-access\"\n  scope_id      = boundary_scope.production.id\n  grant_strings = [\n    \"ids=*;type=target;actions=list,read,authorize-session\",\n    \"ids=*;type=session;actions=list,read,cancel\",\n    \"ids=*;type=host;actions=list,read\",\n  ]\n  principal_ids = [\n    boundary_managed_group.sre_team.id\n  ]\n}\n\n# Dev team role - limited access\nresource \"boundary_role\" \"dev_staging\" {\n  name          = \"dev-staging-access\"\n  scope_id      = boundary_scope.production.id\n  grant_strings = [\n    \"ids=${boundary_target.ssh_production.id};type=target;actions=read,authorize-session\",\n  ]\n  principal_ids = [\n    boundary_managed_group.dev_team.id\n  ]\n}\n```\n\n## Connecting to Targets\n\n```bash\n# Authenticate via OIDC\nboundary authenticate oidc \\\n  -auth-method-id amoidc_xxxxx\n\n# List available targets\nboundary targets list -scope-id p_xxxxx\n\n# Connect to SSH target (credentials injected by Vault)\nboundary connect ssh \\\n  -target-id ttcp_xxxxx\n\n# Connect to database (credentials brokered by Vault)\nboundary connect postgres \\\n  -target-id ttcp_xxxxx \\\n  -dbname production\n\n# Use Boundary Desktop client for GUI access\n# Download from: https:\u002F\u002Fdeveloper.hashicorp.com\u002Fboundary\u002Finstall\n```\n\n## Session Recording and Auditing\n\n```bash\n# List session recordings\nboundary session-recordings list \\\n  -scope-id p_xxxxx\n\n# Download session recording for review\nboundary session-recordings download \\\n  -id sr_xxxxx \\\n  -output recording.cast\n\n# Play back with asciinema\nasciinema play recording.cast\n```\n\n## Dynamic Host Catalogs\n\n```hcl\n# AWS dynamic host catalog - auto-discovers EC2 instances\nresource \"boundary_host_catalog_plugin\" \"aws_catalog\" {\n  scope_id    = boundary_scope.production.id\n  name        = \"aws-production\"\n  plugin_name = \"aws\"\n\n  attributes_json = jsonencode({\n    \"region\"                      = \"us-east-1\"\n    \"disable_credential_rotation\" = true\n  })\n\n  secrets_json = jsonencode({\n    \"access_key_id\"     = var.aws_access_key\n    \"secret_access_key\" = var.aws_secret_key\n  })\n}\n\nresource \"boundary_host_set_plugin\" \"web_tier\" {\n  host_catalog_id = boundary_host_catalog_plugin.aws_catalog.id\n  name            = \"web-tier\"\n  attributes_json = jsonencode({\n    \"filters\" = [\n      \"tag:Environment=production\",\n      \"tag:Tier=web\"\n    ]\n  })\n}\n```\n\n## Security Best Practices\n\n1. **Use Vault KMS for key management** instead of static AEAD keys in production\n2. **Enable session recording** for all privileged access targets\n3. **Set session time limits** appropriate to the resource sensitivity\n4. **Use OIDC managed groups** for automatic role assignment from IdP\n5. **Deploy multi-hop workers** for accessing resources across network boundaries\n6. **Rotate Vault tokens** used by credential stores regularly\n7. **Enable audit logging** on both controllers and workers\n8. **Use credential injection** (SSH certificates) over brokering when possible\n9. **Implement least-privilege grants** -- avoid wildcard permissions\n10. **Review session recordings** regularly for compliance and incident response\n\n## References\n\n- [HashiCorp Boundary Documentation](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fboundary\u002Fdocs)\n- [Boundary and Vault Integration](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fboundary\u002Fdocs\u002Fconcepts\u002Fcredential-management)\n- [From Zero to Hero with Boundary](https:\u002F\u002Fwww.hashicorp.com\u002Fen\u002Fblog\u002Ffrom-zero-to-hero-hashicorp-boundary)\n- [Boundary Terraform Provider](https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Fboundary\u002Flatest\u002Fdocs)\n- [Zero Trust with Vault, Consul, and Boundary](https:\u002F\u002Fwww.hashicorp.com\u002Fen\u002Fresources\u002Fzero-trust-security-with-hashicorp-vault-consul-and-boundary)\n",{"name":5,"tags":25,"author":34,"domain":35,"license":15,"version":36,"subdomain":37,"description":7},[26,27,28,29,30,31,32,33],"zero-trust","hashicorp","boundary","privileged-access","vault","identity-aware-proxy","session-recording","just-in-time-access","mahipal","cybersecurity","1.0","zero-trust-architecture","main","c2b1fdccc779e99ac814e55fb69ca8d71215dd0f","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection","https:\u002F\u002Fgithub.com\u002FSamuelChien","http:\u002F\u002Fsamuelchien.com\u002F","2026-05-26 08:27:14",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add SamuelChien\u002Fmega-skills-collection --skill implementing-zero-trust-with-hashicorp-boundary",{"tool":50,"command":51},"bunx","bunx skills add SamuelChien\u002Fmega-skills-collection --skill implementing-zero-trust-with-hashicorp-boundary",{"tool":53,"command":54},"pnpm","pnpm dlx skills add SamuelChien\u002Fmega-skills-collection --skill implementing-zero-trust-with-hashicorp-boundary","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-zero-trust-with-hashicorp-boundary\u002FSKILL.md",true,[58,64,68,74,78,82,88],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"assets\u002Ftemplate.md","ASSET","资产文件",1381,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-zero-trust-with-hashicorp-boundary\u002Fassets\u002Ftemplate.md",{"path":65,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fapi-reference.md","REFERENCE","参考文档",1636,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-zero-trust-with-hashicorp-boundary\u002Freferences\u002Fapi-reference.md",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fstandards.md",2275,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-zero-trust-with-hashicorp-boundary\u002Freferences\u002Fstandards.md",{"path":79,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fworkflows.md",3496,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-zero-trust-with-hashicorp-boundary\u002Freferences\u002Fworkflows.md",{"path":83,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002Fagent.py","SCRIPT","脚本",6815,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-zero-trust-with-hashicorp-boundary\u002Fscripts\u002Fagent.py",{"path":89,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":90,"sourceHtmlUrl":91},"scripts\u002Fprocess.py",12374,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-zero-trust-with-hashicorp-boundary\u002Fscripts\u002Fprocess.py",[93,101,108,115,122,129],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":20},"01M76R4WZQZAXGGXMQCA0FZ716","zustand-store-ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.","MIT","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-ts\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":20},"01M76R4T9KENDH7FENGZQHBW4G","zustand-store-creator","Zustand Store Creator - Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":20},"01M76R3YWN84B7SANJ52X799ZE","zero-trust-config-helper","Zero Trust Config Helper - Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":20},"01M76R3HNSV2AEYSKHM915GJ58","zapier-integration-helper","Zapier Integration Helper - Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":20},"01M76R3DJSKAT4FA7DV4BF3GCE","zai-cli","Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP.\nUse when user needs image\u002Fvideo analysis, OCR, UI-to-code conversion, error diagnosis,\nreal-time web search, web page to markdown extraction, or GitHub code exploration.\nTrigger with phrases like \"analyze this image\", \"search the web for\", \"read this page\",\n\"explore this repo\", or \"use zai\". Requires Z_AI_API_KEY.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzai-cli\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":20},"01M76R2KAM699XE9AJVAWE4H2E","yt-research","Research competitor YouTube channels, niches, and trending topics for your content strategy.\nUse this skill whenever the user says \"research channels\", \"analyze competitors\", \"find trending topics\",\n\"niche analysis\", \"competitive research\", \"what are other creators doing\", \"scrape YouTube channels\",\nor wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fyt-research\u002FSKILL.md",[],[]]