jwt: let Geth generate secret by itself

Using `password_hash` doesn't work as the value has to be hex encoded.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-08-16 16:39:53 +02:00
parent da7ee8c266
commit 24993a45c7
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
2 changed files with 2 additions and 1 deletions

View File

@ -55,7 +55,7 @@ geth_authrpc_enabled: true
geth_authrpc_addr: '127.0.0.1'
geth_authrpc_port: 8551
geth_authrpc_vhosts: '{{ geth_rpc_vhosts }}'
geth_authrpc_jwtsecret: '{{ geth_service_name | password_hash("sha512", (inventory_hostname|hash("sha1"))[0:16], rounds=5000) }}'
#geth_authrpc_jwtsecret: '0x64charHexEncodedSecretToken'
geth_authrpc_jwtsecret_file: '{{ geth_cont_vol }}/keys/jwtsecret'
# Sync mode: full, fast, light, snap

View File

@ -103,6 +103,7 @@
group: 'docker'
- name: Geth | Create JWT secret file
when: geth_authrpc_jwtsecret is defined
copy:
dest: '{{ geth_authrpc_jwtsecret_file }}'
content: '{{ geth_authrpc_jwtsecret | mandatory }}'