【发布时间】:2018-10-11 13:23:44
【问题描述】:
我正在使用这种架构的little dotnet + Angular project:有 3 个单独的文件夹:
- 应用(Angular 客户端)
- 身份验证(带有 IdentityServer4 的 dotnet MVC)
- API(dotnet MVC)
它们都应该使用 https。
到目前为止,我一直在 Windows 上工作,我只使用 Visual Studio 和 IIS Express 对 SSL、证书等没有任何问题。
我有一段时间可以deploy everything on docker using separate containers for each webservice (App, Auth, Api) and a "back-channel" network to allow containers to communicate。 我将一些虚拟卷绑定到 docker 容器,让它们使用 Visual Studio 为我生成的文件:
- %USERPROFILE\AppData\Roaming\Microsoft\UserSecrets --> /root/.microsoft/usersecrets
- %USERPROFILE.aspnet\https --> /root/.aspnet/https/
我完全不记得我在哪里找到了这样的解释,但它确实有效!
现在,我在 linux (Kali) 上,我根本无法使用自签名证书。我不是一个 linux 人,我只是不知道我必须做什么才能让它工作。
我尝试了一些方法来在 linux 中创建自签名证书,但是当我尝试访问 https://localhost:44300 (app)、https://localhost:44385 (api) 或 https://localhost:44321 (auth) 时,我总是遇到同样的问题 = => NET::ERR_CERT_AUTHORITY_INVALID
- https://kimsereyblog.blogspot.com/2018/07/self-signed-certificate-for-identity.html
- https://andrewlock.net/creating-and-trusting-a-self-signed-certificate-on-linux-for-use-in-kestrel-and-asp-net-core/
- https://askubuntu.com/a/94861
每次我尝试不同的方式来创建证书并信任它时,我发现问题仍然存在。但最奇怪的是证书的创建日期并没有改变:
我至少想知道在我的机器上哪里可以找到该证书(2018 年 10 月 6 日 @ 17:28:09 的证书)。
谢谢!
【问题讨论】:
标签: .net asp.net-core https ssl-certificate identityserver4