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

Kitchen Login Fails w. Unprotected Private Key File #316

Open
darkn3rd opened this issue Oct 29, 2018 · 0 comments
Open

Kitchen Login Fails w. Unprotected Private Key File #316

darkn3rd opened this issue Oct 29, 2018 · 0 comments

Comments

@darkn3rd
Copy link

Running kitchen create and kitchen login fails as permissions are too open.

STEPS

$ export KITCHEN_YAML=kitchen.docker.yml
$ kitchen create
$ ls -la .kitchen/docker_id_rsa
-rw-r--r--  1 jmenchaca  staff  1679 Oct 28 23:40 .kitchen/docker_id_rsa
$ kitchen login

The config is the following:

---
driver:
  name: docker

provisioner:
  name: ansible_playbook
  hosts: all
  require_ansible_repo: true
  require_ansible_omnibus: false
  ansible_verbose: true
  ansible_verbosity: <%= ENV['ANSIBLE_VERBOSITY'] || 1 %>
  ansible_diff: true
  roles_path: ../../roles
  require_chef_for_busser: true

verifier:
  name: inspec

platforms:
  - name: ubuntu-16.04
    transport:
      max_ssh_sessions: 6

suites:
  - name: default
    verifier:
      inspec_tests:
        - test/integration/default
      attributes:
        service_type: sysv

EXPECTED RESULTS

Login with similar behavior as if I was using vagrant.

ACTUAL RESULTS

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/Users/jmenchaca/area51/proj/lisa18_test_driven_infra/ansible/roles/ez_mysql/.kitchen/docker_id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/Users/jmenchaca/area51/proj/lisa18_test_driven_infra/ansible/roles/ez_mysql/.kitchen/docker_id_rsa": bad permissions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant