2026 Spring NASA 3! Identity Services
[!Note]Group Member B12902016 林品齊 B13902061 李佑安 B13902077 李承翰
[!Note] Operating Manual Architecture Documentation
[!Note] Midterm Midterm Presentation Video Midterm Presentation Slides
LDAP Mock Server (系上的模擬LDAP伺服器)
1. 伺服器連線資訊
項目 |
設定值 |
|---|---|
Domain Name |
|
Host IP |
|
Protocol & Port |
|
Base DN |
|
mockldap_ca.crt 在這裡下載,以csie的Google帳號登入
2. 結構
主要包括以下三個OU,
ou=people
存放所有測試用個人帳號。
大學部:學號格式如
b11902991。研究生:學號格式如
r11922091或r11922a91。校友:包括
b08902991與r09922091。教職員/TA:
ta1到ta5,prof1到prof4。Mail組測試帳號:
mailtest
ou=group
存放 POSIX 系統群組,類別為 posixGroup。
cn=student(GID: 450)cn=graduate(GID: 400)cn=alumni(GID: 500)cn=staff(GID: 200)cn=mailAdmin(GID: 62100),管理mail組測試帳號
ou=Aliases
ObjectClasses:
organizationalUnit,extensibleObject,groupOfUniqueNames。用途:Mail Subscription 組管理使用
3. 認證與權限規範
匿名存取: 可讀取所有帳號除了密碼以外的資訊。
測試帳號登入: 所有
ou=people下的節點密碼與 uid 相同,如帳號uid=b11902991的密碼即為b11902991。服務帳號:
uid=mailtest,ou=people,dc=csie,dc=ntu,dc=edu,dc=tw具備ou=Aliases節點及其子樹狀目錄的完整寫入權限。
4. HAProxy
為了達成 High Availability,在 iden4(172.16.127.120)架設了 iden2(172.16.127.109)的 Backup 伺服器,服務則統一用 mockldap.nasa (或省略後綴,mockldap)連虛擬IP 172.16.127.151 存取。
5. 查詢與操作範例
查詢特定使用者資訊
LDAPTLS_CACERT=mockldap_ca.crt ldapsearch -x -H ldaps://mockldap \
-b "ou=people,dc=csie,dc=ntu,dc=edu,dc=tw" "(uid=b11902991)"
查詢特定群組的成員
LDAPTLS_CACERT=mockldap_ca.crt ldapsearch -x -H ldaps://mockldap.nasa \
-b "cn=alumni,ou=group,dc=csie,dc=ntu,dc=edu,dc=tw" memberUid
3! LDAP (內部使用的LDAP server)
1. 伺服器連線資訊
項目 |
設定值 |
|---|---|
Domain Name |
|
Host IP |
|
Protocol & Port |
|
Base DN |
|
nasaldap_ca.crt 內容在這裡下載,以csie的Google帳號登入
2. 更改預設密碼
LDAPTLS_REQCERT=nasaldap_ca.crt ldappasswd -x -H ldaps://nasaldap.nasa
-D "uid=$UID,ou=people,dc=csie,dc=ntu,dc=edu,dc=tw" -W -S
3. 綁定服務
目前綁定VPN服務,可用這組帳號密碼登入 3! VPN。
4. HAProxy
為了達成 High Availability,在 iden3(172.16.127.119)架設了 iden1(172.16.127.105)的 Backup 伺服器,服務則統一用 nasaldap.nasa (或省略後綴,nasaldap)連虛擬IP 172.16.127.150 存取。
防火牆 (OPNsense)
共通網路配置 (正常情況都是連這個)
WAN: 140.112.187.49/27
LAN: 172.16.127.254/16
OpenVPN: 10.8.0.1/24
opnsense-master (vmid: 252)
有三張網卡
net0 - LAN:
沒有 VLAN tag
IP: 172.16.127.252/16
Web GUI 在 8443 port
net1 - WAN:
VLAN tag: 187
IP: 140.112.187.50/27
net2 - PFSYNC:
VLAN tag: 254
IP: 10.0.0.1/30
opnsense-backup (vmid: 253)
有三張網卡
net0 - LAN:
沒有 VLAN tag
IP: 172.16.127.253/16
Web GUI 在 8443 port
net1 - WAN:
VLAN tag: 187
IP: 140.112.187.51/27
net2 - PFSYNC:
VLAN tag: 254
IP: 10.0.0.2/30
目前防火牆規則
WAN: 除了 icmp, TCP port 80,443, UDP port 1194 以外的向內流量都 block。往外流量全部 pass。
LAN: 所有連外的流量都 pass。
OpenVPN: VPN client 可以戳 LAN 內的機器。
HAProxy
功能
Reverse Proxy + Load Balancing
可做 SSL offloading (SSL termination)
Health Monitor
目前串好的 Application
組別 |
Domain Name |
IP(s) |
Port(s) |
|---|---|---|---|
wifi |
apmap.csie.org |
172.16.127.110 |
80 |
newprinting |
newprinting.csie.org |
172.16.127.103 |
80 |
mailsus.csie.org |
172.16.127.118 |
80 |
|
cspace |
cspace.csie.org |
172.16.127.101 |
80 |
VPN
目前可以用以下幾種方式連上 VPN(請按這裡下載 VPN 檔案):
在 Terminal 中輸入
sudo openvpn <.ovpn file>開啟 OpenVPN Connect,上傳
.ovpn檔案開啟 Tunnelblick,匯入
.ovpn檔案
帳號密碼為三階帳號名稱以及用 ldappasswd 設定的密碼。