Network Directories and their Structure Lightweight Directory Access Protocol (LDAP) Organising accounts in a large network Reference book: Understanding.

Slides:



Advertisements
Similar presentations
Models of Network Administration Week 5. Understanding the system as a whole Requires ability to see relationships and dependencies between distinct parts.
Advertisements

Chapter 4 Chapter 4: Planning the Active Directory and Security.
7.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft Windows Server 2003 Active Directory Infrastructure.
3.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 3: Introducing Active Directory.
Directory & Naming Services CS-328 Dick Steflik. A Directory.
3.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 3: Introducing Active Directory.
By Karan Oberoi.  A directory service (DS) is a software application- or a set of applications - that stores and organizes information about a computer.
CIT 470: Advanced Network and System Administration
Configuration Management Supplement 67 Robert Horn, Agfa Healthcare.
03/07/08 © 2008 DSR and LDAP Authentication Avocent Technical Support.
Module 1: Installing Active Directory Domain Services
(ITI310) SESSIONS : Active Directory By Eng. BASSEM ALSAID.
Chapter 11: Directory Services. Directory Services A directory service is a database that contains information about all objects on the network. Directory.
Directory services Unit objectives
Module 2 Creating Active Directory ® Domain Services User and Computer Objects.
Test Review. What is the main advantage to using shadow copies?
OU Passwords What they all mean. What is a password Webster’s Online Dictionary describes a password as “a sequence of characters required for access.
Hands-On Microsoft Windows Server 2008 Chapter 1 Introduction to Windows Server 2008.
Chapter-4 Windows 2000 Professional Win2K Professional provides a very usable interface and was designed for use in the desktop PC. Microsoft server system.
23/4/2001LDAP Overview - HEPix - LAL 2001 LDAP Overview HEPix – LAL Apr Michel Jouvin
LDAP Search Criteria Fall 2004 Rev. 2. LDAP Searches Can be performed on Single directory entry Contents of a single container Entire subtree Required.
GRID Centralized management of the Globus grid-mapfile Carlo Rocca INFN, Catania.
Directory Server Campus Booster ID: Copyright © SUPINFO. All rights reserved OpenLDAP.
SURAgrid Account Mgmt Tool Case Study: Kennesaw State University Graduate Research Assistant – Kennesaw State University.
SPARCS 10 이대근 (harry). Contents  Directory Service  What is LDAP?  Installation  Configuration  ldap-utils  User authentication with LDAP.
Chapter 9: Novell NetWare
The Directory A distributed database Distributed maintenance.
Microsoft Active Directory(AD) A presentation by Robert, Jasmine, Val and Scott IMT546 December 11, 2004.
Managing User Accounts. Module 2 – Creating and Managing Users ♦ Overview ► One should log into a Linux system with a valid user name and password granted.
70-294: MCSE Guide to Microsoft Windows Server 2003 Active Directory, Enhanced Chapter 4: Active Directory Architecture.
Section 1: Introducing Group Policy What Is Group Policy? Group Policy Scenarios New Group Policy Features Introduced with Windows Server 2008 and Windows.
Current State Of NetID By Jonathan Higgins Presentation Template available from Microsoft A low cost Identity Management Implementation Guide.
Scis.regis.edu ● CS 468: Advanced UNIX Class 2 Dr. Jesús Borrego Regis University 1.
1 Authentication Project David J. N. Begley Network Analyst University of Western Sydney, Nepean.
LDAP: LDIF & DSML Fall 2004 Rev. 2. LDIF Light-weight Data Interchange Format RFC 2849 Common format to exchange data entry schema.
Module 7 Active Directory and Account Management.
Building Secure, Flexible and Scalable Environments using LDAP - SANS Orlando Sacha Faust PricewaterhouseCoopers
Active Directory. Computers in organizations Computers are linked together for communication and sharing of resources There is always a need to administer.
Implementing LDAP Client/Server System for Directory Service By Maochun Sun Project Advisor: Dr. Chung-E Wang Department of Computer Science California.
1 Introduction to Microsoft Windows 2000 Windows 2000 Overview Windows 2000 Architecture Overview Windows 2000 Directory Services Overview Logging On to.
Databases. What is a database?  A database is used to store data. The word DATA is actually Latin for FACTS. A database is, therefore, a place, or thing.
LDAP Authentication Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
LDAP (Lightweight Directory Access Protocol ) Speaker: Chang-Yu Wu Adviser: Quincy Wu Date:2007/08/22.
Network Directories and their Structure Lightweight Directory Access Protocol (LDAP) Organising accounts in a large network Reference book: Understanding.
Module 3 Configuring File Access and Printers on Windows 7 Clients.
The HEP White Pages Project Ray Jackson CERN / IT - Internet Services Group 23rd April HEPiX/HEPNT Conference, LAL-Orsay, France.
Authentication at Penn State: The Present State of Affairs and Future Directions James A. Vuccolo, Manager, Software Technologies Group Phil Pishioneri,
1 Chapter Overview Managing Object and Container Permissions Locating and Moving Active Directory Objects Delegating Control Troubleshooting Active Directory.
70-294: MCSE Guide to Microsoft Windows Server 2003 Active Directory, Enhanced Chapter 4: Active Directory Architecture.
AACLS Documentation LDAP and releasing information issue ACL and ACI AACLS Model Physical Architecture Logical Architecture Example : a French university.
1 Active Directory Administration Tasks And Tools Active Directory Administration Tasks Active Directory Administrative Tools Using Microsoft Management.
Lecture – Users and groups
LDAP- Protocol and Applications. Role of LDAP Allow clients to access a directory service Directories hold hierarchical structured information Clients.
Review on Active Directory. Aim Enable users to find network resources easily Central and easy administration of users and resources in a domain Improve.
Module 5: Managing Addresses and Address Lists.
Active Directory. Computers in organizations Computers are linked together for communication and sharing of resources There is always a need to administer.
Active Directory Domain Services (AD DS). Identity and Access (IDA) – An IDA infrastructure should: Store information about users, groups, computers and.
© 2013 IBM Corporation LDAP Fundamentals & LDAP for CLM Bruce Besch IBM Rational Services.
COMP1321 Digital Infrastructure Richard Henson March 2016.
Software sales at U Waterloo Successfully moved software sales online Handle purchases from university accounts Integrated with our Active Directory and.
Finding Information in an LDAP Directory Info. Tech. Svcs. University of Hawaii Russell Tokuyama 05/02/01 University of Hawaii © 2001.
1 Directory Services  What is a Directory Service?  Directory Services model  Directory Services naming model  X.500 and LDAP  Implementations of.
Migrating to LDAP What is LDAP? Fedora Directory Server LdapImport
CollegeSource Security Application &
File System Implementation
Introduction to LDAP Frank A. Kuse.
Active Directory Administration
Implementation and configuration of LDAP
IIS.
Authentication Servers سرورهای تشخیص هویت
Presentation transcript:

