LDAP and Kerberos: An Overview Leveraging services provided by Active Directory for Unix/Linux authentication, authorization and name services Jason Testart.

Slides:



Advertisements
Similar presentations
Active Directory and NT Kerberos Rooster JD Glaser.
Advertisements

Remote Name Mapping for Linux NFSv4 Andy Adamson Center For Information Technology Integration University of Michigan August 2005.
MyProxy: A Multi-Purpose Grid Authentication Service
Using Kerberos the fundamentals. Computer/Network Security needs: Authentication Who is requesting access Authorization What user is allowed to do Auditing.
The Kerberos Authentication System Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
Unix/Windows Inter-Operability. What do we want? Single Username Password Access Users files (N drive) – Personal Machine – Multi-User Machines Information.
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.
LDAP LIGHT WEIGHT DIRECTORY ACCESS PROTOCOL PRESENTATION BY ALAKESH APURVA DHAN AND ASH.
Kerberos and LDAP Jason Heiss February Why is everybody still using NIS? NIS is easy to setup Easy to administer Scales fairly well Widely supported.
Authenticating REST/Mobile clients using LDAP and OERealm
CIT 470: Advanced Network and System Administration
Understanding Active Directory
Configuration Management Supplement 67 Robert Horn, Agfa Healthcare.
© 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Advanced Samba Administration Part.
Authentication June 24/2003. Overview Terminology Local Passwords Early Password Services Kerberos Basics Tickets Ticket Acquisition Kerberos Authentication.
03/07/08 © 2008 DSR and LDAP Authentication Avocent Technical Support.
TAM STE Series 2008 © 2008 IBM Corporation WebSEAL SSO, Session 108/2008 TAM STE Series WebSEAL SSO, Session 1 Presented by: Andrew Quap.
Overview of Active Directory Domain Services Lesson 1.
Nassau Community College
Chapter 12: Additional Active Directory Server Roles
Configuring CIFS Upon completion of this module, you should be able to: Configure the Data Mover for a Windows environment Create and Join a CIFS Server.
INFORMATION FOR NETWORK OPERATION. CONTENT Directory service Standard X.500 LDAP.
Directory Server Campus Booster ID: Copyright © SUPINFO. All rights reserved OpenLDAP.
Building a KDC. Kerberos Implementations RedHat 5 comes with MIT Kerberos 1.6 Ubuntu LTS comes with MIT Kerberos Admin through CLI, but from.
Unix Linux Administration III Class 9: Advanced Kerberos authentication. Solaris recovery options. Intro to ldap.
SPARCS 10 이대근 (harry). Contents  Directory Service  What is LDAP?  Installation  Configuration  ldap-utils  User authentication with LDAP.
The Directory A distributed database Distributed maintenance.
70-294: MCSE Guide to Microsoft Windows Server 2003 Active Directory, Enhanced Chapter 10: Managing Users, Groups, Computers and Resources.
Extending Active Directory Authentication and Account Management To Solaris 10 Systems A HOWTO guide for joining a Solaris 10 (8/07) host to a domain in.
Single Sign-on with Kerberos 1 Chris Eberle Ryan Thomas RC Johnson Kim-Lan Tran CS-591 Fall 2008.
LDAP: LDIF & DSML Fall 2004 Rev. 2. LDIF Light-weight Data Interchange Format RFC 2849 Common format to exchange data entry schema.
TWSd - Security Workshop Part I of III T302 Tuesday, 4/20/2010 TWS Distributed & Mainframe User Education April 18-21, 2010  Carefree Resort  Carefree,
CIT 470: Advanced Network and System AdministrationSlide #1 CIT 470: Advanced Network and System Administration Accounts and Namespaces.
Windows NT ® Single Sign On Cross Platform Applications (Part II) John Brezak Program Manager Windows NT Security Microsoft Corporation.
Active Directory. Computers in organizations Computers are linked together for communication and sharing of resources There is always a need to administer.
SEC400 UNIX & Kerberos Interop to Achieve Identity Management
Implementing LDAP Client/Server System for Directory Service By Maochun Sun Project Advisor: Dr. Chung-E Wang Department of Computer Science California.
LDAP (Lightweight Directory Access Protocol ) Speaker: Chang-Yu Wu Adviser: Quincy Wu Date:2007/08/22.
Single Sign-On across Web Services Ernest Artiaga CERN - OpenLab Security Workshop – April 2004.
Kerberos on Servers "host" means ssh/telnet login to the server itself "service" means applications like HTTP, POP3 In both cases you need to: 1. Enable.
AACLS Documentation LDAP and releasing information issue ACL and ACI AACLS Model Physical Architecture Logical Architecture Example : a French university.
LDAP (Lightweight Directory Access Protocol)
Introduction to Active Directory
Michael Tinker September 16, 2004
Advanced Authentication Campus-Booster ID: Copyright © SUPINFO. All rights reserved Kerberos.
CEG 2400 Fall 2012 Directory Services Active Directory Tree Domain.
Active Directory and NT Kerberos. Introduction to NT Kerberos v5 What is NT Kerberos? How is it different from NTLM NT Kerberos vs MIT Kerberos Delegation.
Active Directory Domain Services (AD DS). Identity and Access (IDA) – An IDA infrastructure should: Store information about users, groups, computers and.
Lightweight Directory Access Protocol Objectives –This chapter will first show you how to install and use LDAP Contents –The LDAP Database Structure –Scenario.
SSSD System Security Services Daemon. 2 Manages communication with centralized identity and authentication stores Provides robust, predictable caching.
1 Directory Services  What is a Directory Service?  Directory Services model  Directory Services naming model  X.500 and LDAP  Implementations of.
SSSD System Security Services Daemon. 2 Manages communication with centralized identity and authentication stores Provides robust, predictable caching.
LDAP Overview Kevin Moseley Server Team Manager Walgreen Co.
Samba4. What is Samba4? ● A replacement for Active Directory ● The centre of a windows domain: – Windows domain logon server – Windows-compatible LDAP.
Migrating to LDAP What is LDAP? Fedora Directory Server LdapImport
of Various FOSS Services for Educational Institutes
Windows interoperability with Unix/Linux
Unix System Administration
CIT 470: Advanced Network and System Administration
Introduction to LDAP Frank A. Kuse.
Data Virtualization Tutorial… LDAP Domains in CIS
Configuring LDAP-UX Module 13 H3065S F.00 [Course Title]
Extending Active Directory Authentication and Account Management To Solaris 10 Systems A HOWTO guide for joining a Solaris 10 (8/07) host to a domain.
Implementation and configuration of LDAP
Authentication Servers سرورهای تشخیص هویت
Single Sign-on with Kerberos
LDAP – Light Weight Directory Access Protocol
CIT 470: Advanced Network and System Administration
LDAP LIGHT WEIGHT DIRECTORY ACCESS PROTOCOL
Presentation transcript:

