C#では、次のコードを使用して安全なLDAPサイトにバインドしています
authServer =
new DirectoryEntry("LDAP://whatever.com:636",
authServerUsernameFromConfig,
authServerPasswordFromConfig,
AuthenticationTypes.Anonymous );
次に、OKと判断されたユーザーを検索します。
次に、次のコレクションを調べて、「groupMembership」のプロパティ名を探します。
DirectorySearcher directorySearch = new DirectorySearcher(authServer, filterKey);
...
SearchResult result = directorySearch.FindOne();
...
authUser = new DirectoryEntry(result.Path, userDN, password, AuthenticationTypes.None);
...
(read) authUser.Properties.PropertyNames
ただし、636セキュアポートを使用している場合は何も見つかりません。他のプロパティが見つかりました。セキュアでないPORTにバインドすると、すべてのプロパティが636バインドのプロパティとgroupMembershipという名前のプロパティの両方で検出されます。
なぜこれが起こるのか、またはそれらを取得する方法を誰かが説明できますか?
LDP.exeユーティリティを使用すると、安全なポート636バインドでこれらのgroupMembershipプロパティを確認できるようです。