Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vault:1.4.3 can not start with KMS auto unseal with IAM Role #9568

Closed
yevgeniyo-ps opened this issue Jul 22, 2020 · 5 comments
Closed

Vault:1.4.3 can not start with KMS auto unseal with IAM Role #9568

yevgeniyo-ps opened this issue Jul 22, 2020 · 5 comments

Comments

@yevgeniyo-ps
Copy link

yevgeniyo-ps commented Jul 22, 2020

Describe the bug

With version 1.4.3 KMS auto unsealing with IAM Role is not working
Vault service is not starting at all, no output

/vault/logs # vault server -config=/vault/config/
^C

To Reproduce
Steps to reproduce the behavior:

  1. Run vault 1.4.3 on docker with config:
    "seal": {
    "awskms": {
    "region": "your region",
    "kms_key_id": "your key"
    }
    }

  2. Check logs

Vault server configuration file(s):

{
    "backend": {
      "mysql": {
        "address": "",
        "username": "",
        "password": "",
        "database": "",
        "ha_enabled": "true" 
      }
    },
    "listener": {
      "tcp":{
        "address": "0.0.0.0:8200",
        "tls_cert_file": "/vault/config/ssl/vault.crt",
        "tls_key_file": "/vault/config/ssl/vault.key"
      }
    },
    "ui": true,
    "log_level": "DEBUG",
    "seal": { 
      "awskms": {
        "region": "",
        "kms_key_id": ""
      }
    }
}

Additional context

Checked the same setup with 1.3.7
All works as expected

@kalafut
Copy link
Contributor

kalafut commented Jul 22, 2020

Hi. Possibly the same as #8844? Note the comments at the end of that discussion.

@yevgeniyo-ps
Copy link
Author

Looks like it has the same source

@danjbh
Copy link

danjbh commented Jul 25, 2020

I also encountered this issue and wasn't able to figure out what was going on until we set ui = false in the config, which then seemed to allow it to log some useful information.

Anyhow, my issue turned out to be a problem w/ the role -- I had it scoped to the wrong namespace.

Although I'd be interested in knowing if anyone else suddenly starts seeing error logs if they set ui = false. In the meantime, make sure your roles are setup correctly!

@tvoran
Copy link
Member

tvoran commented Jul 30, 2020

@yevgeniyo Have you tried setting the environment variable AWS_ROLE_SESSION_NAME to something random in your docker container?

Otherwise you may be running into an issue with docker and IMDSv2:

So you might try increasing the hop count for the underlying ec2 instances if you can.

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

No branches or pull requests

5 participants
@kalafut @tvoran @yevgeniyo-ps @danjbh and others