※この記事は以下の記事の日本語訳です。
How to Troubleshoot LDAP Authentication
https://live.paloaltonetworks.com/t5/Management-Articles/How-to-Troubleshoot-LDAP-Authentication/ta-...
この文章では、次のようなLDAP認証上でのトラブルについてどのように問題を切り分けるかを記載します。
LDAP認証が、デバイスの管理者アクセス、Captive Portal、GlobalProtectに対して設定されていますが、認証が常に失敗します。
この問題の予備知識:
認証のプロセスは、管理プレーン上のauthdプロセスによって動作します。すべてのデバッグ ログはmp-logのauthd.logに出力されます。
1. LDAPサーバー プロファイルを確認します。
# show shared server-profile ldap
ldap {
ad2008 {
server {
myadserver {
port 389;
address 10.0.0.10;
}
}
ldap-type active-directory;
base DC=panw,DC=dom;
bind-dn admin@panw.dom;
timelimit 30;
bind-timelimit 30;
bind-password -AQ==LEkLjmi5LnnONEwl89h/wpfRI0Y=AgBprzhy+CcbuOsMV
ssl no;
}
}
1.1
TCPポートの389番が一般的なLDAP通信では使われます。389番ポートを使用する場合、必ずSSL設定がされていない (ssl no;)ことを確認してください。
仮にSSLが有効だと、LDAPサーバー側でLDAPSがサポートされていること、そしてTCPポートの636番(LDAPSのデフォルトポート)が設定されたサーバー プロファイルで設定されていることをご確認ください。
# show shared server-profile ldap
ldap {
ad2008 {
server {
myadserver {
port 636;
address 10.0.0.10;
}
}
ldap-type active-directory;
base DC=panw,DC=dom;
bind-dn admin@panw.dom;
timelimit 30;
bind-timelimit 30;
bind-password -AQ==LEkLjmi5LnnONEwl89h/wpfRI0Y=AgBprzhy+CcbuOsMV
ssl yes;
}
}
1.2 LDAPサーバー プロファイルで、ベースのドロップ ダウンリストから選択されれば(Device > LDAP > LDAP Server Profile)ベースDNはPalo Alto Networks装置から自動的に取得されるはずです。自動取得されたものをLDAPサーバー ベースとして使用することを強く推奨します。.
1.3 LDAPサーバー プロファイルで、ドメイン名を手動で設定することができます。この個所を空白のままにしておくことを推奨します、そうすればPAN-OSは自動的にドメイン名を推測することができます。この設定は、複数のADドメインが存在していて、各々を特定化するために使用されます。
1.4 LDAP接続を確認する方法としては、Group-Mapping 設定をする際にLDAPツリー ブラウザーを参照することです(該当のLDAPサーバーをサーバー プロファイルで選択してください)
上記画面のようにLDAP情報が参照できれば、LDAPサーバー プロファイルは正しく設定されていることを意味します。
2. デバッグ ログauthd.logを確認する
authd.logログ出力をCLIの”tail follow yes mp-log authd.log”で確認すると、次のような典型的なログ出力が成功例、失敗例で確認できます。
「認証成功例」
Jan 08 14:00:46 pan_authd_service_req(pan_authd.c:2604): Authd:Trying to remote authenticate user: user1
Jan 08 14:00:46 pan_authd_service_auth_req(pan_authd.c:1115): AUTH Request <'vsys1','adauth','user1'>
Jan 08 14:00:46 pan_authd_handle_nonadmin_auths(pan_authd.c:2245): vsys, authprof <vsys1,adauth> doesnot exist in db, trying 'shared' vsys
Jan 08 14:00:46 pan_authd_common_authenticate(pan_authd.c:1511): Authenticating user using service /etc/pam.d/pan_ldap_shared_adauth_0,username user1
Jan 08 14:00:46 pan_authd_authenticate_service(pan_authd.c:663): authentication succeeded (0)
「認証失敗例」
Jan 09 23:21:15 pan_authd_service_req(pan_authd.c:2604): Authd:Trying to remote authenticate user: user1
Jan 09 23:21:15 pan_authd_service_auth_req(pan_authd.c:1115): AUTH Request <'vsys1','adauth','user1'>
Jan 09 23:21:15 pan_authd_handle_nonadmin_auths(pan_authd.c:2245): vsys, authprof <vsys1,adauth> doesnot exist in db, trying 'shared' vsys
Jan 09 23:21:15 pan_authd_common_authenticate(pan_authd.c:1511): Authenticating user using service /etc/pam.d/pan_ldap_shared_adauth_0,username user1
Jan 09 23:21:21 pan_authd_authenticate_service(pan_authd.c:663): authentication failed (6)
Jan 09 23:21:21 pan_authd_common_authenticate(pan_authd.c:1531): Authenticating user using service /etc/pam.d/pan_ldap_shared_adauth_0,usename user1 failed - trying other hosts
Jan 09 23:21:21 pan_authd_common_authenticate(pan_authd.c:1506): Skipping LDAP server due to missing Auth-Profile: pan_ldap_shared_adauth_1
Jan 09 23:21:21 pan_authd_common_authenticate(pan_authd.c:1506): Skipping LDAP server due to missing Auth-Profile: pan_ldap_shared_adauth_2
Jan 09 23:21:21 pan_authd_common_authenticate(pan_authd.c:1506): Skipping LDAP server due to missing Auth-Profile: pan_ldap_shared_adauth_3
Jan 09 23:21:21 authentication failed for user <shared,adauth,user1>
Jan 09 23:21:21 pan_authd_process_authresult(pan_authd.c:1258): pan_authd_process_authresult: user1 authresult not auth'ed
Jan 09 23:21:21 pan_authd_process_authresult(pan_authd.c:1282): Alarm generation set to: False.
Jan 09 23:21:21 User 'user1' failed authentication. Reason: Invalid username/password From: 192.168.0.17
これらのログ出力は認証失敗したとても一般的な出力で、他の問題と混同しがちです。
同様のログ出力は、様々なケースで見受けられます。
3. サービス ルート設定の確認
サービス ルート設定がUIDエージェント サービス用に設定されている場合、グループ マッピング テストは成功しますが、LDAP認証が失敗する可能性があります。それは、Palo Alto Networksデバイスはマネージメント インターフェイスを送信元のインターフェイスとして利用するからです。確かに、Group Mapping はUseriddプロセスが管理していますが、前述したとおり、認証サービスはAuthdプロセスが管理していてこのサービスに対して個別のサービス ルート設定ができません。もしLDAP認証のリクエストにマネージメント インターフェイスが設定されていない場合、個別のLDAPサーバーIPアドレスを、以下の設定例のように宛先として、サービス ルート設定する必要があります。