LDAP and Kerberos: An Overview Leveraging services provided by Active Directory for Unix/Linux authentication, authorization and name services Jason Testart Computer Science Computing Facility University of Waterloo March 2007

Summary Kerberos is for authentication only and provides Single Sign-on (SSO) LDAP can be used for authentication, authorization, and name services (no SSO) Active Directory is a kerberized directory service with an LDAP interface Use Kerberos for authentication, LDAP for authorization and name services

What do these technologies give us? Eliminate password synchronization Speed-up system deployment Reduce development time when a new platform is introduced Improve the end-user experience

LDAP Name services using the Lightweight Directory Access Protocol

What is LDAP? A protocol for accessing a directory service What’s a directory service? Think DNS. Database backend – do we care? Schema: attributes with OIDs (à la SNMP) Objects organized in a tree structure (DIT) Operations: bind, search, modify LDIF: text file format for describing directory contents

Schema Attribute – like a variable in a programming language, it holds a value ObjectClass – a special attribute that all directory entries must have, as it acts as a template for the data (enforces a kind of internal consistency) AD Schema: us/ad/ad/active_directory_schema.asp Unix Schema:

Types of Object Classes Structural – only one per entry! Auxiliary – supplements structural Abstract – can’t be used directly; only as an ancestor of another class (eg. “top”)

Schema Examples objectclass ( NAME 'posixAccount' DESC 'Abstraction of an account with POSIX attributes' SUP top AUXILIARY MUST ( cn $ uid $ uidNumber $ gidNumber $ homeDirectory ) MAY ( userPassword $ loginShell $ gecos $ description ) ) attributetype ( NAME 'homeDirectory' DESC 'The absolute path to the home directory' EQUALITY caseExactIA5Match SYNTAX SINGLE-VALUE ) Snippets of OpenLDAP’s RFC 2307 schema implementation:

Directory Information Tree (DIT)

DN and RDN of a directory entry RDN – a unique attribute among all siblings of a single parent in the DIT (eg. “uid=jatestar”) DN – concatenation of RDNs when following the path from the entry (node) to the root of the DIT (eg. “uid=jatestar, ou=people, dc=ldap, dc=student, dc=cs, dc=uwaterloo, dc=ca)

Directory Entry Example jatestar:x:1449:1449:Jason Testart [CSCF],DC2555B,x37174,,:/u4/jatestart:/xhbin/tcsh dn: uid=jatestar, ou=ldap, ou=people, dc=student, dc=cs, dc=uwaterloo, dc=ca objectClass: top objectClass: person objectClass: posixAccount cn: Jason Testart sn: Testart uid: jatestar uidNumber: 1449 gidNumber: 1449 homeDirectory: /u4/jatestart loginShell: /xhbin/tcsh gecos: Jason Testart [CSCF],DC2555B,x37174,, Entry in /etc/passwd: Becomes the following LDIF:

