이것은 이전에 묻지 만 완전히 멈췄으며 지금까지는 다른 질문에 나열된 항목이 없습니다. 이것은 아이덴티티 서버를 언급하는 동안 나는 SSL을 설정에 뭔가를 놓친 것 같아요."원격 인증서가 유효성 검사 절차에 따라 유효하지 않습니다."
다음과 같이 내가 설정을 가지고 (이 IIS 함께하지 전체 IIS 표현) :
- 신원 Server 응용 프로그램 : auth.testhost.com:44373/core를
- 웹 API 서비스 : https://localhost:44356/
app.UseIdentityServerBearerTokenAuthentication(options);
이 바는 다음과 같습니다
나는 라인에 제목에 오류가 auth.testhost.com:44373/core/.well-known/openid-configuration에서 서버의 일부 열린 구성 옵션을 요청합니다. 나는 클라이언트 ID와 비밀을보고 몇 가지 예에서
Authority = "https://auth.testhost.com:44373/core",
RequiredScopes = new List<string>() { "api" }
,하지만 그들은 나를 위해 옵션에서 사용할 수 없습니다 :
내 옵션은이 문제인가?
신원 확인 옵션이 필요한 경우 알려 주시면 게시하겠습니다.
makecert.exe -r -pe -n "CN=auth.testhost.com" -b 01/01/2000 -e 01/01/2036 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 -len 2048
이
내가 다음 신뢰할 수있는 루트 인증 기관에 보낸 인증서를 생성 : 은 내가 인증서를 만들려면 다음 명령을 실행.IIS Express를 사용할 때 SSL 포트 바인딩을 Visual Studio에서 처리해야합니다. 아래는이 바인딩은 다음과 같습니다
<site name="Authenticator_V2" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="c:\users\user\documents\visual studio 2015\Projects\Authenticator_V2\Authenticator_V2" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:49755:localhost" />
<binding protocol="https" bindingInformation="*:44373:localhost" />
<binding protocol="https" bindingInformation="*:44373:auth.testhost.com" />
</bindings>
</site>
<site name="APIClient2" id="7">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Users\user\documents\visual studio 2015\Projects\Authenticator_V2\APIClient2" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:53812:localhost" />
<binding protocol="https" bindingInformation="*:44356:localhost" />
</bindings>
</site>
이 내 호스트 파일입니다 : 내가 https://auth.testhost.com:44373/에 갈 때
127.0.0.1 localhost
127.0.0.1 hybrid.testhost.com
127.0.0.1 auth.testhost.com
나는 여전히 내 프로토콜을 통해 빨간색 선이있다. 이것은 뭔가 올바르게 구성되지 않았다는 것을 의미한다고 가정합니다. 내가 크롬을 사용하고 인증서를 클릭하면 제공하고있다 :
"Your connection to this site is not private."
상세 사항 :
SHA-1 Certificate
The certificate for this site expires in 2017 or later, and the certificate chain contains a certificate signed using SHA-1.
View certificate
Certificate Error
There are issues with the site's certificate chain (net::ERR_CERT_COMMON_NAME_INVALID).
은 내가 ERR_CERT_COMMON_NAME_INVALID 오류를 쳐다 보면서 그 크롬 버그 것 같다. 그러나 내 오류가 인증 서버에 연결하려고 웹 서비스 서버에서 던져지고있다 그래서 나는 이것을 무시할 수 있다고 생각 하나 ???
netsh http show sslcert ipport=0.0.0.0:44373
SSL Certificate bindings:
-------------------------
IP:port : 0.0.0.0:44373
Certificate Hash : HAS ODD HASH - REMOVED
Application ID : {HAS GUID - REMOVED}
Certificate Store Name : MY
Verify Client Certificate Revocation : Enabled
Verify Revocation Using Cached Client Certificate Only : Disabled
Usage Check : Enabled
Revocation Freshness Time : 0
URL Retrieval Timeout : 0
Ctl Identifier : (null)
Ctl Store Name : (null)
DS Mapper Usage : Disabled
Negotiate Client Certificate : Disabled
Reject Connections : Disabled
발견이 해시 내 인증서에 대한 올바른없는이 시점에서 :
은 또한 설정 바인딩 인증서가 있었다 확인 netsh를 달렸다. IIS Express 로컬 호스트 용입니다. 이 링크는 IdentityServer: The remote certificate is invalid according to the validation procedure이고 로컬 호스트 인증서를 신뢰할 수있는 루트 인증 기관으로 옮길 수있는 단계를 복사했지만 불행히도 여전히 오류가 있습니다. 나는 이제 무엇을해야할지 모르겠습니다.범위 구성 :
new Scope
{
Name = "api",
DisplayName = "Can call API",
Enabled = true,
Type = ScopeType.Resource
//ScopeSecrets = new List<Secret> { }
}
내 모든 클라이언트는이 범위를 가지고있다.
감사
'컴퓨터 계정'의 '신뢰할 수있는 루트 인증 기관'저장소에 인증서가 확실히 추가 되었습니까? 관리자 권한으로'MMC.exe'를 실행하고'컴퓨터 계정 '을 선택해야합니다. – Seany84
안녕하세요. 나는 창안에 있으며 auth.testhost.com을 위해 만든 인증서와 IIS Express가 사용하는 localhost를 모두 가지고있다. – user2330270
현재 MMC 창을 닫고 관리자 권한으로 다시 열고 컴퓨터 계정을 선택하고 인증서가 아직 있는지 확인할 수 있습니까? – Seany84