HashiCorp Vault configuration in Oracle cloud

I’m trying to configure HashiCorp Vault in Oracle cloud. The setup includes 2 compute instances and network load balancer for traffic distribution. I’m using Ansible role (https://github.com/ansible-community/ansible-vault) for configuration management of the instances. Unsealing should be performed by key stored within Oracle KMS.

Setup

Network load balancer (private IP address: 10.20.68.87)
Instance 1 (private IP address: 10.20.67.46) vault_main.hcl config file:

# Ansible managed

cluster_name = "dc1"
max_lease_ttl = "768h"
default_lease_ttl = "768h"

disable_clustering = "False"
cluster_addr = "http://10.20.67.46:8201"
api_addr = "http://10.20.67.46:8200"

plugin_directory = "/usr/local/lib/vault/plugins"

listener "tcp" {
  address = "0.0.0.0:8200"
  cluster_address = "0.0.0.0:8201"
  tls_disable = "true"
  }

storage "raft" {
  path = "/var/vault"
  node_id = "inst-yddqp-instancepool20240612050658"
                      retry_join {
    leader_api_addr =  "http://10.20.68.87:8200"
  }
        }

// HashiCorp recommends disabling mlock when using Raft.
disable_mlock = true

ui = true

seal "ocikms" {
  key_id = "<key-id-here>"
  auth_type_api_key = "False"
  crypto_endpoint = "https://<endpoint-value-here>"
  management_endpoint = "https://<endpoint-value-here>"
}

Instance 2 (private IP address: 10.20.6.15) vault_main.hcl config file:

# Ansible managed

cluster_name = "dc1"
max_lease_ttl = "768h"
default_lease_ttl = "768h"

disable_clustering = "False"
cluster_addr = "http://10.20.6.15:8201"
api_addr = "http://10.20.6.15:8200"

plugin_directory = "/usr/local/lib/vault/plugins"

listener "tcp" {
  address = "0.0.0.0:8200"
  cluster_address = "0.0.0.0:8201"
  tls_disable = "true"
  }

storage "raft" {
  path = "/var/vault"
  node_id = "inst-jncko-instancepool20240612050658"
                      retry_join {
    leader_api_addr =  "http://10.20.68.87:8200"
  }
        }

// HashiCorp recommends disabling mlock when using Raft.
disable_mlock = true

ui = true

seal "ocikms" {
  key_id = "<key-id-here>"
  auth_type_api_key = "False"
  crypto_endpoint = "https://<endpoint-value-here>"
  management_endpoint = "https://<endpoint-value-here>"
}

I’ve run through HashiCorp documentation and it seems that I have all pieces in place. However, it fails on Vault API reachable? step with this error:

fatal: [inst-yddqp-instancepool20240612050658]: FAILED! => {"attempts": 6, "changed": false, "elapsed": 0, "msg": "Status code was -1 and not [200, 429, 472, 473, 501, 503]: Request failed: <urlopen error [Errno 111] Connection refused>", "redirected": false, "status": -1, "url": "http://10.20.67.46:8200/v1/sys/health"}
fatal: [inst-jncko-instancepool20240612050658]: FAILED! => {"attempts": 6, "changed": false, "elapsed": 0, "msg": "Status code was -1 and not [200, 429, 472, 473, 501, 503]: Request failed: <urlopen error [Errno 111] Connection refused>", "redirected": false, "status": -1, "url": "http://10.20.6.15:8200/v1/sys/health"}

Remarks

  • I’d expect it trying to reach load balancer IP address in this step directly, not IP address of each of the instances
  • running curl -v http://10.20.68.87:8200/v1/sys/health on any of the instances returns:
    *   Trying 10.20.68.87:8200...
    * Connected to 10.20.68.87 (10.20.68.87) port 8200 (#0)
    > GET /v1/sys/health HTTP/1.1
    > Host: 10.20.68.87:8200
    > User-Agent: curl/7.81.0
    > Accept: */*
    >
    * Mark bundle as not supporting multiuse
    * HTTP 1.0, assume close after body
    < HTTP/1.0 400 Bad Request
    <
    Client sent an HTTP request to an HTTPS server.
    * Closing connection 0
    
  • telnet 10.20.68.87 8200 for any of the instances connects properly to the load balancer
  • access to OCI KMS key is granted via instance_principal, through dynamic group with identity policy specified as allow dynamic-group ${oci_identity_dynamic_group.servers.name} to use keys in compartment id ${var.compartment_ocid}
  • OCI KMS key can be accessed by both of the instances
  • OCI load balancer routing policy condition is specified as any(http.request.url.path ew (i '/v1/sys/health'))

At this point, I have no ideas what’s misconfigured. During my research, I stumbled upon High Available Hashicorp Vault Cluster Installation on VMWare question. I’m more or less mimicking this setup.

Any ideas what should I run/check/prove to troubleshoot this issue much appreciated.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật