사용자 암호를 사용하지 않고 Alfresco 로그인 티켓을 가져 오는 기능을 가진 DLL을 작성하고 있습니다 (사용자 이름 UPN). alfresco REST API 서비스 /wcservice을 호출합니다. 나는 Alfresco에서 NTLM을 사용합니다.사용자 암호없이 Alfresco 로그인 티켓을 얻는 방법 (사용자 본명 (UPN)을 가장한 사용자)
여기에 설명 된대로 WindowsIdentity
생성자를 사용하여 사용자를 가장합니다. http://msdn.microsoft.com/en-us/library/ms998351.aspx#paght000023_impersonatingbyusingwindowsidentity. 내가 확인하고 사용자가 적절하게 가장 한 것입니다 (나는 WindowsIdentity.GetCurrent().Name
속성을 확인했습니다).
사용자를 가장한 후 HttpWebRequest
으로 설정하고 자격 증명을 CredentialsCache.DefaultNetworkCredentials
으로 설정하려고합니다. 내가 요청 자격 증명을 설정하는 new NetworkCredential("username", "[email protected]")
를 사용할 때 나는 프레스코 로그인 티켓 (HttpStatusCode.OK
, 200)를 얻을
The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
: 나는 오류가 발생합니다.
사용자 비밀번호없이 Alfresco 로그인 티켓을 얻을 수있는 방법이 있습니까?
17:18:04,550 DEBUG [app.servlet.NTLMAuthenticationFilter] Processing request: /alfresco/wcservice/mg/util/login SID:7453F7BD4FD2E6A61AD40A31A37733A5
17:18:04,550 DEBUG [web.scripts.DeclarativeRegistry] Web Script index lookup for uri /mg/util/login took 0.526239ms
17:18:04,550 DEBUG [app.servlet.NTLMAuthenticationFilter] New NTLM auth request from 10.**.**.** (10.**.**.**:1229)
17:18:04,566 DEBUG [app.servlet.NTLMAuthenticationFilter] Processing request: /alfresco/wcservice/mg/util/login SID:7453F7BD4FD2E6A61AD40A31A37733A5
17:18:04,566 DEBUG [web.scripts.DeclarativeRegistry] Web Script index lookup for uri /mg/util/login took 0.400909ms
17:18:04,566 DEBUG [app.servlet.NTLMAuthenticationFilter] Received type1 [Type1:0xe20882b7,Domain:<NotSet>,Wks:<NotSet>]
17:18:04,566 DEBUG [app.servlet.NTLMAuthenticationFilter] Client domain null
17:18:04,675 DEBUG [app.servlet.NTLMAuthenticationFilter] Sending NTLM type2 to client - [Type2:0x80000283,Target:AlfrescoServerA,Ch:197e2631cc3f9e0a]
http : // alfrescoserver/alfresco/s/api/login을 사용하는 경우 사용자의 암호를 매개 변수로 제공해야하므로 피하려고합니다. 나는 내가하려는 일이 가능해야한다고 생각한다. 내가해야 할 일은 HTTP 요청에 대한 올바른 자격 증명을 얻는 것입니다. 어쩌면 더블 홉 문제 (http://blogs.msdn.com/b/knowledgecast/archive/2007/01/31/the-double-hop-problem.aspx)가 있으며 Microsoft의 문서 인 Kerberos 문제 해결 위임 (http://www.microsoft.com/downloads/en/details.aspx?familyid=99b0f94f-e28a-4726-bffe-2f64ae2f59a2&displaylang=en) (영문)을 참조하십시오. 아직 도움이 필요합니다. – dok