如何為通過 Kestrel 服務器託管 PWA 的 UWP 桌面橋應用配置 https (How to configure https for a UWP Desktop Bridge app hosting a PWA via a Kestrel Server)


問題描述

如何為通過 Kestrel 服務器託管 PWA 的 UWP 桌面橋應用配置 https (How to configure https for a UWP Desktop Bridge app hosting a PWA via a Kestrel Server)

我有一個桌面橋應用程序,它使用工作服務來託管 PWA 和帶有 Kestrel 在 https 上的 WebAPI

用戶運行工作人員,並從 ff/chrome/edge 瀏覽到服務

這在開發中運行良好,因為開發機器安裝了受信任的證書

但是,當我將它打包並部署到測試機器時,沒有證書並且應用程序崩潰

那麼,最好的方法是什麼?

選項

  • 將證書與應用程序捆綁在一起,將其安裝在容器本地存儲中?這將如何與瀏覽器一起工作,它不會信任證書,因為它沒有安裝在瀏覽器用戶上下文中
  • 從 CA 購買證書。我將如何分發它?

  • 參考解法

    方法 1:

    So, it seems you can't

    In 2015 certs can not be issued to IPv4 or IPv6 address and must be a FQDN with a public top level domain

    TLS is not just about encryption, but also identification, private ips can't be publicly identified

    And PWA's need https to work, so options..

    1. Self‑signed certificate, which won't be trusted and show the user a nasty message
    2. Publicly host the PWA and certify that domain, then call back to the loopback address 127.0.0.1 over http to communicate with the running worker, this is considered secure. I have done this and it does work, but means my app can only communicate with the user on the same machine

    There are other options that need you to have control of the network dns ‑ which I won't have

    (by Anthony JohnstonAnthony Johnston)

    參考文件

    1. How to configure https for a UWP Desktop Bridge app hosting a PWA via a Kestrel Server (CC BY‑SA 2.5/3.0/4.0)

#tls1.2 #HTTPS #desktop-bridge #kestrel-http-server #SSL






相關問題

如何使用 Retrofit 添加 TLS v 1.0 和 TLS v.1.1 (How to add TLS v 1.0 and TLS v.1.1 with Retrofit)

我的 openssl 和 ssl 默認 CA 證書路徑是什麼? (what is my openssl and ssl Default CA Certs Path?)

LDAP 使用端口 389 失敗 (LDAP fails using port 389)

如何配置 Apache 以接受具有 TLS v1.2 的過期客戶端證書? (How configure Apache to accept expired client certificate with TLS v1.2?)

Docker - 將 localhost HTTPS 服務器從容器發佈到主機 (Docker - Publish localhost HTTPS server from container to host)

SChannel 中的密碼套件選擇 (Cipher suite selection in SChannel)

我可以使用任何客戶端證書連接到在容器中運行的 MQTT 代理 (I'm able to connect to MQTT broker running in a container with any client certificate)

如何為通過 Kestrel 服務器託管 PWA 的 UWP 桌面橋應用配置 https (How to configure https for a UWP Desktop Bridge app hosting a PWA via a Kestrel Server)

如何修復 ERR_SSL_VERSION_OR_CIPHER_MISMATCH 錯誤? (How to fix ERR_SSL_VERSION_OR_CIPHER_MISMATCH error?)

在 Apache 2.4.37 中禁用 TLS 1.0 和 1.1 不起作用 (Disabling TLS 1.0 & 1.1 in Apache 2.4.37 not working)

如何從 Windows 解密其他設備(Wifi 熱點)的 TLS 數據包? (How can I decrypt TLS packets of other devices (Wifi Hotspot) from Windows?)

將備用 IP 地址添加到 kubernetes api 服務器 (add alternative IP address to kubernetes api server)







留言討論