Network Directories and their Structure Lightweight Directory Access Protocol (LDAP) Organising accounts in a large network Reference book: Understanding and Deploying LDAP Directory Services, Timothy Howes, Mark Smith and Gordon Good, Macmillan, Our library: TK H

Systems and Network Management LDAP1 Network Design As in our teaching plan, Network Design is our next topic. I will include some topics from: – Designing a directory infrastructure – Automating the naming and configuration of network: more advanced topics in DHCP and DNS – Designing the routing and switching infrastructure This first topic is directory infrastructure

Systems and Network Management LDAP1 Account Information The computer uses numbers to refer to users and groups Humans prefer to use names (like nicku) When you create files in your shared network drive, the client must access them using the same numbers The user ID numbers and group ID numbers must be the same on all computers Otherwise won’t be able to read own files!

Systems and Network Management LDAP1 Network Accounts $ ls -ln file -rw-rw Nov file Now nicku with user ID number 500 and group ID 500 can read and write this file..But nicku with user ID number 2270 and group ID number 2270 cannot access the file at all: $ id uid=2270(nicku) gid=2270(nicku) groups=2270(nicku),14171(staff)

Systems and Network Management LDAP1 Network Accounts2 The user ID numbers and group ID numbers on files on a network drive are fixed The user ID numbers should remain unchanged for all users who read/write the network drive.

Systems and Network Management LDAP1 Methods of achieving this Have a directory server of some kind The directory server associates a fixed user ID number with each login ID..and a fixed group ID number for each group ID On NT, these are called SIDs (security IDs)

Systems and Network Management LDAP1 Directory systems for authentication Proprietary: – Novell Directory Services (NDS) – Microsoft Active Directory (M? AD) – NT 4 domain – NIS+ (Network Information System plus) – NIS Open protocols: – LDAP – Hessiod

