Current File : //lib/python2.7/site-packages/cloudinit/config/cc_keys_to_console.pyo
�
oB�]c@sTdZddlZddlmZddlmZeZdZd�Zd�Z	dS(s
Keys to Console
---------------
**Summary:** control which ssh keys may be written to console

For security reasons it may be desirable not to write ssh fingerprints and keys
to the console. To avoid the fingerprint of types of ssh keys being written to
console the ``ssh_fp_console_blacklist`` config key can be used. By default all
types of keys will have their fingerprints written to console. To avoid keys
of a key type being written to console the ``ssh_key_console_blacklist`` config
key can be used. By default ``ssh-dss`` keys are not written to console.

**Internal name:** ``cc_keys_to_console``

**Module frequency:** per instance

**Supported distros:** all

**Config keys**::

    ssh_fp_console_blacklist: <list of key types>
    ssh_key_console_blacklist: <list of key types>
i����N(tPER_INSTANCE(tutils(%s/cloud-init/write-ssh-key-fingerprintscCs/y
|j}Wntk
r&d}nXt|S(Ns/usr/lib(tusr_lib_exectAttributeErrortHELPER_TOOL_TPL(tdistrotbase_lib((sG/usr/lib/python2.7/site-packages/cloudinit/config/cc_keys_to_console.pyt_get_helper_tool_path,s



cCs�t|j�}tjj|�s8|jd||�dStj|dg�}tj|ddg�}y]|dj|�dj|�g}tj	|�\}	}
tj
d|	j�dtdt
�Wn!tk
r�|jd	��nXdS(
Ns9Unable to activate module %s, helper tool not found at %stssh_fp_console_blacklisttssh_key_console_blacklistsssh-dsst,s%s
tstderrtconsoles*Writing keys to the system console failed!(RRtostpathtexiststwarningRtget_cfg_option_listtjointsubpt	multi_logtstriptFalsetTruet	Exception(tnametcfgtcloudtlogt_argsthelper_pathtfp_blacklistt
key_blacklisttcmdtstdoutt_stderr((sG/usr/lib/python2.7/site-packages/cloudinit/config/cc_keys_to_console.pythandle4s$	
		!

(
t__doc__R
tcloudinit.settingsRt	cloudinitRt	frequencyRRR$(((sG/usr/lib/python2.7/site-packages/cloudinit/config/cc_keys_to_console.pyt<module>s