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

Make sure webapps user on specs VM has ~/.authorized_keys #166

Open
3 tasks
renoirb opened this issue May 14, 2015 · 1 comment
Open
3 tasks

Make sure webapps user on specs VM has ~/.authorized_keys #166

renoirb opened this issue May 14, 2015 · 1 comment

Comments

@renoirb
Copy link
Member

renoirb commented May 14, 2015

Problem is that each user public keys are written in a different way in each user sls file (e.g. find ssh names in /srv/salt/users/robin.sls and /srv/salt/users/renoirb.sls.

In order to sync files using rsync we’ll have to feed SSH keys, and to achieve that it would be best to move user ssh keys in a pillar, and so we can then do some logic from there.

Tasks

  • Create pillar schema to host all user public keys
  • Move all users into pillars
  • Edit states so that we can have the user state read keys from pillar
  • Consider to allow storage of private keys, not a priority.

Time estimate

Dependency

@renoirb
Copy link
Member Author

renoirb commented May 14, 2015

As a temporary measure, the VM upstream-specs can get away with the following two commands.

cp /home/renoirb/.ssh/authorized_keys /srv/webapps/.ssh/
cat /home/robin/.ssh/authorized_keys >> /srv/webapps/.ssh/authorized_keys

Also, a a hacky state has been written in /srv/salt/specs/local.sls

Hack away issue ops-166:
  cmd.run:
    - name: |
        cp /home/renoirb/.ssh/authorized_keys /srv/webapps/.ssh/
        cat /home/robin/.ssh/authorized_keys >> /srv/webapps/.ssh/authorized_keys
        chown webapps:webapps /srv/webapps/.ssh/authorized_keys
        chmod 644 /srv/webapps/.ssh/authorized_keys
    - creates: /srv/webapps/.ssh/authorized_keys

renoirb added a commit to webplatform/salt-states that referenced this issue Jun 8, 2015
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