Ubuntu 16.04 with Salt-API

Ubuntu 16.04 with salt-api 2018.3.2

Packages and configuration needed to get Salt-API running on Ubuntu 16.04.

Salt

ii  salt-api                         2018.3.2+ds-1                              all          Generic, modular network access system  
ii  salt-common                      2018.3.2+ds-1                              all          shared libraries that salt requires for all packages  
ii  salt-master                      2018.3.2+ds-1                              all          remote manager to administer servers via salt  
ii  salt-minion                      2018.3.2+ds-1                              all          client package for salt, the distributed remote execution system  

Requirements.txt

backports.ssl-match-hostname==3.4.0.2  
cached-property==1.3.0  
chardet==2.3.0  
CherryPy==3.2.3  
cryptography==1.2.3  
docopt==0.6.2  
enum34==1.1.2  
epydoc==3.0.1  
funcsigs==0.4  
functools32==3.2.3.post2  
futures==3.0.5  
gitdb==0.6.4  
GitPython==1.0.1  
idna==2.0  
ipaddress==1.0.16  
Jinja2==2.8  
jsonschema==2.5.1  
Mako==1.0.3  
MarkupSafe==0.23  
mock==1.3.0  
msgpack-python==0.4.6  
mysqlclient==1.3.7  
ndg-httpsclient==0.4.0  
nose==1.3.7  
pbr==1.8.0  
psutil==3.4.2  
pyasn1==0.1.9  
pycrypto==2.6.1  
pycurl==7.43.0  
PyMySQL==0.7.2  
pyOpenSSL==0.15.1  
python-apt==1.1.0b1+ubuntu0.16.4.2  
python-dateutil==2.4.2  
python-gnupg==0.3.8  
python-systemd==231  
PyYAML==3.11  
pyzmq==15.2.0  
requests==2.9.1  
salt==2018.3.2  
six==1.10.0  
smmap==0.9.0  
texttable==0.8.1  
tornado==4.2.1  
urllib3==1.13.1  
websocket-client==0.18.0  
zabbix-api==0.4  
zabbixapi==0.1.1  

/etc/salt/master

external_auth:  
  pam:
    salt:
      - .*
      - '@runner'
      - '@wheel'
      - '@zabbix'

/etc/salt/master.d/api.conf

rest_cherrypy:  
  port: 8000
  ssl_crt: /etc/pki/tls/certs/localhost.crt
  ssl_key: /etc/pki/tls/certs/localhost.key
  ssl_chain: /etc/pki/tls/certs/localhost-ca-bundle.crt

Test, test!

curl -Ssk https://localhost:8000/login \  
    -H 'Accept: application/x-yaml' \
    -d username=salt \
    -d password=salt \
    -d eauth=pam
return:  
- eauth: pam
  expire: 1539400473.444366
  perms:
  - .*
  - '@runner'
  - '@wheel'
  - '@zabbix'
  start: 1539357273.444365
  token: ceca44bde68978e0ab403759c2d4a278c3ce30ee
  user: salt