Skip to content

Impossible to unseal to recover from permission error while previously unsealing #16201

Open
@nwmqpa

Description

Describe the bug
Once initialized, even in the case of a KMS encryption issue, impossible to re-init, and the token has not been delivered

image

To Reproduce
Steps to reproduce the behavior:

  1. Have a IAM role without kms:Encrypt permission
  2. Run vault operator init once
  3. Run vault operator init a second time
  4. See error

Expected behavior
Vault should be left in an uninitialized state if unable to encrypt with the key

Environment:

  • Vault Server Version (retrieve with vault status): 1.11.0
  • Vault CLI Version (retrieve with vault version): 1.11.0
  • Server Operating System/Architecture: Amazon Linux 2 / x86_64

Vault server configuration file(s):

disable_performance_standby = true
ui = true
disable_mlock = true
storage "raft" {
  path    = "/opt/vault/data"
  node_id = <secret>
  retry_join {
    auto_join = "provider=aws region=eu-west-3 tag_key=observability-vault tag_value=cluster"
    auto_join_scheme = "https"
    leader_tls_servername = <secret>
    leader_ca_cert_file = "/opt/vault/tls/vault-ca.pem"
    leader_client_cert_file = "/opt/vault/tls/vault-cert.pem"
    leader_client_key_file = "/opt/vault/tls/vault-key.pem"
  }
}
cluster_addr = "https://172.31.164.99:8201"
api_addr = "https://172.31.164.99:8200"
listener "tcp" {
  address            = "0.0.0.0:8200"
  tls_disable        = false
  tls_cert_file      = "/opt/vault/tls/vault-cert.pem"
  tls_key_file       = "/opt/vault/tls/vault-key.pem"
  tls_client_ca_file = "/opt/vault/tls/vault-ca.pem"
}
seal "awskms" {
  region     = "eu-west-3"
  kms_key_id = <secret>
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugUsed to indicate a potential bugcoreIssues and Pull-Requests specific to Vault Core

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions