Skip to content
This repository

ssh_auth.present: fails to add key #1080

Closed
pille opened this Issue April 13, 2012 · 7 comments

2 participants

pille Thomas S Hatch
pille
pille commented April 13, 2012

the user update doesn't get his key installed, using the following state, while the same works for a user called goodbuy.
the working config is exactly the same, except for substituting update with goodbuy.
especially the public key is the same, but no error or stack trace.

AAAAB3NzaC...==:
  ssh_auth:
    - present
    - user: update
    - enc: ssh-rsa
    # buggy, if space in key, see https://github.com/saltstack/salt/issues/852
    # ignore until at least 0.9.9
    #- comment: username
    - require:
      - user: update
Thomas S Hatch
Owner

interesting, I will try to replicate this, I am working on the ssh_auth state right now

Thomas S Hatch
Owner

I am having a hard time reproducing this, can you try to reproduce this against git HEAD?

pille
pille commented April 23, 2012

i'm currently not on git, but i plan for next week...

Thomas S Hatch
Owner

Ok, I will wait to hear, a lot of updates and fixes have been made in git recently for ssh_auth and I think that the problems should be solved. I will keep trying to reproduce this but will assume it is fixed

Thomas S Hatch thatch45 closed this April 27, 2012
pille
pille commented April 30, 2012

could reproduce the bug today in e6b2850 (since HEAD was buggy) with the following config adapted from your doc: http://readthedocs.org/docs/salt/en/v0.9.9/ref/states/all/salt.states.ssh_auth.html

AAAAB3NzaC1kc3MAAACBAL0sQ9fJ5bYTEyY==:
  ssh_auth:
    - present
    - user: user2
    - enc: ssh-dss

AAAAB3NzaC1kc3MAAACBAL0sQ9fJ5bYTEyY==:
  ssh_auth:
    - present
    - user: user1
    - enc: ssh-dss

user1 gets the key installed , user2 not (lexicographically first won)
when i remove the state for user1, user2 gets his installed.

Thomas S Hatch thatch45 reopened this April 30, 2012
Thomas S Hatch thatch45 closed this April 30, 2012
Thomas S Hatch
Owner

You are using the same key twice in the ID, this is not supported, try this:

user2:
  ssh_auth.present:
    - user: user2
    - enc: ssh-dss
    - name: AAAAB3NzaC1kc3MAAACBAL0sQ9fJ5bYTEyY==
user1:
  ssh_auth.present:
    - user: user1
    - enc: ssh-dss
    - name: AAAAB3NzaC1kc3MAAACBAL0sQ9fJ5bYTEyY==

pille
pille commented May 01, 2012

that's exactly what i pointed out in my initial report.
if this is not supported, it should return an error or at least a warning.
btw: since the 0.9.9 release your recommended syntax is in the docs, which wasn't in the 0.9.8 two weeks ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.