File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 11# sesame-backend-ad
2- backend pour AD
2+ backend pour AD pour sesame
3+
4+ LA documentation est à : (https://libertech-fr.github.io/sesame-doc/backends/backend_AD.html )
Original file line number Diff line number Diff line change 1+ """Utility for AD and sesame """
12import os .path
23import sys
34sys .path .append ('.' )
@@ -11,6 +12,7 @@ def set_config(config):
1112 u .__CONFIG__ = config
1213
1314def open_ssh_conn ():
15+ """Opening a ssh client connection with parameter in ../etc/config.conf"""
1416 pkey = paramiko .Ed25519Key .from_private_key_file ('../.ssh/id_ed25519' )
1517 client = paramiko .SSHClient ()
1618 policy = paramiko .AutoAddPolicy ()
@@ -27,14 +29,15 @@ def open_ssh_conn():
2729
2830
2931def exec_cmd (command ):
32+ """Exec directly a command (connexion and command)"""
3033 client = open_ssh_conn ()
3134 stdin , stdout , stderr = client .exec_command (command )
3235 content = stdout .read ().decode ()
3336 del client , stdin , stdout , stderr
3437 return content
3538
3639def compose_dn (entity ):
37-
40+ """Compose the DN of a identity"""
3841 rdnValue = u .find_key (entity ,'cn' )
3942 x = type (rdnValue )
4043 if rdnValue is None :
You can’t perform that action at this time.
0 commit comments