1 LDAP and Java Naming Services Murali. M.Nagendranath.

Slides:



Advertisements
Similar presentations
Quantum Quantum Enterprise Solutions, Inc. Quantum JNDI Unleashed Java Conference 2000 March 29, 2000 Peter Fischer Director of Technical Services.
Advertisements

JNDI Java Naming Directory Interface JNDI is an API specified in Java that provides naming and directory functionality to applications written in Java.
Active Directory: Final Solution to Enterprise System Integration
Java Naming and Directory Interface JNDI. v001025JNDI2 Topics Naming and Directory Services JNDI Overview Features and Code Samples JNDI Providers References.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 14: Naming.
CIS101 Introduction to Computing Week 05. Agenda Your questions Exam next week - Excel Introduction to the Internet & HTML Online HTML Resources Using.
LDAP Jianwen Luo School of CTI, Depaul Univ. Oct.23, 1998.
Software Engineering Recitation 6 Suhit Gupta. Review Classpath Stream vs. Reader.
Directory & Naming Services CS-328 Dick Steflik. A Directory.
CS603 Directory Services January 30, Name Resolution: What would you like? Historical? –Mail –Telephone DNS? X.500 / LDAP? DCE? ActiveDirectory?
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 1: Introduction to Windows Server 2003.
Faculty of Information Technology © Copyright UTS Faculty of Information Technology - JNDIJNDI-1 Advanced Java Programming JNDI v2 Chris Wong
Basics of JNDI Alessio Bechini June Naming and Directory Services: Rationale A fundamental element in every application is the capability to find.
Chapter 8: Network Operating Systems and Windows Server 2003-Based Networking Network+ Guide to Networks Third Edition.
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.
CIS101 Introduction to Computing Week 06. Agenda Your questions Excel Exam during second hour Our status after the snow day Introduction to the Internet.
LDAP LIGHT WEIGHT DIRECTORY ACCESS PROTOCOL PRESENTATION BY ALAKESH APURVA DHAN AND ASH.
Understanding Active Directory
A centralized system.  Active Directory is Microsoft's trademarked directory service, an integral part of the Windows architecture. Like other directory.
©Copyright 1999 Peter Shipley LDAP Security Peter Shipley Chief Security Architect
Introduction to Active Directory Services Completely integrated with Microsoft Windows 2000 Server Integrates the Internet concept of namespace with the.
Section 6.1 Explain the development of operating systems Differentiate between operating systems Section 6.2 Demonstrate knowledge of basic GUI components.
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.
JNDI Java Naming and Directory Interface See also:
RMI Components java.rmi: client-side RMI classes, interfaces, and exceptions java.rmi.server: server-side RMI classes, interfaces, and exceptions java.rmi.registry:
Corso di Formazione Sodalia “Enterprise Java Beans” JNDI Java Naming and Directory Interface.
23/4/2001LDAP Overview - HEPix - LAL 2001 LDAP Overview HEPix – LAL Apr Michel Jouvin
A Java Based Prototype Grid User Interface Janice Drohan Project Supervisor: Prof. Peter Clarke.
Introduction To OpenLDAP Directory Services. What is a Directory Service? A specialized database optimized for reading, browsing, and searching. No complicated.
LIGHT WEIGHT DIRECTORY ACCESS PROTOCOL Presented by Chaithra H.T.
SPARCS 10 이대근 (harry). Contents  Directory Service  What is LDAP?  Installation  Configuration  ldap-utils  User authentication with LDAP.
The Directory A distributed database Distributed maintenance.
5.1 Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
Integrating LDAP into Check Point Secure Virtual Network Yasushi Kono (ComputerLinks Germany)
70-294: MCSE Guide to Microsoft Windows Server 2003 Active Directory, Enhanced Chapter 4: Active Directory Architecture.
Topic : JNDI Kaster Nurmukan. JNDI2(c)CDAC(Formerly NCST) What is JNDI? Naming and Directory Services Naming Concepts Issues JNDI Architecture Programming.
Advanced Programming Rabie A. Ramadan 7.
Java Naming and Directory Interfaces. A naming service is an entity that performs the following tasks:  It associates names with objects. Similar to.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
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.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
LDAP (Lightweight Directory Access Protocol ) Speaker: Chang-Yu Wu Adviser: Quincy Wu Date:2007/08/22.
Identity Management Technical Training LDAP and Directory Services Joachim Andres Guillaume Andru Renaud Métrich Sun Microsystems, Inc.
Java The Java programming language was created by Sun Microsystems, Inc. It was introduced in 1995 and it's popularity has grown quickly since A programming.
Page 1 Active Directory and DNS Lecture 2 Hassan Shuja 09/14/2004.
By Rashid Khan Lesson 6-Building a Directory Service.
The HEP White Pages Project Ray Jackson CERN / IT - Internet Services Group 23rd April HEPiX/HEPNT Conference, LAL-Orsay, France.
Paulo Repa Lightweight Directory Access Protocol Paulo Repa
LDAP (Lightweight Directory Access Protocol)
LDAP- Protocol and Applications. Role of LDAP Allow clients to access a directory service Directories hold hierarchical structured information Clients.
Spring LDAP Dima Ionut Daniel.
Introduction to Active Directory
Active Directory. Computers in organizations Computers are linked together for communication and sharing of resources There is always a need to administer.
JAVA LDAP Dima Ionut Daniel. Contents What is LDAP? LDAP Operations Directory Service JNDI as LDAP API Pooling Spring LDAP UnboundId LDAP SDK JAVA LDAP.
Directory Services CS5493/7493. Directory Services Directory services represent a technological breakthrough by integrating into a single management tool:
1 Directory Services  What is a Directory Service?  Directory Services model  Directory Services naming model  X.500 and LDAP  Implementations of.
LDAP Overview Kevin Moseley Server Team Manager Walgreen Co.
1 RPCs and Naming G53ACC Chris Greenhalgh. 2 Contents l Naming principles l Advantages l Patterns of use l Implementation issues l Examples l RMI registry.
Master of Information System Management
Introduction to LDAP Frank A. Kuse.
Implementation and configuration of LDAP
CEG 2400 Fall 2012 Directory Services - LDAP
LDAP – Light Weight Directory Access Protocol
Introduction to Name and Directory Services
Units with – James tedder
Units with – James tedder
LDAP LIGHT WEIGHT DIRECTORY ACCESS PROTOCOL
Presentation transcript:

