2016-10-19 33 views

回答

1

如果您使用Flynn CLI設置客戶端計算機,則可以在該計算機上的~/.flynnrc文件中找到TLS引腳。它看起來像這樣:

[[cluster]] 
    Name = "flynn-cluster" 
    Key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 
    TLSPin = "------> THE TLS PIN <-------" 
    ControllerURL = "https://controller.xxxx.flynnhub.com" 
    GitURL = "https://git.xxxx.flynnhub.com" 
6

您可以用下面的命令生成TLS引腳:

openssl s_client -connect controller.$CLUSTER_DOMAIN:443 \ 
    -servername controller.$CLUSTER_DOMAIN 2>/dev/null </dev/null \ 
    | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' \ 
    | openssl x509 -inform PEM -outform DER \ 
    | openssl dgst -binary -sha256 \ 
    | openssl base64 

(一定要設置CLUSTER_DOMAIN第一,如CLUSTER_DOMAIN=xxxx.flynnhub.com

+1

值得注意的是,只有當您丟失了'flynn cluster add'命令(在手動安裝結束時打印)以及該命令或'flynn install'創建的〜/ .flynnrc'文件時,才需要這樣做。 – titanous

+0

這對我有用!謝謝! – grilix

1

從jvatic沒回答」 t爲我簽署了一份自簽名證書,所以我通過登錄flynn節點並在其上運行此bash one-liner monstrosity獲得了TLS Pin:

flynn-host inspect $(flynn-host ps | grep router | head -n1 | cut -f1 -d ' ') | \ 
    sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | \ 
    sed -e 's/ENV\[TLSCERT\]\s\+//g' | \ 
    openssl x509 -inform PEM -outform DER | \ 
    openssl dgst -binary -sha256 | openssl base64 
相關問題