meta data for this page
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ldap [2018/07/27 12:55] – created niziak | ldap [2020/04/14 12:55] (current) – niziak | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== LDAP ====== | ||
+ | [[http:// | ||
+ | |||
+ | LDAP [[https:// | ||
+ | |||
+ | ====== distinguished name ====== | ||
+ | [[https:// | ||
+ | |||
+ | * **DN** - distinguished name - full path of the object in the tree. Uniquely identifies an entry and describes its position. I.e // | ||
+ | * **DN**s are comprised of zero or more comma-separated components called **relative** distinguished names, or **RDN**s. | ||
+ | * For example, the DN // | ||
+ | * uid=john.doe | ||
+ | * ou=People | ||
+ | * dc=example | ||
+ | * dc=com | ||
+ | * DNs are case insensitive) | ||
+ | * **RDN** - is relative to its parent | ||
+ | |||
+ | Example DNs: | ||
+ | * //" | ||
+ | * //" | ||
+ | * //""// | ||
+ | * //" | ||
+ | * < | ||
+ | |||
+ | The same DN: | ||
+ | * // | ||
+ | * // | ||
+ | * //dc = example , dc = com// | ||
+ | * // | ||
+ | * // | ||
+ | |||
+ | ====== DN Components ====== | ||
* **dc** - domain component dc=company, | * **dc** - domain component dc=company, | ||
* **ou** - organization unit (ou= | * **ou** - organization unit (ou= | ||
+ | * **cn** - common name (i.e. "John Smith" | ||
+ | * **displayName** - one line summary (for people can be the same as **cn**) | ||
+ | ====== objectClassess ====== | ||
+ | |||
+ | Are predefined containers for **attributes**. For example OpenLDAP' | ||
+ | * inetOrgPerson | ||
+ | * **cn**, **sn** - as required attributes | ||
+ | * lots of optional attributes like: " | ||
+ | |||
+ | ====== common attributes ====== | ||
+ | And container classes: | ||
+ | * cn,sn (inetOrgPerson) | ||
+ | * mail=rfc822Mailbox (inetOrgPerson) | ||
+ | * uid=userid (inetOrgPerson) | ||
+ | * userPassword (person, posixAccount, | ||
+ | * hash: SSHA | ||
+ | * displayName (inetOrgPerson) | ||
====== Structure design ====== | ====== Structure design ====== | ||
- | * **cn** collisions. Two people may have the same first and last name. Grouping under different parent is necessary (**ou**). | + | |
+ | | ||
+ | * user can belong only to one **ou**. | ||
+ | * Stability of structure, but **people can change**: | ||
+ | * names - Do not rename entries, use some unique id like serial number. I.e. //" | ||
+ | * position - departments - do not put users under specific departments (deep tree), better is to put it into one group and then use a attribute | ||
+ | to structurize and group users. | ||
+ | * security - separate some information by grouping it under another **ou** | ||
+ | |||
+ | [[http:// | ||
====== Example structure ====== | ====== Example structure ====== | ||
Line 13: | Line 72: | ||
* dc=company, | * dc=company, | ||
* ou=people | * ou=people | ||
+ | * uid=jdoe | ||
+ | * cn=John Doe | ||
+ | * cn=Johny | ||
+ | * sn=Doe | ||
+ | * mail=john.doe@company.org | ||
+ | * mail=j.doe@company.org | ||
+ | * uid=jblack | ||
+ | * cn=Joe Black | ||
+ | * sn=Black | ||
+ | * ou=software | ||
+ | * ou=software | ||
+ | * ou=customers | ||
+ | * cn=Google | ||
+ | * cn=Wurth | ||
+ | * ou=devices | ||
+ | * ou=it | ||
+ | * uid=nextcloudsystemuser, | ||
+ | * root,www ,etc | ||
+ | * ou=location | ||
+ | * conference rooms location and phones, company address, etc | ||