Some LDAP Interfaces LDIF - ldapsearch, ldapmodify, ldp.exe (see “man ldif, man ldapsearch, etc…) Perl - Net::LDAP (see C/C++ - OpenLDAP API (likely others…) (see “man 3 ldap”) ADSI - Windows specific (see /activedirectory/adsilinks.asp)

When interfacing, you need… Server hostname Bind DN Base DN (if searching) SSL? Note: An Active Directory domain controller will accept the value of the userPrincipalName attribute as the binddn. (eg. is friendlier than “CN=Jason J Testart (jatestar),OU=CSCF,OU=Staff,OU=Accounts, OU=Computer Science,OU=Faculties,DC=NEXUS,DC=UWATERLOO,DC=CA”)

What object classes does AD use for users? ldapsearch -x -W -H "ldaps://canadenis.student.cs.uwaterloo.ca“ \ -D \ -b "dc=student,dc=cs,dc=uwaterloo,dc=ca“ \ "(cn=jatestar)" objectClass Query: Yields: dn: CN=jatestar,OU=Users,OU=CS,DC=student,DC=cs,DC=uwaterloo,DC=ca objectClass: top objectClass: person objectClass: organizationalPerson objectClass: user

Need Unix attributes in AD The user objectClass is missing needed attributes that RFC 2307 provides So, extend the schema in AD, but be careful! Differences between MS-SFU-2.0, MS-SFU- 3.5 and schema provided by Windows Server 2003 R2 Maximize use of client attribute mappings!

Attribute Mappings Example: “When I ask for the gecos attribute value, fetch the value of cn from the directory instead” Minimize duplication of data in the directory (ie. redundant attributes) In some cases, doing this allows you to avoid extending the schema of a directory

Groups posixGroup uses memberUid, which is the uid of the member groupofUniqueNames uses the member attribute, which is the DN of the member Attribute mappings may be inappropriate, redundancy may be unavoidable Netgroups may give additional functionality, with additional complexity

Applying the knowledge (client-side) Make sure you know what directory attributes that you are using! Tell /etc/nsswitch.conf to use the nss_ldap library from padl.com Edit the ldap.conf appropriately to point to AD and define the attribute maps No need to add users/groups in /etc/passwd or /etc/group!

Kerberos Using Active Directory Kerberos for Unix/Linux authentication

What is Kerberos? Authentication protocol Secure SSO Trusted 3 rd party Mutual Authentication

Some Kerberos Terminology User Principal Host/Service Principal Instance Realm KDC TGT Credential cache

Principals Examples :

Credential Cache (on a Mac) $ klist Ticket cache: FILE:/tmp/krb5cc_1000 Default principal: Valid starting Expires Service principal 12/13/06 01:06:50 12/13/06 11:05:03 renew until 12/14/06 01:06:50 12/13/06 01:06:38 12/13/06 11:05:03 renew until 12/14/06 01:06:50 12/13/06 01:10:23 12/13/06 11:05:03 renew until 12/14/06 01:06:50

AD Domain == Kerberos v5 Realm Domain controllers provide KDC functionality A “domain” is synonymous with “realm” Joining a Windows computer to a domain means you are creating a host principal in the realm No multipart principal names in AD, so mappings are needed for instances

Adding a Unix host to AD Create a user account for the host/service (eg. cpu04-host) Map the account to a service principal: Set the account password Generate a krb5.keytab file Stick the keytab file in /etc/krb5 on cpu04 Done on all student.cs CPU servers

Adding a Unix host to AD (sans GUI) % ldapmodify -x -W -H ldaps://canadenis -D dn: cn=cpu04-host,OU=Service Principals,DC=student,DC=cs,DC=uwaterloo,DC=ca changetype: add cn: cpu04-host objectClass: user sAMAccountName: cpu04-host displayName: cpu04-host description: Kerberos host service principal for cpu04 userAccountControl: ktpass –princ –mapuser cpu04-host –password S0m3Rand0mPaZZw0rd –out cpu04-host.keytab Create the account using LDIF (from a Linux box): Do the mapping and generate a keytab file (on the domain controller):

Tell Unix login to authenticate against AD Set-up an appropriate /etc/krb5.conf Modify the PAM authentication stack to use the pam_krb5 module

Lots of work for simple authentication! Could have used ldap, or radius, etc… Kerberos gives us Single Sign-On Can take advantage of domain trusts! Most apps use SASL and GSSAPI to support Kerberos 5

SSH and SSO Configure SSH clients and servers to use GSSAPI for authentication Mac Lab user can ssh to a CPU server without a password (no ssh keys or.shosts required) Honours.k5login file (handy for course accounts) Possibilities with NFS (v3+), IMAP, SMTP AUTH, HTTP, etc…

SSO Demo (Linux client to AD) Show krb5.conf Login to realm (kinit) Show file shares on NetApp Query our entry on domain controller Show resulting credential cache (klist) Logout of realm (kdestroy)

Using slapd (OpenLDAP) with AD OpenLDAP supports Kerberos via SASL/GSSAPI Can map entities in a realm with entries in the directory Use authz-regexp directive in slapd.conf See:

References LDAP System Administration by Gerald Carter (O’Reilly) Kerberos The Definitive Guide by Jason Garman (O’Reilly) Unified Windows® and UNIX® Authorization Using Microsoft® Active Directory LDAP as a Directory Store by Ellie Berriman (Network Appliance Inc.) Unified Windows® and UNIX® Authentication Using Microsoft® Active Directory Kerberos by Ellie Berriman (Network Appliance Inc.)