1. Trang chủ >
  2. Công nghệ thông tin >
  3. Hệ thống thông tin >

Table 3-6. Values for the require parameter

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.36 MB, 188 trang )


Giao thức LDAP



GVHD: TS. Lưu Thanh Trà



bind_krbv4

Disables Kerberos 4 bind requests



tls_authc

Disables StartTLS if the client is authenticated

Cuối cùng, tham số password-hash xác định default password encrytion cheme để lưu lại các giá

trị trong thuộc tính userPassword. Mặc định scheme là {SSHA}, các scheme khác :

{SHA}

{SMD5}

{MD5}

{CRYPT}

{CLEARTEXT}

Sau khi chỉnh các tham số trên, ta có file slapd.conf như sau :

# /usr/local/etc/openldap/slapd.conf

# Global section

## Include the minimum schema required.

include /usr/local/etc/openldap/schema/core.schema

## Added logging parameters

loglevel 296

pidfile /usr/local/var/slapd.pid

argsfile /usr/local/var/slapd.args

## TLS options for slapd

TLSCipherSuite

HIGH

TLSCertificateFile /etc/local/slapd-cert.pem

TLSCertificateKeyFile /etc/local/slapd-key.pem

## Misc security settings

password-hash {SSHA}

#######################################################

## Database sections omitted



5.6 Serving up data :

Tham số database :



bdb



Chương 3



24



Lê Tiến Cường – Nguyễn Minh Đức

Lê Thạch Giang- Hoàng Ngọc Hưng



Giao thức LDAP



GVHD: TS. Lưu Thanh Trà



This backend has been specifically written to take advantage of the Berkley DB 4 database

manager. This backend makes extensive use of indexing and caching to speed up performance; it

is the recommended backend used on an OpenLDAP server.



ldbm

An ldbm database is implemented via either the GNU Database Manager or the Sleepycat

Berkeley DB software package. This backend is the older implementation of the bdb backend.

The details of this backend are described in the slapd-ldbm(5) manpage.



passwd

The passwd backend is a quick and dirty means of providing a directory interface to the system

passwd(5) file. It has only one configuration parameter: the file directive, which defines the

location of the password file (if different from /etc/passwd) used to respond to directory queries.

The details of this backend are described in the slapd-passwd(5) manpage.



shell

The shell backend directive allows the use of alternative (and external) databases. This directive

lets you specify external programs that are called for each of the LDAPv3 core operations. The

details of this backend are described in the slapd-shell(5) manpage.

Tham số tiếp theo là suffix :

## Define the beginning of example database.

database bdb

## Define the root suffix you serve.

suffix

"dc=plainjoe,dc=org"

Ngoài ra còn có rootdn. Mỗi LDAP directory đều có thể có một root DN, tương tự với superuser

account trên Unix. Root DN luôn cần 1 password tương ứng với root password (rootpw).

## Define a root DN for superuser privileges.

rootdn

"cn=Manager,dc=plainjoe,dc=org"

## Define the password used with rootdn. This is a salted secure hash of the phrase

## "secret."

rootpw

{SSHA}2aksIaicAvwc+DhCrXUFlhgWsbBJPLxy



6. Access control lists (ACLs)

Directory ACLs cung cấp bởi OpenLDAP khá đơn giản trong cú pháp nhưng lại cực kỳ linh hoạt và mạnh

mẽ trong thực thi. Ý tưởng cơ bản là xác định Who has Access to What ? “Who” bao gồm :



*

Tất cả các user



Chương 3



25



Lê Tiến Cường – Nguyễn Minh Đức

Lê Thạch Giang- Hoàng Ngọc Hưng



Giao thức LDAP



GVHD: TS. Lưu Thanh Trà



self

Chỉ mình DN root



anonymous

Nonauthenticated user



users

Authenticated user

Regular expression

Matches a DN or an SASL identity

Còn về việc Access được chia thành các cấp độ khác nhau như sau :

Table 3-7. Summary of access levels from most (top) to least (bottom)

Access

level



Permission granted



write



Access to update attribute values (e.g., Change this telephoneNumber to 555-2345).



read



Access to read search results (e.g., Show me all the entries with a telephoneNumber of 555*).



search



Access to apply search filters (e.g., Are there any entries with a telephoneNumber of 555*).



compare



Access to compare attributes (e.g., Is your telephoneNumber 555-1234?).



auth



Access to bind (authenticate). This requires that the client send a username in the form of a

DN and some type of credentials to prove his or her identity.



none



No access.



Cách đơn giản nhất để điều khiển access là tạo các cấp độ mặc định, chuyện này được điều khiển bởi

tham số defaultaccess trong slapd.conf , ví dụ:

## Give users search access when no other ACL applies.

defaultaccess search

Cuối cùng “What” xác định các entry và atributes để áp dụng ACL. Nó được chia làm 3 phần không bắt

buộc :











Phần được DN xác định cho ACL.

Phần LDAP tìm kiếm và lọc

Phần dành riêng cho các attributes

Nếu không có cả 3 phần, nó sẽ được thay thế bởi 1 dấu *, tức là bao gồm tất cả.

Ví dụ :



Chương 3



26



Lê Tiến Cường – Nguyễn Minh Đức

Lê Thạch Giang- Hoàng Ngọc Hưng



Giao thức LDAP



GVHD: TS. Lưu Thanh Trà



# Set control on the userPassword attribute.

access to dn=".*,ou=eng,dc=plainjoe,dc=org"

attrs=userPassword

by self write

by * auth

by dn=".*,ou=admins,ou=eng,dc=plainjoe,dc=org" write

Hoặc :

# Set control on the userPassword attribute.

access to dn.chilren="ou=eng,dc=plainjoe,dc=org"

attrs=userPassword

by self write

by * auth

by dn.children="ou=admins,ou=eng,dc=plainjoe,dc=org" write



Chương 3



27



Lê Tiến Cường – Nguyễn Minh Đức

Lê Thạch Giang- Hoàng Ngọc Hưng



Xem Thêm
Tải bản đầy đủ (.docx) (188 trang)

×