OpenLDAP를 supportedControl 이 컨트롤에 의해.OpenLDAP를 supportedControl 암호 정책
Cygwin 환경에서 로컬로 빌드/실행되는 최신 Openldap 소스를 사용하고 있으며 빌드에서 PPolicy 관련 구성을 모두 활성화하고 PPolicy를 구성 및 작동/테스트했습니다. 디렉토리 서비스 프로그래밍 가이드에서, 링크 예를 수정하여
다음
암호 정책을 요청하도록 구성된 DirectoryControl로 채워진 SearchRequest에를 사용하는 http://dunnry.com/blog/2006/05/11/DotNetDevGuideToDirectoryServicesCompanionSiteLaunched.aspx
는 나에게 아무 것도 얻을 수 없습니다. 모든 서버 소스에 잘 보이는 : http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob_plain;f=servers/slapd/overlays/ppolicy.c;hb=HEAD
사람이 SearchRequest에에서 닷넷 DirectoryControls를 사용하여 운이 있었나요? 난 당신과 같은 문제가 있었다 및 실패 많은 것들을 시도하고 시간이 부족
_authConnect.AuthType = AuthType.Basic;
// credentials.UserName is a user DN format, w/password and null domain
_authConnect.Credential = credentials;
Debug.WriteLine("PV: " + _authConnect.SessionOptions.ProtocolVersion);
var sr = //new ExtendedRequest();
new SearchRequest(credentials.UserName, "(objectclass=*)", SearchScope.Base, null);
//new DsmlAuthRequest(credentials.UserName);
var isCritical = false;
var ppolicy = "1.3.6.1.4.1.42.2.27.8.5.1";
// ppolicy request and response control is referred to by the same OID
sr.Controls.Add(new DirectoryControl(ppolicy, null, isCritical, true));
sr.Controls.Add(new DirectoryControl(ppolicy, new byte[8], isCritical, false));
try
{
var response = (SearchResponse)_authConnect.SendRequest(sr);
DirectoryControl[] c = response.Controls;
if (c.Rank > 0 && c.GetLength(0) > 0)
{
Debug.WriteLine(c[0].Type + " value: " + c[0].GetValue());
}
SearchResultEntry entry = response.Entries[0];
c = entry.Controls;
if (c.Rank > 0 && c.GetLength(0) > 0)
{
Debug.WriteLine(c[0].Type + " value: " + c[0].GetValue());
}
return true;
}
catch (LdapException ex)
{
Debug.WriteLine(ex.Message);
}
권한 상태 (바인드 포함)를 설정하는 데 사용하는 인증 ID가 해당 요청 컨트롤을 사용하도록 허용되었는지 확인 했습니까? –
'slapd -d -1'의 출력에 아무것도 나타나지 않습니다. 권한 문제가 있음을 나타냅니다. – ticktock
디렉토리 서버 로그는 권한 상태에 해당 컨트롤을 사용할 수있는 권한이 없기 때문에 요청이 실패했음을 나타냅니다. BTW, 요청에 응답 컨트롤 OID를 포함하지 마십시오. 응답 컨트롤이 있으면 서버의 응답에 표시됩니다. –