1 LDAP and Java Naming Services Murali. M.Nagendranath

2 Contents 1LDAP (Lightweight Directory Access Protocol) 2JNDI (Java Naming & Directory Interface) 3Demonstration

3 LDAP 1What is LDAP? 2History of LDAP 4Directories in LDAP 5Use and purpose of LDAP

4 What is LDAP? Protocol of standard and extensible directory. Protocol giving access the information contained in the directory. Model of Information – Type of data. Functional Model – Acess to information. Safety Model - How access is protected. Model of duplication - Distribution of data. Replication Service.

5 A Brief History LDAP was born from the necessary adaptation of protocol DAP for TCP/IP. Started at University of Michigan in 1993 in the same vision as that of X.500 Latest version, v3, was made in 1997 Netscape is now the center of research

6 X.500 & LDAP LDAP is less secure Still a large amount of compatibility between them LDAP’s ability to search across servers is the most important advantage of LDAP.

7 Directories Often compared to a phone book DNS is an example Can be used locally or globally The list of all the names in a directory is it’s Name Space

8 Directories in LDAP Each entry has a unique distinguished name (DN) which is succession of attributes. An attribute describes the characteristic of objects. Normal attributes. Operational attributes. Characteristics of attributes Name, mono/multi, limit of value. DN’s are made up of the location of something in the directory

9 Directories in LDAP: Examples c stands for the country, o stands for organization ou stands for organization units, cn is for individuals cn=john, ou=administration, o=ibm, c=usa o=ibm, c=usa These are distinguished names. Together these combinations specify something specific, although it need not be at the bottom level

10 Directories in LDAP: Picture

11 Directories in LDAP Although that is the most common structure in LDAP, it is possible to define your own directory structure like the flat tree structure. This can cause compatibility problems

12 Functions in LDAP 4 main commands in editing LDAP directories: –Add, delete, modify & modify DN Modify changes the whole directory entry, modify DN just changes name of the entry

13 Functions in LDAP: Modify DN example cn=Modify Me, o=University of Florida, c=US cn=The New Me The command: ldapmodify -r -f /tmp/entrymods will change the RDN of the "Modify Me" entry from "Modify Me" to "The New Me" and the old cn, "Modify Me" will be removed

14 Functions in LDAP:Delete Example ldapdelete "cn=Delete Me, o=University of Florida, c=US" will attempt to delete the entry named with commonName "Delete Me" directly below the University of Florida organizational entry.

