%PDF- %PDF-
| Direktori : /proc/self/root/proc/self/root/usr/lib/python2.7/site-packages/salt/auth/ |
| Current File : //proc/self/root/proc/self/root/usr/lib/python2.7/site-packages/salt/auth/yubico.pyc |
�
���^c @@ s� d Z d d l m Z m Z m Z d d l m Z d d l Z e j e � Z y d d l m
Z
m Z e Z
Wn e k
r� e Z
n Xd � Z d � Z d � Z e d k r� i i i d
d 6d d
6d 6d 6Z e d d � r� e d � q� e d � n d S( u
Provide authentication using YubiKey.
.. versionadded:: 2015.5.0
:depends: yubico-client Python module
To get your YubiKey API key you will need to visit the website below.
https://upgrade.yubico.com/getapikey/
The resulting page will show the generated Client ID (aka AuthID or API ID)
and the generated API key (Secret Key). Make a note of both and use these
two values in your /etc/salt/master configuration.
/etc/salt/master
.. code-block:: yaml
yubico_users:
damian:
id: 12345
key: ABCDEFGHIJKLMNOPQRSTUVWXYZ
.. code-block:: yaml
external_auth:
yubico:
damian:
- test.*
Please wait five to ten minutes after generating the key before testing so that
the API key will be updated on all the YubiCloud servers.
i ( t absolute_importt print_functiont unicode_literals( R N( t Yubicot yubico_exceptionsc C@ sh i } yI t d j | d � rJ t t d | j � � \ | d <| d <n d SWn t k
rc d SX| S( u1
Grab the YubiKey Client ID & Secret Key
u yubico_usersu idu keyN( t __opts__t gett Nonet listt valuest KeyError( t usernamet user( ( s4 /usr/lib/python2.7/site-packages/salt/auth/yubico.pyt __get_yubico_users7 s +
c C@ sb t | � } t | d | d � } y | j | � SWn'