Systems and Network Management LDAP1 Proprietary application directories Application-specific directories: – Lotus Notes – cc:Mail – Microsoft Exchange – Novell GroupWise. These directories come bundled with, or, embedded into an application such as . If add another such application, must manage one more directory (“N + 1 directory problem”) If add another user, must add to all the directories.

Systems and Network Management LDAP1 Problem with proprietary directories Need put the same user into many different directories Need maintain N times the number of user accounts, where N is the number of directories. This is just too much work. The accounts get out of sync.

Systems and Network Management LDAP1 Why not buy Microsoft AD? Microsoft leverage their monopoly on the desktop to “embrace and extend” free software written by others Example: – Kerberos is a “Network Authentication Service”, an IETF standard (see RFC 1510) – Kerberos is written by cooperating programmers round the world – Microsoft took Kerberos, and modified the protocol very slightly (they classified this change as a “trade secret”) – So that MS destops can use MS Kerberos servers, but not non-MS Kerberos servers. Although MS claims to support standards, MS solutions are highly proprietary Designed to lock the user into an all-MS solution. Could be an expensive and insecure mistake.

Systems and Network Management LDAP1 LDAP — Why? Non-proprietary, IETF standard – No vendor lock-in – Use standard software components Supports authorisation as well as authentication – E.g., access if “staff, or year 3, group W, CSA student” Very general purpose: use for , system authentication, application authentication,... Reasonably secure Robust Extensible Good open source implementation available at

Systems and Network Management LDAP1 LDAP Terminology LDAP model is hierarchical, i.e., tree-structured Each object in a directory is an entry Each individual item in an entry is an attribute Each entry has a unique full name called its distinguished name or dn Each entry has a short name that is unique under its parent, called its relative distinguished name, or rdn. The organisation of names in the directory is called the namespace An important initial task is namespace design

Systems and Network Management LDAP1 LDAP Schemas The directory has a set of rules that determine the allowed entries and attributes Called the schemas Can be defined in – ASN.1, or – University of Michigan style, or – LDAPv3 style Each object, and its syntax, are both defined using OIDs, as in SNMP. For each attribute, schema defines: – Name – Description – Permitted compare operations – Syntax (i.e., data type). LDAP server ensures that all added data matches the schema

Systems and Network Management LDAP1 LDAP objectClass1 Each attribute belongs to one or more objectClass es objectClasses are defined in schemas Defines what attributes must, or may be present in an entry objectClass definition includes: – Name of objectClass – What subclass this is derived from – The type of objectClass: structural, auxiliary or abstract – Description – List of required attributes – List of allowed attributes

Systems and Network Management LDAP1 LDAP objectClass2 LDAP implements a limited form of object oriented inheritance One entry may contain many objectClasses The entry can use all the attributes allowed in all the objectClasses. A restriction is that only one of the classes should have type structural – although in practice, it seems that OpenLDAP will allow more than one structural class in one entry. Single, not multiple inheritance Cannot override any schema rules defined in superior class

Systems and Network Management LDAP1 LDAP objectClass type objectClass has a type: structural, auxiliary, or abstract Default is structural Structural is for the fundamental, basic aspects of the object, e.g., person, posixGroup, device. Auxiliary classes place no restrictions on where an entry is stored, and are used to add more attributes to structural classes. Abstract classes are not usually created by users; the class top and alias are abstract.

Systems and Network Management LDAP1 LDAP Entries: selecting objectclass types Entries contain one or more objectClass es Choose the attributes you need Select the objectClasses that provide these attributes Add the objectClass to your entry.

Systems and Network Management LDAP1 Rules for LDAP Entries Each entry must be a member of top Each entry must be a member of the objectClass that provides the attributes Exactly one objectClass should be structural, the rest auxiliary

Systems and Network Management LDAP1 Namespace of attributes There is only one namespace for attributes The definition of the attribute cn (common name) is the same for all objectClasses that support the cn attribute.

Systems and Network Management LDAP1 Example objectTypes Here is the definition for person from core.schema: objectclass ( NAME 'person' SUP top STRUCTURAL MUST ( sn $ cn ) MAY ( userPassword $ telephoneNumber $ seeAlso $ description ) ) This says a person entry must contain: – a surname (sn) and – common name (cn), and may contain a userPassword, a telephoneNumber, a description, and a reference to another LDAP entry.

