Révision 96454bcd
Ajouté par Sylvain Sauvage il y a plus de 11 ans
IoTa-Installer/lib/ldap.py | ||
---|---|---|
#
|
||
import installer
|
||
import utils
|
||
from config import CONFIG
|
||
|
||
|
||
class LDAPConfigurer(installer.Configurer):
|
||
|
||
def __init__(self):
|
||
installer.Configurer.__init__(self, "LDAP", "ldap", [
|
||
("Enter the URL to the LDAP directory", "ldap", "url", {}),
|
||
("Enter the LDAP's domain name", "ldap", "base_dn", {}),
|
||
("Enter the LDAP's login", "ldap", "login", {}),
|
||
("Enter the LDAP's password", "ldap", "password", {}),
|
||
("Enter the URL to the LDAP directory", "ldap", "url", {}),
|
||
("Do you want to create ldif files?", "ldap", "ldif_create", {"type": "YN"}),
|
||
("Do you want to automatically add ldif files to LDAP?", "ldap", "ldif_install", {"type": "YN"})
|
||
("Do you want to automatically add ldif files to LDAP?", "ldap", "ldif_install",
|
||
{ "when": ("ldap", "ldif_create"), "type": "YN"})
|
||
])
|
||
|
||
|
||
def postConfigure(self):
|
||
if CONFIG.isTrue("ldap", "ldif_create"):
|
||
if self.cisTrue("ldif_create"):
|
||
self.createLdifs()
|
||
if CONFIG.isTrue("ldap", "ldif_install"):
|
||
if self.cisTrue("ldif_install"):
|
||
self.addLdifs()
|
||
|
||
|
||
def createLdifs(self):
|
||
utils.writeFile("Creating the schema as a ldif file (user.ldif)", "user.ldif", """
|
||
dn: cn=user,cn=schema,cn=config
|
||
... | ... | |
objectclass: organizationalUnit
|
||
ou: users
|
||
description: users
|
||
""" % CONFIG.get("ldap", "base_dn"))
|
||
""" % self.cget("base_dn"))
|
||
utils.writeFile("Creating the user 'superadmin' as a ldif file (superadmin.ldif)", "superadmin.ldif", """
|
||
dn: uid=superadmin,ou=users,%s
|
||
objectclass: top
|
||
... | ... | |
uid: superadmin
|
||
partner: superadmin
|
||
userPassword: {SHA}iJo6eRs4dc+uQTV0tT2ku4qQ1T4=
|
||
""" % CONFIG.get("ldap", "base_dn"))
|
||
""" % self.cget("base_dn"))
|
||
utils.writeFile("Creating the user 'anonymous' as ldif file (anonymous.ldif)", "anonymous.ldif", """
|
||
dn: uid=anonymous,ou=users,%s
|
||
objectclass: top
|
||
... | ... | |
uid: anonymous
|
||
partner: anonymous
|
||
userPassword: {SHA}CpL6syMBNMym6t2YmDJbmyrmeZg=
|
||
""" % CONFIG.get("ldap", "base_dn"))
|
||
""" % self.cget("base_dn"))
|
||
|
||
|
||
def addLdifs(self):
|
Formats disponibles : Unified diff
Version 1.9-mock
This is version 1.9-mock. 1.9 because the API still have changes pending
(principally relative to the Discovery Services). “mock” because TLS
configuration is not yet available and the signatures (SigMa) are not fully
implemented.
- code cleaned and refactored
- lots of bugs fixed
- dependencies checked and trimmed
- documentation added
- Identity handling added
- code refactored
- new, better APIs
- Identity handling added
- use EPCglobal and DS events (no proxy types anymore)
- ETa-Callback modules are now available as web applications
- filtering rules: if a part of an event is not allowed, now the whole
event is deleted from the result (before only the rejectd part was)
- new temporary User web service
- new Xi module: XACML Interrogation web service (was two modules: TCP and
servlet)
- ETa and its Callback modules
- ActiveMQ
- SigMa
- certificate/signing key
- new simplified figures (sans IoTa and simplified IoTa)
- new figure for ETa modules
- show 3rd party clients
- data flows specified
- TLS and link security added
- IDs and trusted IDs added
- color adjusted for printing
- GREYC logo added