As the below image shown, I want to load remote wasm in envoy filter, and I put the value in sha256 field, which is from my cli using sha256sum my_local_wasm_file | awk '{print $1}'
.
But in the runtime, I got the below issue:
[2021-01-23 12:43:06.118][8][debug]
[config] [external/envoy/source/common/config/remote_data_fetcher.cc:52]
fetch remote data [uri = http://192.168.3.147:8000/propaganda_filter.wasm]:
data is invalid
So, I checked envoy code, as below shown:
It's not clear that which cli cmd could do the same way. I tried other two ways, but both didn't work:
sha256sum target/wasm32-unknown-unknown/release/propaganda_filter.wasm
| awk '{print $1}' | base64
sha256sum target/wasm32-unknown-unknown/release/propaganda_filter.wasm
| awk '{print $1}'
| openssl dgst -sha256 -hmac $SECRET -binary | base64
additional
I generate the sha256, firstly:
$ sha256sum target/wasm32-unknown-unknown/release/propaganda_filter.wasm | awk '{print $1}'
c171f5537f3233d80ab180fa468ada4b5d9d96c7249b230abc929ed77c5556ae
And then, I use an online tools(https://convertstring.com/EncodeDecode/HexEncode) to transfer the code:
Accordingly, I put the value into envoy config:
But when I retry to restart envoy, it doesn't work,yet:
question from:
https://stackoverflow.com/questions/65871312/how-to-set-the-sha256-hex-in-envoy-wasm-remote-config 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…