Systems and Network Management LDAP1 Want to support network login Does the objectClass person provide what is needed for network login? For network accounts, need replace (at minimum): – /etc/passwd – /etc/shadow – /etc/group So in addition to attributes of person, need: – User ID (log in name) – User ID number – Primary group ID number – Gecos information (fifth field of /etc/passwd) – Home directory – Login shell – Also the password aging information from /etc/shadow

Systems and Network Management LDAP1 Supporting network login Use the existing objectClass posixAccount: objectclass ( NAME 'posixAccount' SUP top AUXILIARY DESC 'Abstraction of an account with POSIX attributes' MUST ( cn $ uid $ uidNumber $ gidNumber $ homeDirectory ) MAY ( userPassword $ loginShell $ gecos $ description ) ) Provides fields from /etc/passwd

Systems and Network Management LDAP1 Authorisation as well as authentication Suppose you have an online web-based quiz, want only staff, or year 3, group W, CSA student to be allowed to log in. For this to work: – Each person entry has attributes including: Course, e.g., classCode, e.g., W Year, e.g., 3 acType, e.g., STU or STF

Systems and Network Management LDAP1 LDAP filters LDAP provides a standard method for selecting authenticated users who match authorisation criteria The filter to select staff or students in year 3, CSA, group W is: (|(acType=STF)(&(&(year=3)(course=41300 ))(classcode=W))) All filters are enclosed in parentheses Filters can be combined with OR ‘|’, AND ‘&’

Systems and Network Management LDAP1 /usr/share/doc/openldap /rfc/rfc2254.txt 1 filter = "(" filtercomp ")" filtercomp = and / or / not / item and = "&" filterlist or = "|" filterlist not = "!" filter filterlist = 1*filter item = simple / present / substring simple = attr filtertype value filtertype = equal / approx / greater / less equal = "=" approx = "~=" greater = ">=" less = "<="

Systems and Network Management LDAP1 /usr/share/doc/openldap /rfc/rfc2254.txt 2 present = attr "=*" substring = attr "=" [initial] any [final] initial = value any = "*" *(value "*") final = value attr = AttributeDescription from Section of [1] value = AttributeValue from Section of [1] [1] is RFC Grammar is defined in RFC 822

Systems and Network Management LDAP1 Examples of filters from RFC 2254 (cn=Babs Jensen) (!(cn=Tim Howes)) (&(objectClass=Person)(|(sn=J ensen)(cn=Babs J*))) (o=univ*of*mich*)

Systems and Network Management LDAP1 Using the command line tool ldapsearch ldapsearch -x '(|(acType=STF)(&(&(year=3)(course=4130 0))(classcode=W)))' cn The result is a list of all the DNs that match the filter, with the students’ names. Can filter out the DNs and blank lines by piping the command though grep ‘^cn:’ | sort

Systems and Network Management LDAP1 Using the command line tool ldapsearch ldapsearch -x -h ldap.vtc.edu.hk -b "ou=ICT,ou=TY,ou=stu,o=vtc.edu.hk" '(|(acType=STF)(&(&(year=3)(course=4130 0))(classcode=W)))' cn The result is a list of all the DNs that match the filter, with the students’ names. Can filter out the DNs and blank lines by piping the command though grep ‘^cn:’ | sort

Systems and Network Management LDAP1 Output of this ldapseach cn: AU-YEUNG Mei Sze cn: CHAN Kwong Tim cn: CHAU Ying Wai cn: CHEUNG Wai Kuen cn: CHUNG Koon Hei cn: FUNG Tun Li cn: LAI Hin Yip Brian cn: LAM Chun Man cn: LAU Mei Yin cn: LAU Tin Cheung cn: LEE Kai Tik cn: LI Man Wai cn: LO Kam Ki cn: MOK Yat Leung cn: SHIU Yui cn: TANG Chui Chui cn: TSANG Yuk Chau cn: WONG Chi Wah cn: WONG Chun Tak cn: YEUNG Sai Yin Timothy cn: YIP Hon Ho Kevin

Systems and Network Management LDAP1 ldapsearch Needs the –x option to work here Check ssl works with the –ZZ option Can “bind” as a user to get all the info you are allowed to see after binding: ldapsearch –x –D “uid=nicku,ou=People,dc=tyict,dc=v tc,dc=edu,dc=hk” –W ‘(uid=nicku)’ Can then see own passwords

