Learning Directory

Download Report

Transcript Learning Directory

Learning Directory
2000/09/16
이니텍 보안기술연구소
권용철 ([email protected])
Goal
Directory의 개념을 이해해보도록 노력
해 본다
LDAP으로 검색 정도는 할 줄 아는 소양
을 기른다
What is Directory?
Directory




Noun. 주소 성명록
X.500 : X.400을 구현하기 위해 만들어진
일종의 distributed DB
Directory를 이루는 entry들에 주소로 접근
Object Oriented 관점에서 실 세계를 표현
할 수 있는 가장 강력한 수단
At the Beginning…
Requirement of X.400



Naming person’s email address
Search, Add, Remove, Modify email
address
organizing hierarchically because it’s
more intuitive
That’s exactly same as Phone Book!!

Directory에 관련된 용어
DIT
Entry
Attribute
Schema
DN & RDN
DIT
DIT : Directory Information Tree


정보를 가지고 있는 Entry 혹은 Object들의
집합체
구조는 n-ary tree로서, DIT에서의 관계를
설명하는 데는 tree 자료구조의 표현을 그
대로 따른다
Entry
Entry : DIT를 구성하는 단위. Object라
불리기도 한다
Entry는 여러 가지 속성(Attribute)로 구
성되며, 이 속성들에 따라서 다른 Entry
와 구별된다
Attribute
Attribute : Entry에 의미를 부여하는 정
보
Attribute는 Attribute의 종류를 나타내는
type과 그 값을 나타내는 value들로 정
의된다.
Entry는 objectclass라는 attribute를 반
드시 가져야 한다
Schema
Schema : a syntax of DIT
Schema는 DIT에서 사용될 objectclass
의 설계도, attribute의 이름과 값에 대한
정의, 그리고 기타 필요한 여러 가지 정
보들에 대한 설계도를 말한다.
Schema checking = Syntax checking
Sample Schema
Attribute Definition
( 2.5.18.3 NAME 'creatorsName' EQUALITY distinguishedNameMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12
SINGLE-VALUE NO-USER-MODIFICATION USAGE
directoryOperation )
Sample Schema
Object Class
objectclass person
requires
objectClass,
sn,
cn
allows
description,
seeAlso,
telephoneNumber,
userPassword
사람의 이름은…?
So am I
난 흑인이야
????
나도 흑인이야
나도 흑인이야
Me too
사람의 이름은…
난 Rocky
난 Smith
난 Martin
난 Eric
난 Robert
DN & RDN
DN : distinguished name
RDN : relative distinguished name
DN은 DIT 내에서 유일하게 한 Entity를
가리키는 이름.
RDN은 sibiling 사이에서 유일하게 한
Entity를 가리키는 이름
DN & RDN (continued)
Entry의 이름은 Entry가 가지고 있는 임의
attribute의 값이 될 수 있다.
RDN의 경우에는 sibiling entry 사이에서 현
entry가 가지고 있는 유일한 attribute&value
의 집합으로 나타낼 수 있다.
DN은 DIT의 Root Entry로 부터 특정 Entry를
포함하는 경로 상에 있는 Entry들의 RDN의
열거이다(not 집합)
Sample DIT
C=KR
L=서울특별시
CN=권용철,OU=학부생,
OU=전산학과,
O=한국과학기술원,
L=대전광역시,C=KR
L=대전광역시
Entry
O=이니텍
O=한국과학기술원
OU=보안기술연구소
CN=권용철
CN=venus
OU=전산학과
OU=학부생
CN=권용철
OU=교수
Directory의 강점
분산 환경에 적합하다






Replication
Referral
Scalable
High performance
Logical DataBase
Connectivity with CORBA and JAVA…
Object Oriented
DIT를 구성하는 Entry는 Object
ObjectClass : Entry의 설계도
Structural Class

Entry의 주된 속성을 표현
Auxiliary Class – like interface in JAVA

Entry의 부가적인 속성을 표현
Object Oriented – Example
Initech is organization(company), but
now it does CA service. How can we
make entry of Initech in DIT?
Objectclass
organization
Objectclass
+
Certification
Authority
=
Organization
&
Certification
Authority
X.500 DAP and LDAP
X.500 DAP


DAP : Directory Access Protocol
Too heavy to use(full ASN.1 BER encoding, etc)
LDAP



Light-weight Directory Access Protocol
Protocol carried directly over TCP or other
transport
Use direct string encoding rather than BER
encoding as many as possible
LDAP is subset of DAP
Compare DAP & LDAP
DN encoding
SEQUENCE {
SET {
SEQUENCE {
OBJECT IDENTIFIER ( 2.5.4.6 )
PRINTABLE STRING ‘KR’
}
SEQUENCE {
OBJECT IDENTIFIER ( 2.5.4.10 )
PRINTABLE STRING ‘Initech, Inc’
}
}
}
When DER encoded, it’s 34 byte. And complex encoding process.
O=“Initech, Inc”,C=KR
It’s 21 byte. And simple encoding process.
Directory 어디까지 왔나?
Many Directory enabled applications

Internet Explorer, Netscape Communicator,
Eudora, etc
Sendmail/named/… – support LDAP as
backend DataBase
Various language support LDAP(ex.
PHP/MFC/JAVA/Perl/…)
Backend Repository of Intranet or Internet
Service
Directory로 검색을 해 보자!
준비물 : Netscape Navigator or IE
LDAP URL Search filter




Ldap://ldap.host.name:port/ou=search,o
=base?returnattributelist?searchmethod?
searchfilter
Searchmethod : one,base,sub
Searchfilter : prefix expression
Operators : &,|,!,>=,<=,~=,=,*
검색 예제
Ldap://venus.initech.com/o=initech,c=kr??sub?(
&(mail=*initech*)(cn=*용철))
Ldap://venus.initech.com/o=initech,c=kr??one?(|
(cn=이*)(cn=김*))
Ldap://venus.initech.com/ou=people,o=initech,c
=kr??sub?(&(cn=김*)(!(mail=*initech*)))
References
RFC-2251 LDAP v3를 필두로 RFC 줄
줄이…
http://www.openldap.org
http://www.opendirectory.com
http://developer.netscape.com
IETF LDAP working group