%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/auth/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/auth/yubico.pyc

�
���^c@@s�dZddlmZmZmZddlmZddlZeje�Zy ddl	m
Z
mZeZ
Wnek
r�eZ
nXd�Zd�Zd�Zed	kr�iiid
d6dd
6d6d6Zedd�r�ed�q�ed�ndS(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(tabsolute_importtprint_functiontunicode_literals(RN(tYubicotyubico_exceptionscC@shi}yItdj|d�rJttd|j��\|d<|d<ndSWntk
rcdSX|S(u1
    Grab the YubiKey Client ID & Secret Key
    uyubico_usersuidukeyN(t__opts__tgettNonetlisttvaluestKeyError(tusernametuser((s4/usr/lib/python2.7/site-packages/salt/auth/yubico.pyt__get_yubico_users7s+
cC@sbt|�}t|d|d�}y|j|�SWn'tjk
r]}tjd|�tSXdS(u,
    Authenticate against yubico server
    uidukeyuUnable to verify YubiKey `%s`N(R
RtverifyRtStatusCodeErrortlogtinfotFalse(Rtpasswordt_credtclientte((s4/usr/lib/python2.7/site-packages/salt/auth/yubico.pytauthHscO@stS(N(R(Rtargstkwargs((s4/usr/lib/python2.7/site-packages/salt/auth/yubico.pytgroupsWsu__main__u12345uiduABC123ukeyudamianuyubico_usersuOPTu
AuthenticateduFailed to authenticate(t__doc__t
__future__RRRtloggingt	getLoggert__name__Rt
yubico_clientRRtTruet
HAS_YUBICOtImportErrorRR
RRRtprint(((s4/usr/lib/python2.7/site-packages/salt/auth/yubico.pyt<module>'s"


			"


Zerion Mini Shell 1.0