Adding in rpc auth

pull/42/head
Joshua Fernandes 2 years ago
parent 0a93336118
commit 40a843e732
  1. 6
      README.md
  2. 6
      defaults/main.yml
  3. 14
      templates/config.toml.j2

@ -80,6 +80,12 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults
| `besu_graphql_http_host` | 0.0.0.0 | Specifies the host on which HTTP JSON-RPC listens |
| `besu_graphql_http_port` | 8547 | Specifies the port on which HTTP JSON-RPC listens |
| `besu_graphql_http_cors_origins` | ["all"] | Comma separated origin domain URLs for CORS validation |
| `besu_rpc_http_authentication_enabled` | "false" | Enable RPC WS authentication |
| `besu_rpc_http_authentication_credentials_file` | "" | Specifies the file to use for RPC http credentials |
| `besu_rpc_http_authentication_jwt_public_key_file` | "" | Specifies the file to use for RPC http credentials via pubkey |
| `besu_rpc_ws_authentication_enabled` | "false" | Enable RPC WS authentication |
| `besu_rpc_ws_authentication_credentials_file` | "" | Specifies the file to use for RPC http credentials |
| `besu_rpc_ws_authentication_jwt_public_key_file` | "" | Specifies the file to use for RPC http credentials via pubkey |
| `besu_metrics_host` | 0.0.0.0 | Specifies the host on which Prometheus accesses Besu metrics. The metrics server respects the `besu_whitelist` option |
| `besu_metrics_port` | 9545 | Specifies the port on which Prometheus accesses Besu metrics |
| `besu_bootnodes` | [] | List of comma-separated enode URLs for P2P discovery bootstrap. When connecting to MainNet or public testnets, the default is a predefined list of enode URLs |

@ -50,6 +50,12 @@ besu_rpc_ws_api: ["NET", "ETH", "WEB3"]
besu_rpc_ws_enabled: "true"
besu_rpc_ws_host: 0.0.0.0
besu_rpc_ws_port: 8546
besu_rpc_http_authentication_enabled: "false"
besu_rpc_http_authentication_credentials_file: ""
besu_rpc_http_authentication_jwt_public_key_file: ""
besu_rpc_ws_authentication_enabled: "false"
besu_rpc_ws_authentication_credentials_file: ""
besu_rpc_ws_authentication_jwt_public_key_file: ""
besu_graphql_http_enabled: "true"
besu_graphql_http_host: 0.0.0.0
besu_graphql_http_port: 8547

@ -98,6 +98,20 @@ graphql-http-port={{besu_graphql_http_port}}
graphql-http-cors-origins=[{{besu_graphql_http_cors_origins|map('to_json')|join(',')}}]
{% endif %}
{% if besu_rpc_http_authentication_enabled|bool == True %}
# rpc http authentication
rpc-http-authentication-enabled=true
rpc-http-authentication-credentials-file="{{besu_rpc_http_authentication_credentials_file}}"
rpc-http-authentication-jwt-public-key-file="{{besu_rpc_http_authentication_jwt_public_key_file}}"
{% endif %}
{% if besu_rpc_ws_authentication_enabled|bool == True %}
# rpc ws authentication
rpc-ws-authentication-enabled=true
rpc-ws-authentication-credentials-file="{{besu_rpc_ws_authentication_credentials_file}}"
rpc-ws-authentication-jwt-public-key-file="{{besu_rpc_ws_authentication_jwt_public_key_file}}"
{% endif %}
# p2p
{% if besu_host_ip != "" %}
p2p-host="{{besu_host_ip}}"

Loading…
Cancel
Save