15 Functions in LDAP:Modify Example dn: cn=Modify Me, o=University of Florida, c=US changetype: modify replace: mail mail: Dr add: title title: Grand OCEAN delete: description

16 Functions in LDAP:Modify Example cont. The above function will replace the contents of the "Modify Me" entry's mail attribute with the value “Dr add a title of "Grand OCEAN", and completely remove the description attribute. The add function works almost the same as modify.

17 Referral Scheme

18..Contd 1.Client requests information 2.Server 1 returns referral to server 2 3.Client resends request to server 2 4.Server 2 returns information to client

19 LDIF & its Uses LDAP Data Interchange Format Represents LDAP entries in text Human readable format Allows easy modification of data To make basic imports/exports.

20 SCHEMAS Schema contains the following: Required attributes Allowed attributes How to compare attributes Limit what the attributes can store - ie, restrict to integer etc Set of rules that describes what kind of data is stored Helps maintain consistancy and quality of data Reduces duplication of data

21 Why is LDAP Important? Provides a standard for finding people or resources Much different then web searches, which are simply pattern matching Quickly becoming popular with major companies ie: Netscape, Novell Vendor independent open protocol

22 What isn’t LDAP intended for? Not useful as a local database Not able to replace file systems Not meant to replace DNS, but it can work in conjunction with DNS

23 LDAP on the web There are many web based LDAP servers that can be called in programs or searched directly via the web Used behind the scenes at online shopping sites and other web sites Used by Netscape for it’s address book

24 JNDI 1What is JNDI? 2Setup 3Concepts & Classes

25 What is JNDI? Java Naming and Directory Interface API Introduced in March, 1997 by Sun Microsystems Purpose: to provide a common access to different types of directories

26 What is JNDI?

27 Packages javax.naming javax.naming.directory javax.naming.event javax.naming.ldap javax.naming.spi

28 Class: Context Methods: –bind(String name, Object obj); –close(); –list(String name); –listBindings(String name); –lookup(String name); // most commonly used –rebind(String name, Object obj); –rename(String oldName, String newName); –unbind(String name);

29 Class: DirContext Extends Context methods: –getAttributes(String name); –modifyAttributes(String name, ModificationItem[] mods); –search(String name, Attributes matchAttrs);

30 Classes: InitialContext & InitialDirContext All operations are performed relative to an initial context set environment properties –Location of server (PROVIDER_URL) –How to create a context (INITIAL_CONTEXT_FACTORY) instantiation may throw a NamingException

31 Summary LDAP is useful for finding people and/or resources over a network Searches directories using distinguished names JNDI provides a common access to directories of different types

32 Demo 1Retrieving an object’s attributes 2Searching the directory by supplying a name

33 1. Retrieving an object’s attributes Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://directory.ufl.edu:389/o=ufl,c=us"); try { DirContext ctx = new InitialDirContext(env); // Get the attributes associated with the object bound to the name "ou=students" Attributes answer = ctx.getAttributes("ou=students");

34 1. Retrieving an object’s attributes (cont…) // Print out the attributes printIdAndValue(answer); System.out.println(" "); ctx.close(); } catch (NamingException e) { System.err.println("Exception caught:" + e); }

35 The print method NamingEnumeration enum = toPrint.getAll(); try { while (enum.hasMore()) { Attribute attr = (Attribute)enum.next(); // print out the attribute identifier System.out.println("attribute: " + attr.getID()); // print out each value for (NamingEnumeration valueEnum = attr.getAll(); valueEnum.hasMore(); System.out.println("value: " + valueEnum.next())); } } catch (NamingException e) { System.err.println("Exception caught: " + e); }

36 2. Name search DirContext ctx = new InitialDirContext(env); Attributes matchAttrs = new BasicAttributes(true); matchAttrs.put(new BasicAttribute("sn", "King")); /* The above code adds an attribute to the set; could also have done Attributes matchAttrs = new BasicAttributes("sn","King",true); Note: true = case insensitive; false = case sensitive */ // Note: a search returns an enumeration of SearchResult objects NamingEnumeration enum = ctx.search("ou=students", matchAttrs);

37 2. Name search (cont…) while (enum.hasMore()) { // Get the next SearchResult object & print out it's name SearchResult result = (SearchResult)enum.next(); System.out.println(">>>" + result.getName()); Attributes attrSet = result.getAttributes(); // attrSet is a set of attributes // print the attribute identifiers and values printIdAndValue(attrSet); }

38 THANK YOU.