These are chat archives for cherrypy/cherrypy

22nd
Jun 2016
Jellyfrog
@Jellyfrog
Jun 22 2016 07:27
@whiteinge but they can't be copied between standalone masters?
Seth House
@whiteinge
Jun 22 2016 12:41

@Jellyfrog if you manually create them and put them on the file system with the right permissions they should indeed be able to be copied between masters without trouble. salt-api will happily accept that eauth token in lieu of a username/password. No need to hit /login or create a CherryPy session token at all.

There isn't much to them. They're just msgpack'ed dictionaries on-disk and Salt relies on file-system permissions for all the heavy-lifting. You could even make them manually using msgpack load/dump as long as you get the format and permissions correct.

>>> import msgpack
>>> with open('/var/cache/salt/master/tokens/2230bcffdfe4819c948fd8555288a0e1', 'rb') as f:
...  msgpack.load(f)
...
{'eauth': 'auto',
 'expire': 1466642065.481757,
 'groups': False,
 'name': 'saltdev',
 'start': 1466598865.481757,
 'token': '2230bcffdfe4819c948fd8555288a0e1'}
Jellyfrog
@Jellyfrog
Jun 22 2016 12:48
I see, thanks a lot @whiteinge, for now I think we will go with ponging each salt-api on the first login tho :)