%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/sdb/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/sdb/keyring_db.pyo

�
���^c@@s�dZddlmZmZmZddlZyddlZeZWne	k
r]e
ZnXeje�Z
idd6ZdZd�Zddd�Zddd	�Zd
�ZdS(u7
Keyring Database Module

:maintainer:    SaltStack
:maturity:      New
:depends:       keyring
:platform:      all

This module allows access to the keyring package using an ``sdb://`` URI. This
package is located at ``https://pypi.python.org/pypi/keyring``.

Care must be taken when using keyring. Not all keyend backends are supported on
all operating systems. Also, many backends require an agent to be running in
order to work. For instance, the "Secret Service" backend requires a compatible
agent such as ``gnome-keyring-daemon`` or ``kwallet`` to be running. The
keyczar backend does not seem to enjoy the benefits of an agent, and so using
it will require either that the password is typed in manually (which is
unreasonable for the salt-minion and salt-master daemons, especially in
production) or an agent is written for it.

Like all sdb modules, the keyring module requires a configuration profile to
be configured in either the minion or master configuration file. This profile
requires very little. In the example:

.. code-block:: yaml

    mykeyring:
      driver: keyring
      service: system

The ``driver`` refers to the keyring module, ``service`` refers to the service
that will be used inside of keyring (which may be likened unto a database
table) and ``mykeyring`` refers to the name that will appear in the URI:

.. code-block:: yaml

    password: sdb://mykeyring/mypassword

The underlying backend configuration must be configured via keyring itself. For
examples and documentation, see keyring:

https://pypi.python.org/pypi/keyring

.. versionadded:: 2014.1.4
i(tabsolute_importtprint_functiontunicode_literalsNusetuset_ukeyringcC@str
tStS(u6
    Only load the module if keyring is installed
    (tHAS_LIBSt__virtualname__tFalse(((s7/usr/lib/python2.7/site-packages/salt/sdb/keyring_db.pyt__virtual__CscC@s&t||�}tj|||�dS(u3
    Set a key/value pair in a keyring service
    N(t_get_servicetkeyringtset_password(tkeytvaluetservicetprofile((s7/usr/lib/python2.7/site-packages/salt/sdb/keyring_db.pytset_LscC@st||�}tj||�S(u,
    Get a value from a keyring service
    (RRtget_password(R
RR
((s7/usr/lib/python2.7/site-packages/salt/sdb/keyring_db.pytgetTscC@s't|t�r#d|kr#|dS|S(u
    Get a service name
    uservice(t
isinstancetdict(RR
((s7/usr/lib/python2.7/site-packages/salt/sdb/keyring_db.pyR\s(t__doc__t
__future__RRRtloggingRtTrueRtImportErrorRt	getLoggert__name__tlogt__func_alias__RRtNoneRRR(((s7/usr/lib/python2.7/site-packages/salt/sdb/keyring_db.pyt<module>.s



		

Zerion Mini Shell 1.0