Hi,
I'm running salt-master (version 0.15.1.) as the salt user (don't worry about open_mode, just testing):
]# cat master
user: salt
open_mode: true
log_level: all
file_roots:
base:
- /var/data/salt/srv/salt
file_ignore_regex:
- '/\.svn($|/)'
- '/\.git($|/)'
file_ignore_glob:
- '*.pyc'
pillar_roots:
base:
- /var/data/salt/srv/pillar
client_acl:
jenkins:
- .*
If I run:
salt '*' test.ping
from a Jenkins job, I get 'Failed to authenticate, is this user permitted to execute commands?' and these lines in the salt-master log:
2013-05-23 16:34:25,168 [salt.master ][INFO ] Clear payload received with command publish
2013-05-23 16:34:25,169 [salt.master ][WARNING ] Authentication failure of type "user" occurred.
If I 'su - jenkins -s /bin/bash' the same command runs fine, with these lines in the master log:
2013-05-23 16:35:59,713 [salt.master ][INFO ] Clear payload received with command publish
2013-05-23 16:35:59,716 [salt.master ][INFO ] User jenkins Published command test.ping with jid 20130523163559715409
2013-05-23 16:35:59,717 [salt.master ][DEBUG ] Published command details {'tgt_type': 'glob', 'jid': '20130523163559715409', 'tgt': '*', 'ret': '', 'user': 'jenkins', 'arg': [], 'fun': 'test.ping'}
2013-05-23 16:35:59,761 [salt.master ][INFO ] Clear payload received with command _auth
2013-05-23 16:35:59,762 [salt.utils.verify ][DEBUG ] This salt-master instance has accepted 2 minion keys.
2013-05-23 16:35:59,762 [salt.master ][INFO ] Authentication request from localhost.localdomain
2013-05-23 16:35:59,762 [salt.master ][INFO ] Authentication accepted from localhost.localdomain
2013-05-23 16:36:00,450 [salt.master ][INFO ] AES payload received with command _return
2013-05-23 16:36:00,450 [salt.master ][INFO ] Got return from localhost.localdomain for job 20130523163559715409
2013-05-23 16:36:05,469 [salt.master ][INFO ] Clear payload received with command publish
2013-05-23 16:36:05,472 [salt.master ][INFO ] User jenkins Published command saltutil.find_job with jid 20130523163605471088
2013-05-23 16:36:05,472 [salt.master ][DEBUG ] Published command details {'tgt_type': 'glob', 'jid': '20130523163605471088', 'tgt': '*', 'ret': '', 'user': 'jenkins', 'arg': ['20130523163559715409'], 'fun': 'saltutil.find_job'}
2013-05-23 16:36:05,783 [salt.master ][INFO ] AES payload received with command _return
2013-05-23 16:36:05,783 [salt.master ][INFO ] Got return from localhost.localdomain for job 20130523163605471088
As far I understand, the difference is that the Jenkins job does not have a tty, similar to google(jenkins sudo no tty present), but not sure if this is the real problem...
Any hints on how to make the client_acl work for this scenario are highly appreciated.
Thanks,
Victor