Active Directory (AD) เป็นบริการไดเรกทอรีแบบเจ้าของของ Microsoft ที่ช่วยให้ network admins จัดการผู้ใช้, สิทธิ์ และการเข้าถึงทรัพยากรเครือข่ายได้ มันทำงานบน Windows Server และจัดเก็บข้อมูลเกี่ยวกับวัตถุ (objects) เช่น ทรัพยากรเครือข่ายที่แชร์ บนเครือข่ายองค์กรในรูปแบบตรรกะและลำดับชั้น (hierarchical) ทำให้แอดมินจัดการทรัพยากรเหล่านั้น รวมถึงผู้ใช้ที่ต้องเข้าถึงทรัพยากรเหล่านั้นเพื่อทำงาน ได้
ต้องมี domain controller เพื่อรัน AD service Domain controller คือเซิร์ฟเวอร์ที่รัน Windows Server OS ที่ติดตั้ง Active Directory Domain Services (AD DS) ด้วยการติดตั้ง AD DS แอดมินสามารถกำหนดบทบาทเซิร์ฟเวอร์เฉพาะให้คอมพิวเตอร์ เช่น บทบาท domain controller
บทบาทของ Active Directory และใช้ทำอะไร?
Active Directory จัดเก็บข้อมูลเกี่ยวกับวัตถุทั้งหมดบนเครือข่าย Object คือองค์ประกอบเดี่ยว เช่น ผู้ใช้, กลุ่ม, แอปพลิเคชัน หรืออุปกรณ์ที่แชร์ เช่น เซิร์ฟเวอร์หรือเครื่องพิมพ์ Objects ปกติถูกกำหนดเป็น resources (เช่น พิมพ์, คอมพิวเตอร์) หรือ security principals (เช่น ผู้ใช้, กลุ่ม)
Active Directory ใช้ชุดกฎที่เรียกว่า schema เพื่อกำหนด object classes และ attributes ของพวกเขา Schema ยังกำหนดรูปแบบชื่อของแต่ละ object AD ยังมี global catalog ที่มีข้อมูลเกี่ยวกับ objects ทั้งหมด Schema และ global catalog ทำให้ network admins ระบุและจัดการ objects ได้ง่าย นอกจากนี้ ด้วยการจัดเก็บข้อมูลที่เกี่ยวข้องกับ user accounts บนเครือข่าย เช่น ชื่อและรหัสผ่าน AD ช่วยให้ผู้ใช้และแอดมินที่ได้รับอนุญาตบนเครือข่ายนั้น เข้าถึงข้อมูลนี้ได้
AD ยังช่วยให้แอดมิน ผู้ใช้ และแอปพลิเคชัน เผยแพร่และค้นหา objects และ properties ของ objects ได้ พวกเขาทำได้ผ่าน query และ index mechanism ของ AD นอกจากนี้ AD ให้ replication service ที่มี 2 บทบาท: 1) รับรองว่า domain controllers ทั้งหมดในเครือข่ายมี complete copy ของข้อมูลไดเรกทอรีทั้งหมดสำหรับโดเมนของพวกเขา 2) รับรองว่าการเปลี่ยนแปลงข้อมูลในไดเรกทอรี จะถูก replicate ไปยัง domain controllers ทั้งหมดในโดเมน ด้วยการ maintain replicas ของ directory data บน domain controllers ทั้งหมด replication service รับรองความพร้อมใช้งานของไดเรกทอรี และเพิ่มประสิทธิภาพให้กับผู้ใช้ทุกคน
Active Directory Domain Services (AD DS) คืออะไร?
ใน Windows Server เวอร์ชันเก่า (Windows 2000 Server และ Windows Server 2003) บริการไดเรกทอรีชื่อว่า Active Directory แต่ตั้งแต่ Windows Server 2008 R2 และ 2008 เป็นต้นมา Microsoft เปลี่ยนชื่อเป็น Active Directory Domain Services
AD DS จัดเก็บข้อมูลไดเรกทอรี รวมถึงข้อมูล user accounts โดยใช้ structured data store ที่เรียกว่า directory Directory นี้ทำให้ข้อมูลไดเรกทอรีจัดระเบียบในรูปแบบตรรกะและลำดับชั้น AD DS ยังทำให้ directory data พร้อมใช้งานสำหรับ network users และ administrators ที่ได้รับอนุญาต
เหมือนกับ AD, AD DS มี replication system ที่สร้างและอัปเดต global catalog server (ซึ่งเป็น domain controller) อัตโนมัติ Catalog นี้จัดเก็บ full writable replica ของ objects ทั้งหมดและ attributes ในโดเมน รวมถึง partial read-only replicas ของโดเมนอื่นๆ ใน forest การ replicate attributes ทำให้ user และ admin ค้นหา objects ใน AD DS ได้ง่าย
AD DS ให้ความปลอดภัยผ่าน built-in sign-in authentication และ access control mechanisms กลไกเหล่านี้อนุญาตให้ authorized users เข้าถึง network resources และให้ admins จัดการ directory data และ organization ทั่วเครือข่ายด้วย username และ password เดียว
เพื่อรองรับ network admins เพิ่มเติม AD DS ให้ policy-based administration ช่วยให้แอดมินจัดการเครือข่ายซับซ้อนได้ง่าย
โหมด โปรโตคอล และบริการของ Active Directory
บริการหลายตัวรวมกันเป็น Active Directory บริการหลักคือ Domain Services แต่ AD ยังมีบริการอื่นๆ:
- Active Directory Lightweight Directory Services (AD LDS): โหมดอิสระของ AD ทำงานอิสระจาก AD domains หรือ forests ติดตั้งได้โดยไม่กระทบ AD ให้บริการไดเรกทอรีสำหรับแอปพลิเคชัน รวมถึง data store ใช้ standard APIs เข้าถึงข้อมูลแอป แต่ไม่มี infrastructure features ของ AD
- Lightweight Directory Access Protocol (LDAP): โปรโตคอลบริการไดเรกทอรี ใช้เข้าถึงและ maintain directories ผ่านเครือข่าย 基于 client-server model LDAP รันบน layer เหนือ TCP/IP stack LDAP ไม่ใช้สร้าง directories หรือระบุว่า directory service ควรทำงานอย่างไร ฟังก์ชันหลักช่วยจัดการ directory
- Active Directory Certificate Services (AD CS): ใช้สร้าง จัดการ และแชร์ public key infrastructure certificates Certificate ใช้ encryption ให้ user แลกเปลี่ยนข้อมูลผ่านอินเทอร์เน็ตอย่างปลอดภัยด้วย public key Certificates ให้ confidentiality ผ่าน encryption; authenticate computers, users, device accounts; รักษาความสมบูรณ์ของเอกสารดิจิทัลผ่าน digital signatures
- Active Directory Federation Services (AD FS): ตรวจสอบสิทธิ์การเข้าถึงแอปพลิเคชันหลายตัว แม้บนเครือข่ายต่างกัน ด้วย single sign-on (SSO) SSO ต้องการ sign on เพียงครั้งเดียว แทนที่จะใช้ authentication keys แยกสำหรับแต่ละบริการ ด้วยการอนุญาตให้แชร์ digital identity และ entitlements rights ข้ามขอบเขตความปลอดภัยและองค์กร AD FS ช่วย streamline ประสบการณ์ผู้ใช้เมื่อเข้าถึง internet-facing applications
- Active Directory Rights Management Services (AD RMS): ช่วยองค์กรปกป้องเอกสารด้วย information rights management (IRM) ด้วย AD RMS สร้าง IRM policies ระบุว่าใครเข้าถึงข้อมูล nhạy cảmได้ ป้องกันการใช้หรือใช้ผิดโดย unauthorized people
คุณสมบัติหลักของ AD และ AD DS logical model
Active Directory Domain Services ใช้ logical model ประกอบด้วย forests, domains และ organizational units (OUs) โมเดลนี้สำคัญเพราะให้วิธี:
- จัดเก็บและจัดการข้อมูล network resources
- จัดเก็บและจัดการ application-specific data จาก directory-enabled applications
- ช่วยแอดมินจัดระเบียบ users, computers, devices และ elements อื่นๆ ของเครือข่ายเป็น hierarchical containment structure
Objects ต่างๆ ที่แชร์ database เดียวกัน อยู่บน domain เดียวกัน Tree คือหนึ่งหรือหลาย domains จัดกลุ่มด้วย hierarchical trust relationships Forest คือกลุ่มของ multiple trees Forests ให้ security boundaries ในขณะที่ domains (แชร์ common database) จัดการ settings เช่น authentication และ encryption ได้
หน้าที่ของแต่ละองค์ประกอบ:
- Forest: top-level container ใน AD DS หมายถึงกลุ่มของหนึ่งหรือหลาย AD domains ให้ common logical structure สำหรับโดเมนเหล่านั้น และลิงก์พวกเขาอัตโนมัติด้วย two-way transitive trust relationships ความสัมพันธ์เหล่านี้ทำให้ AD DS ให้ความปลอดภัยข้าม multiple domains หรือ forests ทำให้ domains ขยาย authentication services ไปยัง users ใน domains นอก forest ของพวกเขา
- Domain: container หรือ partition ภายใน forest ให้ network-wide user identity สร้าง user identities ครั้งเดียว แล้วอ้างอิงได้บน computer ใดๆ ที่ join forest ที่ domain ตั้งอยู่ Domain controller สำหรับ domain เฉพาะมี copy ของ directory สำหรับทั้ง domain
- OU: smallest element ของ AD DS logical model OUs สร้าง hierarchy ของ containers ภายใน domain แอดมินมักใช้ OUs เพื่อทำให้ administrative tasks เรียบง่าย เช่น การ apply Group Policies OUs ยังใช้สำหรับ delegation of authority ให้ owner โอน administrative control (เต็มหรือจำกัด) ให้ users หรือ groups อื่นๆ เพื่อทำให้การจัดการ objects เรียบง่าย
Domain-forest-OU model ของ AD DS ใช้ได้ไม่ว่าจะเป็น network topology อะไร และจำนวน domain controllers ที่ต้องการในแต่ละ domain
คุณสมบัติหลักของ AD และ Active Directory Domain Services
คุณสมบัติหลักหนึ่งของ AD และ AD DS คือใช้ structured และ hierarchical data store เพื่อจัดระเบียบและเผยแพร่ directory information อย่างมีตรรกะ (ข้อมูลเกี่ยวกับ objects ที่จัดเก็บใน AD DS directory) Objects อาจรวมถึง: Users, Groups, Computers, Domains, OUs, Security policies
Standardized schema ใช้กำหนด object classes, attributes, names, constraints และ limits บน instances ของ objects เหล่านี้ Default schema ใน AD โมดตาม ISO X.500 standards สำหรับ directory services ยัง extensible (เพิ่ม/แก้ไข classes และ attributes ได้) AD schema จัดเก็บใน schema directory partition และ replicate ไปยัง domain controllers ทั้งหมดใน forest
คุณสมบัติสำคัญอีกอย่าง: AD ใช้ 4 directory partition types เพื่อจัดเก็บและคัดลอกข้อมูลประเภทต่างๆ ในไฟล์ Ntds.dit บน domain controller ของโดเมน Users และ administrators เข้าถึงข้อมูลนี้ทั่ว domain Directory partition ปกติมีข้อมูลเกี่ยวกับ domain, configuration, schema และ applications
AD และ AD DS มี query และ index mechanism กลไกนี้ช่วยให้ network users หรือ applications หา objects และ properties ที่จัดเก็บใน AD ได้ สุดท้าย AD replication service แจกจ่าย directory data ข้ามเครือข่าย AD รวม Knowledge Consistency Checker ที่สร้าง replication connections จาก source DC ไป destination DC อัตโนมัติ และสร้าง replication topology สำหรับ AD forest
Trusting terminology (ศัพท์เกี่ยวกับ Trust)
Active Directory พึ่งพา trusts เพื่ออำนวยความสะดวก authentication และให้ความปลอดภัยข้าม multiple domains หรือ forests Trust relationships นี้ใช้กับ domains และ forests ใน AD AD trusts ทำงานถูกต้องก็ต่อเมื่อทุก resource มี direct trust path ไปยัง domain controller ใน domain ที่ resource ตั้งอยู่ นอกจากนี้ เพื่ออำนวยความสะดวก Windows ตรวจสอบว่า domain ที่ user หรือ computer request มี trust relationship กับ domain ของ requesting account แล้วหรือไม่
Trust-related terms สำคัญใน AD:
- One-way trust: Domain A อนุญาตสิทธิ์เข้าถึงให้ users บน Domain B แต่ Domain B ไม่อนุญาตให้ users เข้าถึง Domain A (unidirectional authentication path)
- Two-way trust: โดเมนทั้งสองไว้ใจกัน Authentication requests ผ่านได้ทั้งสองทาง
- Trusted domain: โดเมนเดียวที่อนุญาต user access ไปยังอีกโดเมนหนึ่ง (trusting domain) Forests ใช้ trusted domain objects จัดเก็บ trusted namespaces
- Transitive trust: ขยายเกิน 2 domains อนุญาต access ไปยัง trusted domains อื่นใน forest ใน AD two-way transitive trust สร้างอัตโนมัติระหว่าง new domains และ parent domains ใน forest
- Nontransitive trust: One-way trust จำกัด 2 domains ใช้ปฏิเสธ trust relationships กับ domains อื่น
- Forest trust: ให้ seamless authentication และ authorization ข้าม multiple AD forests เข้าถึง resources และ objects ใน forests เหล่านั้นได้ เป็น one-way หรือ two-way transitive
ประวัติและการพัฒนา Active Directory
Microsoft เสนอ preview Active Directory ในปี 1999 และเผยแพร่ปีถัดไปกับ Windows 2000 Server Microsoft พัฒนาฟีเจอร์ใหม่กับแต่ละ Windows Server release ต่อเนื่อง
- Windows Server 2003: อัปเดตสำคัญเพิ่ม forests และความสามารถ edit/เปลี่ยนตำแหน่ง domains ใน forests Domains บน Windows 2000 Server ไม่รองรับ AD updates ใหม่ใน Server 2003
- Windows Server 2008: นำเสนอ AD FS นอกจากนี้ Microsoft rebrand directory สำหรับ domain management เป็น AD DS และ AD กลายเป็น umbrella term สำหรับ directory-based services ที่รองรับ AD DS พร้อมใน Windows Server ล่าสุด: 2016, 2019, 2022, 2025
- Windows Server 2016: อัปเดต AD DS ปรับปรุง AD security และย้าย AD environments ไป cloud/hybrid cloud เพิ่ม privileged access management (PAM) ติดตามการเข้าถึง object, ประเภท access, actions ของ user PAM เพิ่ม bastion AD forests ให้ isolated forest environment เพิ่ม จบ support อุปกรณ์บน Windows Server 2003
- ธันวาคม 2016: เปิดตัว Azure AD Connect (ตอนนี้ Microsoft Entra Connect) รวม on-premises AD กับ Azure AD (ตอนนี้ Microsoft Entra ID) ผ่าน integration นี้ องค์กรเชื่อม identities และ access controls บน local networks กับ Microsoft cloud services (Office 365) เปิดใช้ SSO ที่ใช้งานง่าย Azure AD Connect ทำงานกับ Windows Server 2008, 2012, 2016, 2019 ทุก version 1.x ถูกเกษียณ 31 ส.ค. 2022
Domains เทียบกับ Workgroups
Workgroup คือ term ของ Microsoft สำหรับ Windows machines ที่เชื่อมต่อผ่าน peer-to-peer (P2P) network Workgroups เป็นหน่วยจัดระเบียบอีกอย่างสำหรับ Windows computers ในเครือข่าย Workgroups ให้ machines แบ่งปันไฟล์, อินเทอร์เน็ต, พิมพ์ และทรัพยากรอื่นๆ P2P networking กำจัดความต้องการ server สำหรับ authentication ความแตกต่างหลัก:
- Domains โฮสต์ computers จาก local networks ต่างๆ ได้ Workgroups ไม่ได้
- Domains โฮสต์ computers ได้มากกว่า (พันๆ เครื่อง) Workgroups ประมาณ 20 เครื่องสูงสุด
- Domains มี server อย่างน้อย 1 เครื่อง ควบคุม permissions และ security features ทุกเครื่องใน domain Workgroups ไม่มี server ทุกเครื่องเป็น peers
- Domain users ต้องการ security identifiers (logins, passwords) Workgroups ไม่ต้อง
คู่แข่งหลักของ Active Directory
Directory services อื่นๆ ที่ให้ฟังก์ชันคล้าย AD:
- Red Hat Directory Server: LDAP-based directory จัดการ user access หลายระบบใน Unix environments ให้ network-based registry รวม identity information มี user ID และ certificate-based authentication มี centralized fine-grained access control และ enhanced data protection
- Apache Directory: open source project รันบน Java ทำงานบน LDAP server ใดๆ (Windows, macOS, Linux) ให้ LDAP v3-compliant directory server และ Eclipse-based tool (Apache Directory Studio) มี LDAP API เข้าถึง LDAP servers ทุกประเภท
- OpenLDAP: open source alternative อีกตัว open source implementation ของ LDAP มี modules: standalone LDAP load balancer daemon, standalone LDAP daemon (server), libraries, tools, sample clients
IT ต้องจัดการ Group Policies ต่างๆ สำหรับ desktops อย่างระมัดระวัง ให้ policies ที่ถูกต้องถูกนำไปใช้ เรียนรู้เมื่อ AD domain-joined Group Policy override local