Table of Contents |
---|
English |
---|
IntroductionThis article describes the single sign-on (SSO) setup between Joget and Microsoft Active Directory using Kerberos and SPNEGO. Kerberos is a network authentication protocol designed by the Massachusetts Institute of Technology (MIT) for SSO in client-server environments, while SPNEGO (Simple and Protected GSS-API Negotiation Mechanism) extends Kerberos SSO to web applications. |
Thai |
---|
บทนำ
Kerberos เป็นโปรโตคอลการตรวจสอบความถูกต้องเครือข่ายที่ออกแบบโดย Massachusetts Institute of Technology (MIT) สำหรับ SSO ในสภาพแวดล้อมของไคลเอนต์ - เซิร์ฟเวอร์ในขณะที่ SPNEGO (กลไกการเจรจาต่อรอง GSS-API ที่ง่ายและมีการป้องกัน) ขยาย Kerberos SSO ไปยังเว็บแอปพลิเคชัน |
...
Thai |
---|
สภาพแวดล้อมการทดสอบ |
Joget Server: Joget Workflow v6 DX 8 Enterprise on Apache Tomcat 8 9 and Java 811
Windows Server: Windows Server 2012 R2 Datacenter 2022 (running on VirtualBox within a NAT Network, downloaded from from https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2012-r2)
Windows Client PC: IE11 on Windows 10 (running on VirtualBox within a NAT Network, downloaded from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/)
...
In PowerShell on the Windows Server, generate a keytab file using the Ktpass tool:
Thai ใน PowerShell บน Windows Server ให้สร้างไฟล์ตารางคีย์โดยใช้เครื่องมือ Ktpass:
Code Block ktpass -out joget.keytab -mapuser joget@WINDOWS.LOCAL -pass Pass@word1 -crypto all -ptype KRB5_NT_PRINCIPAL -princ HTTP/joget.windows.local@WINDOWS.LOCAL
Copy the generated jogetgenerated joget.keytab file keytab file into the Joget server e.g. at C:\Joget -v6-DX 8 Enterprise\wflow\joget.keytab
Thai คัดลอกไฟล์ joget.keytab ที่สร้างไปยังเซิร์ฟเวอร์ Joget เช่น ที่ C: \ Joget -v6-DX 8 Enterprise \ wflow \ joget.keytab
Java 8 may be required for the Kerberos authentication to work with the ktpass generated keytab. Download and install JDK 8, and edit the tomcat-run.bat startup script to update the JAVA_HOME path accordingly.
Thai อาจจำเป็นต้องใช้ Java 8 สำหรับการพิสูจน์ตัวตน Kerberos เพื่อทำงานกับ ktpass keytab ที่สร้างขึ้น ดาวน์โหลดและติดตั้ง JDK 8 และแก้ไขสคริปต์เริ่มต้น tomcat-run.bat เพื่ออัปเดตพา ธ JAVA_HOME ตามลำดับ
Create a krb5.ini file under C:\Windows folder with these configurations:
Thai สร้างไฟล์ krb5.ini ภายใต้โฟลเดอร์ C: \ Windows ด้วยการกำหนดค่าเหล่านี้:
Code Block [libdefaults] default = WINDOWS.LOCAL default_realm = WINDOWS.LOCAL dns_lookup_realm = true dns_lookup_kdc = true [realms] WINDOWS.LOCAL = { kdc = WIN-TKDH9LCHUUO.WINDOWS.LOCAL:88 default_domain = WINDOWS.LOCAL } [domain_realm] .windows.local = WINDOWS.LOCAL windows.local = WINDOWS.LOCAL
...
Install the krb5-user package
Thai ติดตั้งแพ็คเกจผู้ใช้ krb5
Code Block sudo apt-get install krb5-user
and configure the realm as WINDOWS.LOCAL and the KDC as WIN-TKDH9LCHUUO.WINDOWS.LOCAL:88
Thai และกำหนดค่า realm เป็น WINDOWSLOCAL และ KDC เป็น WIN-TKDH9LCHUUO.WINDOWS.LOCAL: 88
In a terminal, run
Thai ในเทอร์มินัลให้เรียกใช้
Code Block kinit joget@WINDOWS.LOCAL
Info IMPORTANT NOTE: The domain must be UPPER CASE
Thai หมายเหตุที่สำคัญ: โดเมนจะต้องเป็นกรณีบน
The command should run without errorThai คำสั่งควรรันโดยไม่มีข้อผิดพลาด
Confirm the configuration in /etc/krb5.conf
Thai ยืนยันการกำหนดค่าใน /etc/krb5.conf
Code Block [libdefaults] default = WINDOWS.LOCAL default_realm = WINDOWS.LOCAL dns_lookup_realm = true dns_lookup_kdc = true [realms] WINDOWS.LOCAL = { kdc = WIN-TKDH9LCHUUO.WINDOWS.LOCAL:88 default_domain = WINDOWS.LOCAL } [domain_realm] .windows.local = WINDOWS.LOCAL windows.local = WINDOWS.LOCAL
Info IMPORTANT NOTE: The domain must be UPPER CASE
Thai หมายเหตุที่สำคัญ: โดเมนจะต้องเป็นกรณีบน
In a terminal, generate a keytab file using:
Thai ในเทอร์มินัลสร้างไฟล์ keytab โดยใช้:
Code Block ktutil ktutil: add_entry -password -p HTTP/JOGET.WINDOWS.LOCAL@WINDOWS.LOCAL -k 1 -e arcfour-hmac-md5 Password for HTTP/JOGET.WINDOWS.LOCAL@WINDOWS.LOCAL: ktutil: wkt /etc/joget.keytab
List the SPNs in the keytab using:
Thai แสดงรายการ SPN ในแท็บตารางโดยใช้:
Code Block ktutil ktutil: rkt /etc/joget.keytab ktutil: list
...
In Settings > Directory Manager, select the Kerberos Directory Manager plugin, and key in the appropriate values in the configuration:
Thai ในการตั้งค่า> ตัวจัดการไดเรกทอรีเลือกปลั๊กอิน Kerberos Directory Manager และป้อนค่าที่เหมาะสมในการกำหนดค่า:
Service Principal: HTTP/JOGET.WINDOWS.LOCAL
Path to Keytab File: /etc/joget.keytab (Linux) or C:/Joget -v6-DX 8 Enterprise/wflow/joget.keytab (Windows)
Debug Enabled: View debugging messages in the logs
Note Please remember to configure the LDAP Directory Manager as external directory manager to retrieve users from Active Directory.
Thai โปรดจำไว้ว่าให้กำหนดค่าตัวจัดการไดเรกทอรี LDAP เป็นตัวจัดการไดเรกทอรีภายนอกเพื่อดึงผู้ใช้จาก Active Directory
...