Systems and Network Management LDAP1 LDAP URLs: RFC 2255 Have the form: ldap://host :port/base?attr?scope?filter ldapurl = ldap://" [hostport] ["/" [dn ["?" [attributes] ["?" [scope] ["?" [filter] ["?" extensions]]]]]] Examples: ldap://ictlab/ou=People,dc=tyict,dc=vtc,dc=edu,dc=hk?uid?on e?(uid=nicku) Can enter this into Netscape to see LDAP entry for me: ldap://ictlab/ou=People,dc=tyict,dc=vtc,dc=edu,dc=hk??one?( uid=nicku)

Systems and Network Management LDAP1 auth_ldap with Apache auth_ldap is an RPM package, should be installed when install Apache. AuthType Basic AuthName “LDAP authentication to class W only" AuthLDAPURL ldap://ldap.tyict.vtc.edu.hk/ou=People,dc=tyict,dc=vtc,dc=edu,dc=h k?uid?one?(|(acType=STF)(&(course=41300)(&(classCode=W)(year= 3)))) require valid-user See for manual.

Systems and Network Management LDAP1 Supporting Authorisation of students and staff We need a new schema to support the required attributes We create three new objectClasses and associated attributes: The first is common to students and staff: objectclass ( NAME 'institute' SUP top AUXILIARY DESC 'Any person in the institute, staff or student' MAY ( acOwner $ acType $ answer1 $ answer2 $ answer3 $ batchUpdateFlag $ department $ site $ institute ) )

Systems and Network Management LDAP1 Other objectTypes for IVE Then on top of this, we have attributes for staff and students: objectclass ( NAME 'student' SUP top AUXILIARY DESC 'A student in the institute' MAY ( academicYear $ award $ classCode $ course $ courseDuration $ FinalYear $ registrationDate $ year $ fullPartTime ) ) objectclass ( NAME 'staff' SUP top AUXILIARY DESC 'A staff member of the insitute.' MAY ( titleDes $ employerID ) )

Systems and Network Management LDAP1 The whole schema for IVE The whole schema can be seen here: titute.schema

Systems and Network Management LDAP1 Case Study: ICT laboratories Old system: – An ancient DEC Alpha running NIS – Hardware insufficient for demand – Very expensive maintenance, stopped paying – Technician reported a hardware failure close to first day of term New system: – We were planning to introduce LDAP authentication gradually – Failure required planning move faster – Needed to maintain old legacy accounts, plus introduce new accounts

Systems and Network Management LDAP1 ICT case study We chose OpenLDAP on Linux Running on an Acer Altos dual CPU P-III Migrated from the NIS using the migration scripts provided with OpenLDAP Migrated from the VTC LDAP accounts using a Perl program, written (quickly!) for the purpose, – Uses the Net::LDAP Perl modules

Systems and Network Management LDAP1 ICT case study 2 After migrating the legacy accounts, and creating new accounts for staff, full and part time students, had more than 5000 accounts The LDAP server was using a high CPU load Was able to solve this using caching: – Use NSCD (name service caching daemon) on client – Use memory in server to increase local cache size drastically. CPU load reduced to a very acceptable level.

Systems and Network Management LDAP1 Directory Structure1

Systems and Network Management LDAP1 Directory Structure2 We chose a fairly flat directory structure Recommended by reference, pages 239, 249. Reason: flexibility: allows for change without major reorganisation of data.

Systems and Network Management LDAP1 Hierarchical Directory Structure

Systems and Network Management LDAP1 Hierarchical Directory Structure This is an alternative data arrangement Divide into different campuses Advantage: can easily delegate management to local campus But: suppose ENG changes to EE? Suppose staff move from one department to another? Suppose equipment is transferred? Not only need change the attributes in the entry, but also move the entry. Overall, a flatter structure is easier to manage.

Systems and Network Management LDAP1 Directory Design Guidelines Design as flat as possible given constraints: – Replication – Access Control – Limitations of directory software – Requirements of applications that use the directory

Systems and Network Management LDAP1 Designing a Schema After selecting the schema attributes needed for your application, you may find that not all are available with the server Search web for more schemas If none provide all you need, – Select a suitable structural base class – Create an auxiliary class to be used with the base class – Define the objectClass and its attributes

Systems and Network Management LDAP1 Designing a Schema: Example For our ICT LDAP server, we use enough attributes to be able to log in But we also want to select users on the basis of course, year, class Want to add these attributes to the existing objectClasses Create three object classes: – Institute – Student – Staff